diff options
author | Firegem | 2022-01-01 14:19:00 -0500 |
---|---|---|
committer | Firegem | 2022-01-01 14:19:00 -0500 |
commit | 7336bf46b67b399005cf8d3fb73571e11669eb71 (patch) | |
tree | 496a96838e15e599e9c65fb74493cf87fc222d6a | |
parent | 37427f9832b409e3c8e0dd98e4632e1eb546f6be (diff) | |
download | aur-7336bf46b67b399005cf8d3fb73571e11669eb71.tar.gz |
make `rlwrap` an optdepend; use custom make target in case upstream defaults change
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rw-r--r-- | rlwrap-shim | 6 |
3 files changed, 25 insertions, 22 deletions
@@ -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 @@ -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 |