summaryrefslogtreecommitdiff
path: root/system/gmp/APKBUILD
blob: 69f4b2c9c979e2b2376c8a0b77525bf6bc151dc4 (plain) (blame)
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
# Maintainer: Adelie Platform Group <adelie-devel@lists.adelielinux.org>
pkgname=gmp
pkgver=6.1.2
pkgrel=1
pkgdesc="A free library for arbitrary precision arithmetic"
url="https://gmplib.org/"
arch="all"
license="LGPL-3.0+ OR GPL-2.0+"
makedepends="m4 texinfo libtool"
depends=
subpackages="$pkgname-doc $pkgname-dev libgmpxx"
source="https://gmplib.org/download/gmp/gmp-$pkgver.tar.xz
	"

prepare() {
	cd "$builddir"
	default_prepare
	# force update to libtool with fixed cross-build support
	libtoolize -f
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--with-sysroot=$CBUILDROOT \
		--prefix=/usr \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man \
		--localstatedir=/var/state/gmp \
		--enable-cxx \
		--with-pic
	make
}

package() {
	cd "$builddir"
	make -j1 DESTDIR="${pkgdir}" install
}

check() {
	cd "$builddir"
	[ "$CBUILD" = "$CHOST" ] && make check
}

libgmpxx() {
	pkgdesc="C++ support for gmp"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/libgmpxx.so.* "$subpkgdir"/usr/lib/
}

sha512sums="9f098281c0593b76ee174b722936952671fab1dae353ce3ed436a31fe2bc9d542eca752353f6645b7077c1f395ab4fdd355c58e08e2a801368f1375690eee2c6  gmp-6.1.2.tar.xz"