summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbuck-yeh2020-12-25 17:32:00 +0800
committerbuck-yeh2020-12-25 17:32:00 +0800
commit0358db3c0092defda8962e95cb4a6caf4d0300c2 (patch)
tree2b7f379a6059360f496bae8ad1e1cd1a0e241544
parentf37f37c94f36d9637adb6895f4073fbd2cc37f39 (diff)
downloadaur-0358db3c0092defda8962e95cb4a6caf4d0300c2.tar.gz
Upgrade according to changes of bux v1.1.1
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD28
2 files changed, 19 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 89cdea3ca29..ebbb4aa1d15 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = parsergen
pkgdesc = LR1/GLR parser generator into Modern C++ code which must be built with bux library
- pkgver = 1.5.0
- pkgrel = 2
+ pkgver = 1.5.1
+ pkgrel = 1
url = https://github.com/buck-yeh/parsergen.git
arch = x86_64
license = MIT
diff --git a/PKGBUILD b/PKGBUILD
index 97b0f74c2c8..0c58ac7f8c6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,8 +5,8 @@
# Maintainer: Buck Yeh <buck.yeh at gmail dot com>
pkgname=parsergen
-pkgver=1.5.0
-pkgrel=2
+pkgver=1.5.1
+pkgrel=1
epoch=
pkgdesc='LR1/GLR parser generator into Modern C++ code which must be built with bux library'
arch=('x86_64')
@@ -33,26 +33,32 @@ prepare() {
rm -Rf "$pkgname"
mkdir -p "$pkgname"
cd "$pkgname" || return 1
- git clone -b main --single-branch $url .
+ if [[ "$pkgver" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ git clone -b "$pkgver" --single-branch $url .
+ else
+ git clone -b main --single-branch $url .
+ fi
}
-pkgver() {
- cd "$pkgname" || return 1
- _ret=
- for i in $(sed -n '
+if [[ ! "$pkgver" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ pkgver() {
+ cd "$pkgname" || return 1
+ local _ret=
+ for i in $(sed -n '
s/^ *VERSION_MAJOR *= *\([0-9][0-9]*\).*/\1/p
s/^ *VERSION_MINOR *= *\([0-9][0-9]*\).*/.\1/p
s/^ *VERSION_RELEASE *= *\([0-9][0-9]*\).*/.\1/p
' ParserGen/main.cpp); do _ret="$_ret$i"; done
- echo "$_ret"
- }
+ echo "$_ret"
+ }
+fi
build() {
cd "$pkgname" || return 1
cmake .
- cd ParserGen/
+ cd ParserGen/ || return 1
make -j
- cd ../ScannerGen/
+ cd ../ScannerGen/ || return 1
make -j
}