summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuchesar V. ILIEV2016-01-30 02:43:44 +0200
committerLuchesar V. ILIEV2016-01-30 02:51:51 +0200
commit46854f28ea50d957bce6645226d89617a4b4c2e6 (patch)
tree29083925386dd927d25792d1a2ff9f09c9c37fc6
parent4a78f84c57d1d3486d5ad26ac643258cbe53e9f5 (diff)
downloadaur-46854f28ea50d957bce6645226d89617a4b4c2e6.tar.gz
Fix pkgver() for CMake
-rw-r--r--PKGBUILD7
1 files changed, 5 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6708953fa4ea..6650e18d97be 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -68,8 +68,11 @@ pkgver() {
# 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.
- echo $(sed -n '/^AC_INIT/s|^.*,\[\([[:digit:]\.]\+svn\)\],.*$|\1|p' \
- autoconf/configure.ac)_r$(svnversion | tr -d [A-z])
+ echo $(awk -F 'MAJOR |MINOR |PATCH |SUFFIX |)' \
+ 'BEGIN { ORS="." ; i=0 } \
+ /set\(LLVM_VERSION_/ { print $2 ; i++ ; if (i==2) ORS="" } \
+ END { print "\n" }' \
+ CMakeLists.txt)_r$(svnversion | tr -d [A-z])
}
prepare() {