aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Yam <alex@alexyam.com>2021-02-11 04:07:42 +1100
committerLeo <thinkabit.ukim@gmail.com>2021-02-10 23:44:59 +0000
commit470393910e8107bfecd35811e941e642189bacc3 (patch)
tree9228e78a52e7237884762af092781ca4c1829b3a
parent2127e324c2f822fc730c1315aef3aae8130ddc3a (diff)
downloadaports-470393910e8107bfecd35811e941e642189bacc3.tar.gz
aports-470393910e8107bfecd35811e941e642189bacc3.tar.bz2
aports-470393910e8107bfecd35811e941e642189bacc3.tar.xz
testing/cln: new aport
https://www.ginac.de/CLN/ C++ class library for numbers
-rwxr-xr-xtesting/cln/APKBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/testing/cln/APKBUILD b/testing/cln/APKBUILD
new file mode 100755
index 0000000000..2885bfa4fc
--- /dev/null
+++ b/testing/cln/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Alex Yam <alex@alexyam.com>
+# Maintainer: Alex Yam <alex@alexyam.com>
+pkgname=cln
+pkgver=0_git20210201
+_commit=c4940b353cdffd62979388fbd9e97c841c5a9ecb
+pkgrel=0
+pkgdesc="C++ class library for numbers"
+url="https://www.ginac.de/CLN/"
+#armv7: error ../src/libcln.so.6.0.6: undefined reference to '_divu_16_rest' etc
+arch="all !armv7"
+license="GPL-2.0-or-later"
+makedepends="cmake gmp-dev"
+subpackages="$pkgname-dev $pkgname-doc"
+source="$pkgname-$_commit.tar.gz::https://www.ginac.de/CLN/cln.git/?p=cln.git;a=snapshot;h=$_commit;sf=tgz"
+builddir="$srcdir/$pkgname-${_commit:0:7}"
+
+# asm routines have problems on arm, hppa and sparc
+case $CARCH in
+ arm*) _no_asm=-DNO_ASM;;
+esac
+
+build() {
+ export CPPFLAGS="$CPPFLAGS $_no_asm"
+ # "-B build" leads to error: build/conftest.s cannot be read
+ cmake \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_PREFIX_PATH=/usr \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DCLN_USE_GMP=ON \
+ .
+ cmake --build .
+}
+
+check() {
+ cmake --build . --target check
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --build . --target install
+ cd ./doc && mkdir -pv $pkgdir/usr/share/doc/cln/examples && \
+ cp -rpv ./cln.texi ./polynomial ./ratseries $pkgdir/usr/share/doc/cln/
+ cd ../examples && rm -rv ./C* ./Make* ./cmake* \
+ contfrac e fibonacci legendre lucaslehmer nextprime perfnum pi && \
+ cp -rpv ./* $pkgdir/usr/share/doc/cln/examples
+}
+
+sha512sums="4b919fc2c911ccbeb18e236064a7575a3b85a8654b16366a3822e5e1a8c705875b5bd30d927162c1bb88776701e47390a18a10d811cd1ba258a17675d884bff6 cln-c4940b353cdffd62979388fbd9e97c841c5a9ecb.tar.gz"