summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLone_Wolf2023-05-25 21:44:30 +0200
committerLone_Wolf2023-05-25 21:44:30 +0200
commit3199900a3e23c4ada86fcc98546991004692756f (patch)
tree8392662b1f07f51cddbc279315d9def763aa22f7
parent4f142bdd0c0537c2b3ef60734e90c64cfc3e2b43 (diff)
downloadaur-3199900a3e23c4ada86fcc98546991004692756f.tar.gz
adjustments to ensure libclc-minimal-git & llvm-minimal-git use same sourcetree
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD17
2 files changed, 17 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3bc66a467940..0de7a2b1dd8b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = libclc-minimal-git
pkgdesc = companion package to llvm-minimal-git, Library requirements of the OpenCL C programming language
- pkgver = 17.0.0_r460869.b2809b4811bd
+ pkgver = 17.0.0_r462218.51572c2cd720
pkgrel = 2
url = https://libclc.llvm.org/
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 8a9430813862..5010468614cb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# Contributor: Solomon Choina <shlomochoina@gmail.com>
pkgname=libclc-minimal-git
-pkgver=17.0.0_r460869.b2809b4811bd
+pkgver=17.0.0_r462218.51572c2cd720
pkgrel=2
pkgdesc="companion package to llvm-minimal-git, Library requirements of the OpenCL C programming language"
arch=('any')
@@ -16,6 +16,21 @@ source=("git+https://github.com/llvm/llvm-project.git"
)
sha256sums=('SKIP')
+prepare() {
+ cd llvm-project
+ local _commit_hash=$(echo $(pacman -Q llvm-minimal-git) | cut -d' ' -f2 | cut -d'-' -f1 | cut -d'.' -f4)
+ # makepkg installs deps after processing the body of the PKGBUI:LD.
+ # This prevents using _commit_hash in the source= array unless llvm-minimal-git is installed before build starts.
+ # best alternative seems to be to use git reset in prepare() .
+ # example how the command works
+ # pacman -Q llvm-minimal-git output = llvm-minimal-git 17.0.0_r461863.8064caf83fb1-1
+ # the first cut removes (pkgname) llvm-minimal-git
+ # the 2nd cut removes (pkgrel) 1
+ # the 3rd removes (revision count) r461863 so only (the commit hash) 8064caf83fb1 remains
+
+ git reset --hard $_commit_hash
+}
+
pkgver() {
cd llvm-project/llvm