diff options
author | éclairevoyant | 2023-06-03 21:58:30 -0400 |
---|---|---|
committer | éclairevoyant | 2023-06-03 21:58:30 -0400 |
commit | 6b8a090c2565d1a0c085c2c158e8a8252a8c68c7 (patch) | |
tree | 8d13c56886e237b624ad76f61df3a9470540e5c4 | |
parent | 630b4067d9fcdf21683c42bca55c3ee1e87ec3a1 (diff) | |
download | aur-6b8a090c2565d1a0c085c2c158e8a8252a8c68c7.tar.gz |
c2nim-git: fix build and packaging; update deps
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 45 |
2 files changed, 36 insertions, 23 deletions
@@ -1,21 +1,21 @@ pkgbase = c2nim-git pkgdesc = Tool to translate Ansi C code to Nim - pkgver = 0.9.18.r24.bc8edce + pkgver = 0.9.18.r36.6d35d93 pkgrel = 1 epoch = 1 url = https://github.com/nim-lang/c2nim arch = i686 arch = x86_64 - groups = nim license = MIT + makedepends = choosenim makedepends = git - makedepends = openssl-1.1 - makedepends = nimble - depends = nim + depends = glibc + depends = gcc-libs + optdepends = nim: compile generated code provides = c2nim conflicts = c2nim - source = c2nim-git::git+https://github.com/nim-lang/c2nim.git?signed + source = git+https://github.com/nim-lang/c2nim.git?signed validpgpkeys = 5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23 - sha256sums = SKIP + b2sums = SKIP pkgname = c2nim-git @@ -2,36 +2,49 @@ _pkgname=c2nim pkgname="$_pkgname-git" -pkgver=0.9.18.r24.bc8edce +pkgver=0.9.18.r36.6d35d93 pkgrel=1 epoch=1 pkgdesc="Tool to translate Ansi C code to Nim" -arch=('i686' 'x86_64') +arch=(i686 x86_64) url="https://github.com/nim-lang/$_pkgname" -license=('MIT') -groups=('nim') -depends=('nim') -makedepends=('git' 'openssl-1.1' 'nimble') +license=(MIT) +depends=(glibc gcc-libs) +makedepends=(choosenim git) +optdepends=('nim: compile generated code') provides=("$_pkgname") conflicts=("$_pkgname") -source=("$pkgname::git+$url.git?signed") -sha256sums=('SKIP') +source=("git+$url.git?signed") +b2sums=('SKIP') validpgpkeys=('5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23') # GitHub (web-flow commit signing) <noreply@github.com> +_setup() { + _nimble_dir="$srcdir/nimbleDir" + _path="$_nimble_dir/bin:$PATH" + cd $_pkgname +} + +prepare() { + _setup + + # stable nim doesn't support --offline --noRebuild + CHOOSENIM_NO_ANALYTICS=1 choosenim '#head' --nimbleDir="$_nimble_dir" +} + pkgver() { - cd $pkgname - git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g' + git -C $_pkgname describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g' } build() { - cd $pkgname - nimble build -y + _setup + + PATH="$_path" nimble install --offline --noRebuild -l --verbose \ + --passNim:--passC:"\"$CFLAGS\"" --passNim:--passL:"\"$LDFLAGS\"" } package() { - cd $pkgname + cd $_pkgname install -Dm755 $_pkgname -t "$pkgdir/usr/bin/" - install -Dm644 "doc/$_pkgname.rst" -t "$pkgdir/usr/share/doc/$pkgname/" - install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - install -Dm644 README.md "$pkgdir/usr/share/doc/c2nim/README" + install -Dm644 "doc/$_pkgname.rst" README.md -t "$pkgdir/usr/share/doc/$_pkgname/" + install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$_pkgname/LICENSE" } |