aboutsummaryrefslogtreecommitdiffstats
path: root/testing/idris
diff options
context:
space:
mode:
authorMitch Tishmack <mitch.tishmack@gmail.com>2017-01-02 20:28:15 -0600
committerJakub Jirutka <jakub@jirutka.cz>2017-05-17 13:38:42 +0200
commit92cf3505b3a320114e44801ec194ef03da1706a4 (patch)
tree5bcf89da5230077ae5e7b389f135df1add81beb2 /testing/idris
parent08e5b3038ba031cc21a0bd5d46b2a8a8d84b8089 (diff)
downloadaports-92cf3505b3a320114e44801ec194ef03da1706a4.tar.bz2
aports-92cf3505b3a320114e44801ec194ef03da1706a4.tar.xz
testing/idris: new aport
Diffstat (limited to 'testing/idris')
-rwxr-xr-xtesting/idris/APKBUILD69
1 files changed, 69 insertions, 0 deletions
diff --git a/testing/idris/APKBUILD b/testing/idris/APKBUILD
new file mode 100755
index 0000000000..984d1d6f37
--- /dev/null
+++ b/testing/idris/APKBUILD
@@ -0,0 +1,69 @@
+#-*-mode: Shell-script; coding: utf-8;-*-
+# Maintainer: Mitch Tishmack <mitch.tishmack@gmail.com>
+pkgname=idris
+pkgver=1.0
+pkgrel=0
+pkgdesc="A Language with Dependent Types"
+url="http://www.idris-lang.org"
+arch="x86_64 armhf"
+license="bsd3"
+depends="gmp-dev gcc"
+makedepends="ghc cabal libffi-dev ncurses-dev zlib-dev"
+install=""
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/idris-lang/Idris-dev/archive/v$pkgver.tar.gz"
+builddir="$srcdir/Idris-dev-$pkgver"
+
+_home="${builddir}/deps"
+_tmp="${builddir}/tmp"
+prepare() {
+ cd "$builddir"
+ install -dm755 "${_tmp}" "${_home}"
+ (
+ export HOME="${_home}"
+ export TMPDIR="${_tmp}"
+ cabal update
+ cabal install libffi -v
+ cabal install --dependencies-only -v
+ )
+}
+
+build() {
+ cd "$builddir"
+ (
+ export HOME="${_home}"
+ export TMPDIR="${_tmp}"
+ # Note, ordering of prefixes is important
+ cabal configure --prefix='/usr' \
+ --docdir='$prefix/share/doc' \
+ --datadir='$prefix/share' \
+ --htmldir='$docdir/html' \
+ --libdir='$prefix/lib' \
+ --libsubdir="$pkgname" \
+ --datasubdir="$pkgname" \
+ --dynlibdir="$pkgname" \
+ --disable-shared -fGMP -fFFI -fstandalone
+ cabal build
+ )
+}
+
+doc() {
+ default_doc
+ cd "$builddir"
+ install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package() {
+ cd "$builddir"
+ cabal copy --destdir="$pkgdir" || return 1
+ # We don't need the haskell shared libraries or interface files
+ find "$pkgdir" -name "libHSidris*.so" -type f -exec rm {} \;
+ rm -fr "$pkgdir/usr/lib/idris"
+ # Move the docs from where cabal installs them so the doc pkg can
+ # find them
+ install -dm755 "$pkgdir/usr/share/doc/idris"
+ mv "$pkgdir/usr/share/idris/docs" "$pkgdir/usr/share/doc/idris"
+}
+md5sums="bcc928484ce50389464be1e5c9893c9e idris-1.0.tar.gz"
+sha256sums="aaed0d01c0395cb7cac2562f689f8589072ad7568acaeb5e20451ffeebab963e idris-1.0.tar.gz"
+sha512sums="a350004a8510f01d1cc8f965a9a4e2dab219f003980b98354ebb5ae42f73b32c90c98dce193943e9709d994cb92ad35814a46b79412a1afc85d42e1018c6ba10 idris-1.0.tar.gz"