diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-09-24 20:12:17 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-09-24 20:12:52 +0200 |
commit | 4f6cc245cde829c225b0bc6f0b1daefcd07129eb (patch) | |
tree | 45d6fd0de1f9b14f5f8265257c01b764c71d7a9b /community/arpack | |
parent | 15f79028b07da93ee902b5ad09ad15da5e3bb3ab (diff) | |
download | aports-4f6cc245cde829c225b0bc6f0b1daefcd07129eb.tar.bz2 aports-4f6cc245cde829c225b0bc6f0b1daefcd07129eb.tar.xz |
community/arpack: add subpackage -ilp64
Diffstat (limited to 'community/arpack')
-rw-r--r-- | community/arpack/APKBUILD | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/community/arpack/APKBUILD b/community/arpack/APKBUILD index 0960a9a17c..8282e98c73 100644 --- a/community/arpack/APKBUILD +++ b/community/arpack/APKBUILD @@ -3,7 +3,7 @@ pkgname=arpack _pkgname=$pkgname-ng pkgver=3.4.0 -pkgrel=0 +pkgrel=1 pkgdesc="Collection of Fortran77 subroutines designed to solve large scale eigenvalue problems" url="https://github.com/opencollab/arpack-ng" arch="all" @@ -15,36 +15,70 @@ subpackages="$pkgname-dev $pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/opencollab/$_pkgname/archive/$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" +_ilp64=no +_builddir64="$builddir-64" +if [ "$CARCH" = "x86_64" ]; then + subpackages="$subpackages $pkgname-ilp64" + _ilp64=yes +fi + prepare() { default_prepare || return 1 - cd "$builddir" + ./bootstrap + cp -ar "$builddir" "$_builddir64" } build() { cd "$builddir" + _build || return 1 + + if [ "$_ilp64" = yes ]; then + msg "Building with ILP64..." + + cd "$builddir-64" + _build LIBSUFFIX=64_ \ + SYMBOLSUFFIX=_64 \ + INTERFACE64=1 \ + --with-blas=openblas64_ \ + --with-lapack=openblas64_ \ + || return 1 + fi +} +_build() { ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ - --localstatedir=/var \ - || return 1 + "$@" || return 1 make } package() { - cd "$builddir" + if [ "$_ilp64" = yes ]; then + make -C "$_builddir64" DESTDIR="$pkgdir" install || return 1 + fi + cd "$builddir" make DESTDIR="$pkgdir" install || return 1 - install -D -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" || return 1 + install -D -m644 COPYING \ + "$pkgdir/usr/share/licenses/$pkgname/COPYING" || return 1 install -d "$pkgdir"/usr/share/doc/$pkgname || return 1 mv DOCUMENTS/* "$pkgdir"/usr/share/doc/$pkgname/ } +ilp64() { + pkgdesc="$pkgdesc (ILP64)" + arch="x86_64" + + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libarpack64_* "$subpkgdir"/usr/lib/ +} + md5sums="ae9ca13f2143a7ea280cb0e2fd4bfae4 arpack-3.4.0.tar.gz" sha256sums="69e9fa08bacb2475e636da05a6c222b17c67f1ebeab3793762062248dd9d842f arpack-3.4.0.tar.gz" sha512sums="4577a960ed0783ed2c0eb5e1871c21b9e23e75fbbfa10da1584cd3716f2699c0d633bb0e2019c0aa8809917684ef18d32508b76cb1edfc62b1179d5bbc2b68ba arpack-3.4.0.tar.gz" |