summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLone_Wolf2023-04-15 15:48:51 +0200
committerLone_Wolf2023-04-15 15:48:51 +0200
commitbeaa8d3e5e4bcb7131dad7b8ca5e0f488abd16b7 (patch)
treeb1dbb36bf7410fd53cb12577268fe552a115902c
parentfcb2280442987974f8f7c3b0e69f9e9ad09d9029 (diff)
downloadaur-beaa8d3e5e4bcb7131dad7b8ca5e0f488abd16b7.tar.gz
split off clang runtime libs
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD51
2 files changed, 43 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7aa597bc47aa..9758642a451d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = llvm-minimal-git
- pkgver = 17.0.0_r457890.293e4da32b1d
- pkgrel = 1
+ pkgver = 17.0.0_r457944.9ece8753d5e6
+ pkgrel = 2
url = https://llvm.org/
arch = x86_64
license = custom:Apache 2.0 with LLVM Exception
@@ -29,7 +29,8 @@ pkgbase = llvm-minimal-git
pkgname = llvm-minimal-git
pkgdesc = Collection of modular and reusable compiler and toolchain technologies
- depends = llvm-libs-minimal-git=17.0.0_r457890.293e4da32b1d-1
+ depends = llvm-libs-minimal-git=17.0.0_r457944.9ece8753d5e6-2
+ depends = clang-libs-minimal-git=17.0.0_r457944.9ece8753d5e6-2
depends = perl
optdepends = python: for using lit (LLVM Integrated Tester)
optdepends = python-setuptools: for using lit
@@ -51,9 +52,15 @@ pkgname = llvm-libs-minimal-git
optdepends = llvm-libs: for LLVMgold linker
provides = llvm-libs
+pkgname = clang-libs-minimal-git
+ pkgdesc = clang runtime libraries, trunk version
+ depends = llvm-libs-minimal-git=17.0.0_r457944.9ece8753d5e6-2
+ provides = clang-libs
+ conflicts = clang-libs
+
pkgname = spirv-llvm-translator-minimal-git
pkgdesc = Tool and a library for bi-directional translation between SPIR-V and LLVM IR, trunk version
- depends = llvm-minimal-git=17.0.0_r457890.293e4da32b1d-1
+ depends = llvm-minimal-git=17.0.0_r457944.9ece8753d5e6-2
depends = spirv-tools-git
provides = spirv-llvm-translator
conflicts = spirv-llvm-translator
diff --git a/PKGBUILD b/PKGBUILD
index f9bae4ba2017..c2c643bec53f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,9 +15,9 @@
pkgbase=llvm-minimal-git
-pkgname=('llvm-minimal-git' 'llvm-libs-minimal-git' 'spirv-llvm-translator-minimal-git')
-pkgver=17.0.0_r457890.293e4da32b1d
-pkgrel=1
+pkgname=('llvm-minimal-git' 'llvm-libs-minimal-git' 'clang-libs-minimal-git' 'spirv-llvm-translator-minimal-git')
+pkgver=17.0.0_r457944.9ece8753d5e6
+pkgrel=2
arch=('x86_64')
url="https://llvm.org/"
license=('custom:Apache 2.0 with LLVM Exception')
@@ -112,7 +112,7 @@ check() {
package_llvm-minimal-git() {
pkgdesc="Collection of modular and reusable compiler and toolchain technologies"
- depends=(llvm-libs-minimal-git=$pkgver-$pkgrel 'perl')
+ depends=(llvm-libs-minimal-git="$pkgver-$pkgrel" clang-libs-minimal-git="$pkgver-$pkgrel" 'perl')
provides=('llvm' 'compiler-rt' 'clang')
conflicts=('llvm' 'compiler-rt' 'clang')
optdepends=('python: for using lit (LLVM Integrated Tester)'
@@ -126,20 +126,24 @@ package_llvm-minimal-git() {
python3 setup.py install --root="$pkgdir" -O1
popd
- # The runtime libraries go into a separate package
- mv -f "$pkgdir"/usr/lib/lib{LLVM-*.so,LTO.so.*,Remarks.so.*,clang-cpp.so.*} "$srcdir"
-
- # Remove files which conflict with llvm-libs
+ # Remove files which conflict with repo llvm-libs
rm "$pkgdir"/usr/lib/{LLVMgold,lib{LLVM,LTO}}.so
rm "$pkgdir"/usr/lib/libRemarks.so
+
+ # prepare folders in srcdir to store files that are placed in other package_*() functions
+ mkdir -p "$srcdir"{/llvm-libs/usr/lib,/clang-libs/usr/lib,/spirv-llvm-translator/usr/{bin,include/LLVMSPIRVLib/,lib/pkgconfig}}
- # spirv-llvm-translator files go to a separate package
- mkdir -p "$srcdir"/spirv/usr/{bin,include/LLVMSPIRVLib/,lib/pkgconfig}
- mv "$pkgdir"/usr/bin/llvm-spirv "$srcdir"/spirv/usr/bin
- mv "$pkgdir"/usr/include/LLVMSPIRVLib/* "$srcdir"/spirv/usr/include/LLVMSPIRVLib/
- mv "$pkgdir"/usr/lib/libLLVMSPIRVLib.a "$srcdir"/spirv/usr/lib
- mv "$pkgdir"/usr/lib/pkgconfig/LLVMSPIRVLib.pc "$srcdir"/spirv/usr/lib/pkgconfig
+ # The llvm runtime libraries go into llvm-libs-minimal-git
+ mv -f "$pkgdir"/usr/lib/lib{LLVM-*.so,LTO.so.*,Remarks.so.*} "$srcdir"/llvm-libs/usr/lib
+ # The clang runtime libraries go into clang-libs-minimal-git
+ mv -f "$pkgdir"/usr/lib/libclang{,-cpp}.so* "$srcdir"/clang-libs/usr/lib
+
+ # all spirv-llvm-translator files go to spirv-llvm-translator-minimal-git
+ mv "$pkgdir"/usr/bin/llvm-spirv "$srcdir"/spirv-llvm-translator/usr/bin
+ mv "$pkgdir"/usr/include/LLVMSPIRVLib/* "$srcdir"/spirv-llvm-translator/usr/include/LLVMSPIRVLib/
+ mv "$pkgdir"/usr/lib/libLLVMSPIRVLib.a "$srcdir"/spirv-llvm-translator/usr/lib
+ mv "$pkgdir"/usr/lib/pkgconfig/LLVMSPIRVLib.pc "$srcdir"/spirv-llvm-translator/usr/lib/pkgconfig
# llvm project uses /usr/libexec and setting CMAKE_INSTALL_LIBEXECDIR doesn't change that.
# to comply with archlinux packaging standards we have to move some files manually
@@ -171,21 +175,30 @@ package_llvm-libs-minimal-git() {
provides=('llvm-libs')
optdepends=('llvm-libs: for LLVMgold linker')
- install -d "$pkgdir/usr/lib"
- cp -P \
- "$srcdir"/lib{LLVM,LTO,Remarks,clang-cpp}*.so* \
- "$pkgdir"/usr/lib/
+ cp --preserve --recursive "$srcdir"/llvm-libs/* "$pkgdir"/
install -Dm644 "$srcdir"/llvm-project/llvm/LICENSE.TXT "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.TXT
}
+package_clang-libs-minimal-git() {
+ pkgdesc="clang runtime libraries, trunk version"
+ depends=(llvm-libs-minimal-git="$pkgver-$pkgrel")
+ # clang-libs doesn't exist in repos at this time, but it's cleaner to provide & conflict it.
+ # TODO: Once repo clang-libs comes into existence, verify if changes are needed to this package
+ provides=('clang-libs')
+ conflicts=('clang-libs')
+
+ cp --preserve --recursive "$srcdir"/clang-libs/* "$pkgdir"/
+
+ install -Dm644 "$srcdir"/llvm-project/llvm/LICENSE.TXT "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.TXT
+}
package_spirv-llvm-translator-minimal-git() {
pkgdesc="Tool and a library for bi-directional translation between SPIR-V and LLVM IR, trunk version"
depends=(llvm-minimal-git=$pkgver-$pkgrel 'spirv-tools-git')
provides=('spirv-llvm-translator')
conflicts=('spirv-llvm-translator')
- cp --preserve --recursive "$srcdir"/spirv/* "$pkgdir"/
+ cp --preserve --recursive "$srcdir"/spirv-llvm-translator/* "$pkgdir"/
install -Dm644 "$srcdir"/SPIRV-LLVM-Translator/LICENSE.TXT "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.TXT
}