summaryrefslogtreecommitdiff
path: root/system/gmp
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-14 02:22:19 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-14 02:22:56 -0500
commitb1eb50599e4db7eb4501af75cbbfa22007081ea5 (patch)
treec94a34c882cc17adedd781e8c5f34349b2a62416 /system/gmp
parentb9e85bbdcf38547ef2ca4e5c2a6e6293bbcd2752 (diff)
downloadpackages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.tar.gz
packages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.tar.bz2
packages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.tar.xz
packages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.zip
The New Plan
all pkgs needed to bootstrap -> system others -> user
Diffstat (limited to 'system/gmp')
-rw-r--r--system/gmp/APKBUILD61
-rw-r--r--system/gmp/gmp-4.1.4-noexecstack.patch20
2 files changed, 81 insertions, 0 deletions
diff --git a/system/gmp/APKBUILD b/system/gmp/APKBUILD
new file mode 100644
index 000000000..225e7b6a0
--- /dev/null
+++ b/system/gmp/APKBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.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"
+makedepends="m4 texinfo libtool"
+depends=
+subpackages="$pkgname-doc $pkgname-dev libgmpxx"
+source="https://gmplib.org/download/gmp/gmp-$pkgver.tar.xz
+ "
+replaces="gmp5"
+
+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/
+}
+
+doc() {
+ default_doc
+ replaces="gmp5-doc"
+}
+
+md5sums="f58fa8001d60c4c77595fbbb62b63c1d gmp-6.1.2.tar.xz"
+sha256sums="87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912 gmp-6.1.2.tar.xz"
+sha512sums="9f098281c0593b76ee174b722936952671fab1dae353ce3ed436a31fe2bc9d542eca752353f6645b7077c1f395ab4fdd355c58e08e2a801368f1375690eee2c6 gmp-6.1.2.tar.xz"
diff --git a/system/gmp/gmp-4.1.4-noexecstack.patch b/system/gmp/gmp-4.1.4-noexecstack.patch
new file mode 100644
index 000000000..093bec1a5
--- /dev/null
+++ b/system/gmp/gmp-4.1.4-noexecstack.patch
@@ -0,0 +1,20 @@
+fixed executable stack
+
+http://bugs.gentoo.org/115038
+
+--- gmp-4.1.4/configure
++++ gmp-4.1.4/configure
+@@ -21689,6 +21689,13 @@
+ fi
+ echo "')" >> $gmp_configm4
+ echo "define(\`__CONFIG_M4_INCLUDED__')" >> $gmp_configm4
++# Gentoo hack
++case $host_os in
++ *linux*)
++ echo '.section .note.GNU-stack,"",%progbits' >> $gmp_configm4
++ echo '.previous' >> $gmp_configm4
++ ;;
++esac
+
+ # Create Makefiles
+ # FIXME: Upcoming version of autoconf/automake may not like broken lines.