aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Yam <alex@alexyam.com>2021-02-08 21:58:23 +1100
committerLeo <thinkabit.ukim@gmail.com>2021-02-09 12:13:26 +0000
commitf9ea19a05ba3e385f2d3adc2e656886e3df5c010 (patch)
tree82e3efccee580a9c934fc8170133754cf54cbc08
parentfd3d9771428706de0ea0749255b0c8e47607d363 (diff)
downloadaports-f9ea19a05ba3e385f2d3adc2e656886e3df5c010.tar.gz
aports-f9ea19a05ba3e385f2d3adc2e656886e3df5c010.tar.bz2
aports-f9ea19a05ba3e385f2d3adc2e656886e3df5c010.tar.xz
testing/libtommath: new aport
https://www.libtom.net/LibTomMath/ number theoretic multiple-precision integer library
-rw-r--r--testing/libtommath/APKBUILD39
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/libtommath/APKBUILD b/testing/libtommath/APKBUILD
new file mode 100644
index 0000000000..dd13f8b118
--- /dev/null
+++ b/testing/libtommath/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Alex Yam <alex@alexyam.com>
+# Maintainer: Alex Yam <alex@alexyam.com>
+pkgname=libtommath
+pkgver=0_git20210103
+_commit=eda0bd6ae5705ab90b866dfb52c5f15c23687f81
+pkgrel=0
+pkgdesc="number theoretic multiple-precision integer library"
+url="https://www.libtom.net/LibTomMath/"
+# arch: all except x86 and x86_64 failed 2 tests:
+# test_mp_sqrtmod_prime, line 726: DO(mp_sqrtmod_prime(&b, &a, &c)) failed: Value out of range
+# test_mp_kronecker, line 345: EXPECT(i == kronecker[cnt].c[m + 10]) failed
+arch="all !armhf !armv7 !aarch64 !ppc64le !s390x !mips !mips64"
+license="Unlicense"
+makedepends="libtool"
+checkdepends="coreutils" # Using BusyBox's "timeout" resulted in - unrecognized option: foreground
+subpackages="$pkgname-dev"
+source="$pkgname-$_commit.tar.gz::https://github.com/libtom/libtommath/archive/$_commit.tar.gz"
+builddir=$srcdir/$pkgname-$_commit
+
+build() {
+ make -f makefile.shared
+}
+
+check() {
+ # testme.sh runs its own CC and make
+ # resulting in .lo files in $builddir that break package() with error:
+ # "libtool: error: 'mp_2expt.lo' is not a valid libtool object"
+ # clone $builddir to testdir for running testme.sh
+ cp -rp $builddir $builddir/../testdir
+ cd $builddir/../testdir
+ ./testme.sh
+ cat test_gcc.log
+}
+
+package() {
+ make DESTDIR="$pkgdir" LIBPATH=/usr/lib INCPATH=/usr/include -f makefile.shared install
+}
+
+sha512sums="f5307463d7b9854c9867a58ca07941eba6108a04e29cb750ef156c7950798bf5cbab199c6d1f549b8d4fd6e8ba95b4581b10883ef7b4a3b00d57819600b521e4 libtommath-eda0bd6ae5705ab90b866dfb52c5f15c23687f81.tar.gz"