aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libeantic/APKBUILD
blob: 4e5ab08e273cbc18e90da120277cfe9dbe09b34e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Contributor: Jakob Meier <comcloudway@ccw.icu>
# Maintainer: Jakob Meier <comcloudway@ccw.icu>
pkgname=libeantic
pkgver=2.0.2
pkgrel=0
pkgdesc="Embedded algebraic number fields"
url="https://github.com/flatsurf/e-antic"
arch="all !s390x" # flint-dev
license="LGPL-3.0-or-later"
makedepends="
	autoconf
	automake
	boost-dev
	flint-dev
	gmp-dev
	libantic-dev
	libarb-dev
	libtool
	mpfr-dev
	py3-setuptools
	"
subpackages="$pkgname-dev"
# todo
# subpackages="$pkgname-dev py3-pyeantic:py3"
source="e-antic-$pkgver.tar.gz::https://github.com/flatsurf/e-antic/releases/download/$pkgver/e-antic-$pkgver.tar.gz
	t-init-test.patch
	"
builddir="$srcdir/e-antic-$pkgver"

build() {
	# better math opts
	export CFLAGS="$CFLAGS -O3 -flto=auto"
	export CXXFLAGS="$CXXFLAGS -O3 -flto=auto"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--without-benchmark \
		--without-byexample \
		--without-pytest \
		--without-doc \
		--disable-dependency-tracking \
		--disable-static

	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install

	# requires py3-cppyy
	rm -r "$pkgdir"/usr/lib/python3*
}

py3() {
	pkgdesc="$pkgdesc (python module)"
	depends="python3 py3-cppyy"

	amove usr/lib/python*
}

sha512sums="
2c13e8498d3fa21265749f3cc9448737ef0c55cc4f2bf71834e9a6c6816280782cd96e96f4cb33d5b4c0c14208f9a9004bdf21fb4b70dd39425cce6efbe111ee  e-antic-2.0.2.tar.gz
ecb0c89612c1ab2c7d2c8a2feaacf94958994f34e6ce664dd6c9e054d0b244a0f6e9e510149d98b7603b7003e0532f81d43d1fb17dcb8106e540d0c0b060ef63  t-init-test.patch
"