summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLone_Wolf2022-11-16 22:34:21 +0100
committerLone_Wolf2022-11-16 22:34:21 +0100
commitc0a76c7b96a296aaf883d0a994bec4fdda023021 (patch)
tree5e3d04509b9dfc7a8fcbcd90be2185f989c5b6a4
downloadaur-c0a76c7b96a296aaf883d0a994bec4fdda023021.tar.gz
initial upload
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD49
2 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a6e9308c6352
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = libclc-minimal-git
+ pkgdesc = companion package to llvm-minimal-git, Library requirements of the OpenCL C programming language
+ pkgver = 16.0.0_r441978.6f48e68d398d
+ pkgrel = 1
+ url = https://libclc.llvm.org/
+ arch = any
+ license = custom:Apache 2.0 with LLVM Exception
+ makedepends = llvm-minimal-git
+ makedepends = cmake
+ makedepends = ninja
+ makedepends = python
+ makedepends = spirv-llvm-translator-git
+ provides = libclc
+ conflicts = libclc
+ source = llvm-project::git+https://github.com/llvm/llvm-project.git
+ sha256sums = SKIP
+
+pkgname = libclc-minimal-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7d6233f60260
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Lone_Wolf <lone_wolf@klaas-de-kat.nl>
+# Contributor: Laurent Carlier <lordheavym@gmail.com>
+# Contributor: Solomon Choina <shlomochoina@gmail.com>
+
+pkgname=libclc-minimal-git
+pkgver=16.0.0_r441978.6f48e68d398d
+pkgrel=1
+pkgdesc="companion package to llvm-minimal-git, Library requirements of the OpenCL C programming language"
+arch=('any')
+url="https://libclc.llvm.org/"
+license=('custom:Apache 2.0 with LLVM Exception')
+provides=('libclc')
+conflicts=('libclc')
+makedepends=('llvm-minimal-git' 'cmake' 'ninja' 'python' 'spirv-llvm-translator-git')
+source=("llvm-project::git+https://github.com/llvm/llvm-project.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd llvm-project/llvm
+
+ # This will almost match the output of `llvm-config --version` when the
+ # LLVM_APPEND_VC_REV cmake flag is turned on. The only difference is
+ # dash being replaced with underscore because of Pacman requirements.
+ local _pkgver=$(awk -F 'MAJOR |MINOR |PATCH |)' \
+ 'BEGIN { ORS="." ; i=0 } \
+ /set\(LLVM_VERSION_/ { print $2 ; i++ ; if (i==2) ORS="" } \
+ END { print "\n" }' \
+ CMakeLists.txt)_r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
+ echo "${_pkgver}"
+}
+
+
+build() {
+ cmake \
+ -B _build \
+ -S "$srcdir"/llvm-project/libclc \
+ -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -D CMAKE_INSTALL_PREFIX=/usr \
+ -Wno-dev
+ ninja -C _build $NINJAFLAGS
+
+}
+
+package() {
+ DESTDIR="$pkgdir" ninja -C _build $NINJAFLAGS install
+ install -Dm644 "$srcdir"/llvm-project/libclc/LICENSE.TXT "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.TXT
+}
+