From 470393910e8107bfecd35811e941e642189bacc3 Mon Sep 17 00:00:00 2001 From: Alex Yam Date: Thu, 11 Feb 2021 04:07:42 +1100 Subject: testing/cln: new aport https://www.ginac.de/CLN/ C++ class library for numbers --- testing/cln/APKBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 testing/cln/APKBUILD diff --git a/testing/cln/APKBUILD b/testing/cln/APKBUILD new file mode 100755 index 00000000000..2885bfa4fcb --- /dev/null +++ b/testing/cln/APKBUILD @@ -0,0 +1,48 @@ +# Contributor: Alex Yam +# Maintainer: Alex Yam +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" -- cgit v1.2.3