blob: 9893ada6fdcf744b816576a5f552928f874d1d39 (
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
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_name=gmp
pkgname=${_name}5
pkgver=5.1.2
pkgrel=0
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
prepare() {
cd "$_builddir"
patch -p1 < "$srcdir"/gmp-4.1.4-noexecstack.patch || return 1
sed -i -e "/# We cannot seem to hardcode it, guess we'll fake it./"'{ n; s/add_dir="-L$libdir"/add_dir="-L$lt_sysroot$libdir"/ }' ltmain.sh || return 1
}
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 \
|| return 1
make || return 1
}
package() {
cd "$_builddir"
make -j1 DESTDIR="${pkgdir}" install || return 1
rm "$pkgdir"/usr/lib/*.la || 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="7e3516128487956cd825fef01aafe4bc gmp-5.1.2.tar.bz2
13c34f00e77ded6673270cfea06c35c3 gmp-4.1.4-noexecstack.patch"
sha256sums="2099deea64ef3e58ac2b42eaaa0286c3231430a8e893359d806bfa31611c1b8f gmp-5.1.2.tar.bz2
68601777151a1628d7bc839eddd037685c5d2e76c9453166890a5eb3cf6000c3 gmp-4.1.4-noexecstack.patch"
sha512sums="614bed61f34695744f8ee1e9e2f3a65d808bc1362bcbadccf222775b57ba60cccaeae521adf583e75f29d172c496e6745e5a356fd86ac815612b4225fdfcccf6 gmp-5.1.2.tar.bz2
74b8b68061a1a5ac0f8b163974834465e86e930884e1a9cd15c4c948fdae95ffdcbb6e0210d56df6d0dcf1ccbe13dbdfe45552e645c3fdea6454747731b63bc8 gmp-4.1.4-noexecstack.patch"
|