summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFiregem2022-01-01 14:19:00 -0500
committerFiregem2022-01-01 14:19:00 -0500
commit7336bf46b67b399005cf8d3fb73571e11669eb71 (patch)
tree496a96838e15e599e9c65fb74493cf87fc222d6a
parent37427f9832b409e3c8e0dd98e4632e1eb546f6be (diff)
downloadaur-7336bf46b67b399005cf8d3fb73571e11669eb71.tar.gz
make `rlwrap` an optdepend; use custom make target in case upstream defaults change
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD33
-rw-r--r--rlwrap-shim6
3 files changed, 25 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8e7b696b43fe..c77a736bfee8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = cbqn-git
pkgdesc = A BQN implementation in C.
- pkgver = r752.3d5a92c
+ pkgver = r764.0690ae1
pkgrel = 1
url = https://github.com/dzaima/CBQN
arch = x86_64
@@ -9,17 +9,17 @@ pkgbase = cbqn-git
makedepends = git
makedepends = clang
depends = glibc
- depends = rlwrap
optdepends = ttf-bqn386: BQN and APL compatible font
+ optdepends = rlwrap: Use readline in the REPL
provides = cbqn
conflicts = cbqn
source = cbqn::git+https://github.com/dzaima/CBQN.git
- source = bqn-ref::git+https://github.com/mlochbaum/BQN.git
+ source = BQN-ref::git+https://github.com/mlochbaum/BQN.git
source = makefile.patch
source = rlwrap-shim
md5sums = SKIP
md5sums = SKIP
md5sums = 4fd2c4b8b11b0f234482d3fa8056c039
- md5sums = 02cb8cb1a3f5832526614237a04de4de
+ md5sums = 58280661e07591c6d8a5d399fc2e1f94
pkgname = cbqn-git
diff --git a/PKGBUILD b/PKGBUILD
index fb667ca0dd6a..85af8ddb311b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,25 @@
# Maintainer: Firegem <mrfiregem [at] protonail [dot] ch>
pkgname=cbqn-git
-pkgver=r752.3d5a92c
+pkgver=r764.0690ae1
pkgrel=1
pkgdesc="A BQN implementation in C."
arch=('x86_64')
url="https://github.com/dzaima/CBQN"
license=('GPL3' 'custom:ISC')
-depends=('glibc' 'rlwrap')
-optdepends=('ttf-bqn386: BQN and APL compatible font')
+depends=('glibc')
+optdepends=('ttf-bqn386: BQN and APL compatible font'
+ 'rlwrap: Use readline in the REPL')
makedepends=('git' 'clang')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${pkgname%-git}::git+${url}.git"
- "bqn-ref::git+https://github.com/mlochbaum/BQN.git"
+ 'BQN-ref::git+https://github.com/mlochbaum/BQN.git'
'makefile.patch'
'rlwrap-shim')
md5sums=('SKIP'
'SKIP'
'4fd2c4b8b11b0f234482d3fa8056c039'
- '02cb8cb1a3f5832526614237a04de4de')
+ '58280661e07591c6d8a5d399fc2e1f94')
pkgver() {
cd "${srcdir}/${pkgname%-git}"
@@ -27,30 +28,28 @@ pkgver() {
prepare() {
cd "${srcdir}/${pkgname%-git}"
- patch --forward --strip=1 --input="${srcdir}/makefile.patch"
+ patch -p1 -i "${srcdir}/makefile.patch"
}
build() {
cd "${srcdir}/${pkgname%-git}"
- make PIE='-pie' o3
- ./BQN genRuntime "${srcdir}/bqn-ref"
- make PIE='-pie' o3
+ make CC='clang' PIE='-pie' LDFLAGS="${LDFLAGS}" \
+ t='aur' f='-O2' c
}
check() {
cd "${srcdir}/${pkgname%-git}"
- ./BQN "${srcdir}/bqn-ref/test/this.bqn"
+ ./BQN "${srcdir}/BQN-ref/test/this.bqn"
}
package() {
- install -Dm755 ./rlwrap-shim "${pkgdir}/usr/bin/bqn"
+ install -Dm755 ./rlwrap-shim "${pkgdir}/usr/bin/BQN"
cd "${srcdir}/${pkgname%-git}"
- install -Dm755 ./BQN "${pkgdir}/usr/share/${pkgname}/bqn"
- install -Dm644 ./LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cbqn"
+ install -Dm755 -t "${pkgdir}/usr/share/${pkgname}" BQN
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-CBQN"
- cd "$srcdir/bqn-ref"
- install -Dm644 ./LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-bqn"
- install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}/" ./tutorial/*.{md,bqn}
- install -Dm644 -t "${pkgdir}/usr/share/${pkgname}" ./editors/inputrc
+ cd "${srcdir}/BQN-ref"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-BQN"
+ install -Dm644 -t "${pkgdir}/usr/share/${pkgname}" editors/inputrc
}
diff --git a/rlwrap-shim b/rlwrap-shim
index a4748b4fffdd..5de0cea48623 100644
--- a/rlwrap-shim
+++ b/rlwrap-shim
@@ -1,4 +1,8 @@
#!/bin/sh
pkgdir=/usr/share/cbqn-git
-INPUTRC="${pkgdir}/inputrc" rlwrap "${pkgdir}/bqn" "$@"
+if command -v 'rlwrap' >/dev/null; then
+ INPUTRC="${pkgdir}/inputrc" rlwrap "${pkgdir}/BQN" "$@"
+else
+ /usr/bin/BQN "$@"
+fi