diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-05-24 00:03:30 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-06-07 23:36:21 +0200 |
commit | afe7923c88c43e566e4529ef91f464b0eaedcd8c (patch) | |
tree | a76ddb1d356164d6e8c30ba0395c1f3e0aaf0ccb /testing/nim/APKBUILD | |
parent | 51845850201a6e06d5d7154807ed9969fd8b6c9a (diff) | |
download | aports-afe7923c88c43e566e4529ef91f464b0eaedcd8c.tar.bz2 aports-afe7923c88c43e566e4529ef91f464b0eaedcd8c.tar.xz |
testing/nim: new aport
https://nim-lang.org/
A systems and applications programming language
Diffstat (limited to 'testing/nim/APKBUILD')
-rw-r--r-- | testing/nim/APKBUILD | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/testing/nim/APKBUILD b/testing/nim/APKBUILD new file mode 100644 index 0000000000..c52abc4f7b --- /dev/null +++ b/testing/nim/APKBUILD @@ -0,0 +1,78 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +# +# WARNING: Coroutines does not work and there may be more breakages! +pkgname=nim +pkgver=0.17.0 +pkgrel=0 +pkgdesc="A systems and applications programming language" +url="https://nim-lang.org/" +arch="all" +license="MIT" +checkdepends="sqlite-libs nodejs" +subpackages="$pkgname-doc nimsuggest niminst" +source="https://nim-lang.org/download/$pkgname-$pkgver.tar.xz + $pkgname-csources-$pkgver.tar.gz::https://github.com/nim-lang/csources/archive/v$pkgver.tar.gz + niminst-fix-paths.patch + nim-config-fix-paths.patch" +builddir="$srcdir/$pkgname-$pkgver" + +prepare() { + mv "$srcdir"/csources-$pkgver "$builddir"/csources + default_prepare +} + +build() { + cd "$builddir"/csources + + msg2 "Building nim csources..." + ./build.sh + + cd .. + + msg2 "Building koch..." + ./bin/nim compile -d:release koch + + msg2 "Building nim..." + ./koch boot -d:release + + msg2 "Building nimsuggest..." + ./bin/nim compile -d:release nimsuggest/nimsuggest.nim +} + +check() { + cd "$builddir" + # XXX: Some tests fail! + ./koch tests --pedantic --targets="c js" all || true +} + +package() { + cd "$builddir" + DESTDIR="$pkgdir" ./koch install /usr/bin + + cd "$pkgdir" + mkdir -p usr/include + local file; for file in usr/lib/nim/*.h; do + mv $file usr/include/ + ln -s ../../include/${file##*/} usr/lib/nim/${file##*/} + done +} + +nimsuggest() { + pkgdesc="idetools for the nim language" + + install -D -m 755 "$builddir"/nimsuggest/nimsuggest \ + "$subpkgdir"/usr/bin/nimsuggest +} + +niminst() { + pkgdesc="A tool to generate an installer for a Nim program" + + install -D -m 755 "$builddir"/tools/niminst/niminst \ + "$subpkgdir"/usr/bin/niminst +} + +sha512sums="90d709b39746fac5582b9df69d3eb9e3b7a39563a98f7a3002f00716b936e4e0d2be47d8b877878318692e6e2b85c08077dfcc20d9059573a1967402c244894b nim-0.17.0.tar.xz +fbf64d347e25da48d5237eef35209774f0e542975465c5d2cd98878f10ea0ab62ad1404758131543b8cf634afabc90d85e9e59dec96eae9bb60fffb88d204d92 nim-csources-0.17.0.tar.gz +4ab36c5d8772567ba09b536e3dd91ddcf253892056751318ccbfce7ac24f0a646bfcd94f5dadc823c9a8394bea9614fede20c1805638052ebdbe7b5bafba4f05 niminst-fix-paths.patch +813eb4cb93b0e9f12cb7666bef65c583390008ec09bc850f43f621688dc809bc51c105898095a8ef6316fbef49ac657a7abc75d74ad7b8cb3919c8f1a721af02 nim-config-fix-paths.patch" |