aboutsummaryrefslogtreecommitdiffstats
path: root/main/gmp5/APKBUILD
blob: 191e6609b7f5ab5acf478b09948fd76521694560 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_name=gmp
pkgname=${_name}5

pkgver=5.0.1
pkgrel=2
pkgdesc="A free library for arbitrary precision arithmetic"
url="http://gmplib.org/"
arch="all"
license="LGPL3"
makedepends="m4 texinfo"
depends=
subpackages="$pkgname-doc gmp-dev libgmpxx"
source="ftp://ftp.gnu.org/gnu/gmp/gmp-$pkgver.tar.bz2
	gmp-4.1.4-noexecstack.patch
	"

_builddir="$srcdir"/$_name-$pkgver
build() {
	cd "$_builddir"
	patch -p1 < "$srcdir"/gmp-4.1.4-noexecstack.patch || return 1

	./configure --prefix=/usr \
		--build=${CBUILD} \
		--host=${CHOST} \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man \
		--localstatedir=/var/state/gmp \
		--enable-mpbsd \
		--enable-cxx  \
		--with-pic \
		|| return 1

	make || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="${pkgdir}" install || return 1
}

dev() {
	replaces="gmp gmp5-dev"
	default_dev
}

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

md5sums="6bac6df75c192a13419dfd71d19240a7  gmp-5.0.1.tar.bz2
13c34f00e77ded6673270cfea06c35c3  gmp-4.1.4-noexecstack.patch"