initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

96
llvm/PKGBUILD Normal file
View File

@@ -0,0 +1,96 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
pkgname=('llvm' 'llvm-libs')
pkgver=11.0.0
pkgrel=3
arch=('i686' 'x86_64')
url="https://llvm.org/"
license=('custom:Apache-2.0+LLVM-Exceptions')
makedepends=('cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2'
'python-setuptools' 'python-psutil' 'python-sphinx'
'python-recommonmark')
options=('staticlibs')
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
source=($_source_base/$pkgname-$pkgver.src.tar.xz
stack-clash-fixes.patch
llvm-config.h)
sha512sums=('b3e92091ac48772edc0c30801218ce646ef374e1968baab91df9005f58e11c3ce149b2c4c655c7001f8554fd337caa02c08783bc736153bf58f35fe008e624a4'
'ca5722fd3170a693c712d65b589db9efcd0874886f21e692e15a39fe038eb4ac42060ce382fa069ebe986c77edfe5de953616a194f638850d759dcb74f87956a'
'75e743dea28b280943b3cc7f8bbb871b57d110a7f2b9da2e6845c1c36bf170dd883fca54e463f5f49e0c3effe07fbd0db0f8cf5a12a2469d3f792af21a73fcdd')
prepare() {
cd "$srcdir/llvm-$pkgver.src"
mkdir build
# https://bugs.llvm.org/show_bug.cgi?id=48007
patch -Np2 -i $srcdir/stack-clash-fixes.patch
}
build() {
cd "$srcdir/llvm-$pkgver.src/build"
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLLVM_HOST_TRIPLE=$CHOST \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_FFI=ON \
-DLLVM_BUILD_TESTS=ON \
-DLLVM_BUILD_DOCS=ON \
-DLLVM_ENABLE_SPHINX=ON \
-DLLVM_ENABLE_DOXYGEN=OFF \
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-Wno-dev
ninja all
}
package_llvm() {
pkgdesc="Collection of modular and reusable compiler and toolchain technologies"
depends=('llvm-libs' 'perl')
cd "$srcdir/llvm-$pkgver.src/build"
DESTDIR="$pkgdir" ninja install
# Include lit for running lit-based tests in other projects
pushd ../utils/lit
python setup.py install --root="$pkgdir" -O1
popd
# Remove documentation sources
rm -r "$pkgdir"/usr/share/doc/$pkgname/html/{_sources,.buildinfo}
# The runtime libraries go into llvm-libs
mv -f "$pkgdir"/usr/lib/lib{LLVM,LTO,Remarks}*.so* "$srcdir"
mv -f "$pkgdir"/usr/lib/LLVMgold.so "$srcdir"
if [[ $CARCH == x86_64 ]]; then
mv "$pkgdir/usr/include/llvm/Config/llvm-config"{,-64}.h
install -Dm644 "$srcdir/llvm-config.h" -t "$pkgdir/usr/include/llvm/Config"
fi
install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE.TXT"
}
package_llvm-libs() {
pkgdesc="LLVM runtime libraries"
depends=('gcc-libs' 'zlib' 'libffi' 'libedit' 'ncurses' 'libxml2')
install -d "$pkgdir/usr/lib"
cp -P \
"$srcdir"/lib{LLVM,LTO,Remarks}*.so* \
"$srcdir"/LLVMgold.so \
"$pkgdir/usr/lib/"
# Symlink LLVMgold.so from /usr/lib/bfd-plugins
# https://bugs.archlinux.org/task/28479
install -d "$pkgdir/usr/lib/bfd-plugins"
ln -s ../LLVMgold.so "$pkgdir/usr/lib/bfd-plugins/LLVMgold.so"
install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE.TXT"
}