summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/gmp')
-rw-r--r--dev-libs/gmp/Manifest6
-rw-r--r--dev-libs/gmp/files/6.0.0a/gmp-6.0.0a-arm-thumb.diff22
-rw-r--r--dev-libs/gmp/files/6.0.0a/ppc64-build.diff23
-rw-r--r--dev-libs/gmp/files/gmp-6.1.0-tune-printf.patch43
-rw-r--r--dev-libs/gmp/files/gmp-6.1.0-udiv.patch61
-rw-r--r--dev-libs/gmp/gmp-6.0.0a.ebuild114
-rw-r--r--dev-libs/gmp/gmp-6.1.0.ebuild113
-rw-r--r--dev-libs/gmp/gmp-6.1.1.ebuild113
8 files changed, 0 insertions, 495 deletions
diff --git a/dev-libs/gmp/Manifest b/dev-libs/gmp/Manifest
index 39da19435430..71954ddbaf3d 100644
--- a/dev-libs/gmp/Manifest
+++ b/dev-libs/gmp/Manifest
@@ -1,9 +1,3 @@
DIST gmp-4.3.2.tar.bz2 1897483 BLAKE2B 0efecd60c7a585f94ec8cbee77541d409c8e3bdeabaca09f7971560fb0fd504ae8e405256913acbef1434146868885c98068ff59efec92c92fdb73b853cf9396 SHA512 2e0b0fd23e6f10742a5517981e5171c6e88b0a93c83da701b296f5c0861d72c19782daab589a7eac3f9032152a0fc7eff7f5362db8fccc4859564a9aa82329cf
-DIST gmp-6.0.0a.tar.xz 1904112 BLAKE2B eabe9976a7c89e94d9b6aad3c4251f7cbad0f9b8ec597d270cf39d9abbc68207e47604e0ecc1840dbeefb3bd22312cd5451f80046d5a8c577781d2a264b40719 SHA512 50368f4368b244b442438ce1768cf0f1166e490d1bafb8feda1ffc90fea3807e7328f30f3faa861799e4f5ff6e3113049ca3231b2f48571e4583fc3d60441816
-DIST gmp-6.1.0.tar.xz 1950316 BLAKE2B 81303b8c4dc02de202502d7d1e2df5a538ab2ea9bc36b0a0a8c8d030250bf26471e57ecee26144d0758366a8cec8b413dce88e7e1c89f32c7d1f9add1d833d7d SHA512 3647f07914e6c01b28d94f2d9783e50b0ca9f742a694f56d5759e79a057143ded578b71707ff909c6b0f5710862974606461608e73b33af3114b5338670d8630
-DIST gmp-6.1.1.tar.xz 1943164 BLAKE2B 0cc4d8959f03d8f00be4d393b47936f0a056dd2d88c25a4c705779a1175a39028dc987352186d61ebf2a361cdc67a550ec3fb9965708a35dc029b98a3160e96d SHA512 6ead5fdf15891e0c47b094351497a052cc691973f09c60a8322546418eb615bddb180a93fd7846b88b096b5644cb9d375eab2a4a07af64399f5159eccf3edee2
DIST gmp-6.1.2.tar.xz 1946336 BLAKE2B 2a864e80799471037a71c10d871f9782c37fe3a0a1734872e90f14a874ecd6551099d67b2ebd07f82a43b0522249a6b46e79952db11a278f87ca8013198f7604 SHA512 9f098281c0593b76ee174b722936952671fab1dae353ce3ed436a31fe2bc9d542eca752353f6645b7077c1f395ab4fdd355c58e08e2a801368f1375690eee2c6
-DIST gmp-man-6.0.0a.pdf 1187496 BLAKE2B 6d10b139cc9d54a5c5a3264393623dc0d8efa561e0040ceec4ec79abe42172d0244e2917a4399268395defa06739fb04c0b2fc005cb833eede07c34fbffbea23 SHA512 528972502d65d23b58c47a594a628e648f11cc027bd0894a39b8f892bb421ceabb7f35640a9eede21cea791f5f597ed4661a1f73444c56a6fb31fa6e362d96c2
-DIST gmp-man-6.1.0.pdf 825716 BLAKE2B aec5a26abaae4451aad621ee8594f67caf705e6fd730b225ee25dbdd7f4f9fb2447f9234c8763b6f8b2cbd9522b9e1bd6c0c486cf6209bd119884d39178863c1 SHA512 cec172766c6f5dce6b7306edbd542a63788df590391b8b2e6fb4e9d48947b2fbb47dd23acaf74eab6d35cb627bcb804e7ebb1d63aa5f043e4daa4558b698a5a0
-DIST gmp-man-6.1.1.pdf 825669 BLAKE2B c33e5c77069a39f96d1fb27885adf4851ef4bff806f9709f9cc75161d0c00bfe0cda907471e908e9db76ab4c3d5fdcf42e42ef6da93b906d57ab469eecfd5cb3 SHA512 18e6aca87f5ff8848f82456d86233f127328bfbe309e67902c8dd6f25228db344bd3e6cc3a55e48f2c3f19d0a57358bc4ada7cd623799b273030a5119fb1257b
DIST gmp-man-6.1.2.pdf 825720 BLAKE2B b96340da5f534353b140b361fc1ff74757168024e8039d97a0ed1f14d874ff5fbc50abae2ff3505adc51d72e4acf2882ae6ca6405ae37b594f7b248e1ca05247 SHA512 85de10b2c03f7381881c3e95aa7fc53d8e018115028496ffbb5a79ab4967106c69ed7e97a5e434e6bb39752498aade8c2caa7cf77a8942b7ffd9150368a0d9c3
diff --git a/dev-libs/gmp/files/6.0.0a/gmp-6.0.0a-arm-thumb.diff b/dev-libs/gmp/files/6.0.0a/gmp-6.0.0a-arm-thumb.diff
deleted file mode 100644
index 8b10d09395fd..000000000000
--- a/dev-libs/gmp/files/6.0.0a/gmp-6.0.0a-arm-thumb.diff
+++ /dev/null
@@ -1,22 +0,0 @@
-https://gmplib.org/list-archives/gmp-discuss/2014-March/005537.html
-
-# HG changeset patch
-# User Torbjorn Granlund <tege@gmplib.org>
-# Date 1396602422 -7200
-# Node ID 676e2d0f0e4dd301a7066079d2c9326c25c34a40
-# Parent 0194a75b56b21a9196626430af86c5bd9110c42d
-Conditionalise ARM asm on !__thumb__.
-
-diff -r 0194a75b56b2 -r 676e2d0f0e4d mpn/generic/div_qr_1n_pi1.c
---- a/mpn/generic/div_qr_1n_pi1.c Thu Apr 03 23:58:51 2014 +0200
-+++ b/mpn/generic/div_qr_1n_pi1.c Fri Apr 04 11:07:02 2014 +0200
-@@ -130,7 +130,7 @@
- "%2" ((UDItype)(a0)), "r" ((UDItype)(b0)) __CLOBBER_CC)
- #endif
-
--#if defined (__arm__) && W_TYPE_SIZE == 32
-+#if defined (__arm__) && !defined (__thumb__) && W_TYPE_SIZE == 32
- #define add_mssaaaa(m, sh, sl, ah, al, bh, bl) \
- __asm__ ( "adds %2, %5, %6\n\t" \
- "adcs %1, %3, %4\n\t" \
-
diff --git a/dev-libs/gmp/files/6.0.0a/ppc64-build.diff b/dev-libs/gmp/files/6.0.0a/ppc64-build.diff
deleted file mode 100644
index 4d0ec5efcb83..000000000000
--- a/dev-libs/gmp/files/6.0.0a/ppc64-build.diff
+++ /dev/null
@@ -1,23 +0,0 @@
-from upstream
-
-# HG changeset patch
-# User Torbjorn Granlund <tege@gmplib.org>
-# Date 1395835068 -3600
-# Node ID 4a6d258b467f661da0894cc60ecd060f2e3c67c7
-# Parent 301ce2788826a2d4d2725bd5cf01e998638db37a
-Provide default for BMOD_1_TO_MOD_1_THRESHOLD.
-
-diff -r 301ce2788826 -r 4a6d258b467f mpn/powerpc64/mode64/gcd_1.asm
---- a/mpn/powerpc64/mode64/gcd_1.asm Tue Mar 25 15:34:52 2014 +0100
-+++ b/mpn/powerpc64/mode64/gcd_1.asm Wed Mar 26 12:57:48 2014 +0100
-@@ -43,6 +43,9 @@
- define(`n', `r4')
- define(`v0', `r5')
-
-+ifdef(`BMOD_1_TO_MOD_1_THRESHOLD',,
-+ `define(`BMOD_1_TO_MOD_1_THRESHOLD',30)')
-+
- EXTERN_FUNC(mpn_mod_1)
- EXTERN_FUNC(mpn_modexact_1c_odd)
-
-
diff --git a/dev-libs/gmp/files/gmp-6.1.0-tune-printf.patch b/dev-libs/gmp/files/gmp-6.1.0-tune-printf.patch
deleted file mode 100644
index dd9d46ff1bd0..000000000000
--- a/dev-libs/gmp/files/gmp-6.1.0-tune-printf.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-https://gmplib.org/list-archives/gmp-bugs/2016-November/004032.html
-
-From f440c9134fb89cadf54daeb59c7a0feb7470562b Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sat, 26 Nov 2016 16:35:46 -0500
-Subject: [PATCH] tune: fix spurious clock_gettime reference
-
-When running the tune program, the generated gmp-mparam.h header might
-include an invalid line leading to build failures like so:
-In file included from .../gmp-impl.h:145:0,
- from mp_bases.c:4:
-../gmp-mparam.h:1:1: error: unknown type name 'clock_gettime'
- clock_gettime is 1.000ns accurate
-
-This is because the tune source has one printf that is not protected
-by the verbose flag leading it to be written to the output.
-
-Credit to Conrad Kostecki for analysis.
-
-URL: https://bugs.gentoo.org/568320
----
- tune/time.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/tune/time.c b/tune/time.c
-index e0d262096396..d1efb0a6d35d 100644
---- a/tune/time.c
-+++ b/tune/time.c
-@@ -773,8 +773,9 @@ cgt_works_p (void)
- }
-
- cgt_unittime = unit.tv_sec + unit.tv_nsec * 1e-9;
-- printf ("clock_gettime is %s accurate\n",
-- unittime_string (cgt_unittime));
-+ if (speed_option_verbose)
-+ printf ("clock_gettime is %s accurate\n",
-+ unittime_string (cgt_unittime));
-
- if (cgt_unittime < 10e-9)
- {
---
-2.11.0.rc2
-
diff --git a/dev-libs/gmp/files/gmp-6.1.0-udiv.patch b/dev-libs/gmp/files/gmp-6.1.0-udiv.patch
deleted file mode 100644
index 3a6e8072b44a..000000000000
--- a/dev-libs/gmp/files/gmp-6.1.0-udiv.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-https://gmplib.org/list-archives/gmp-bugs/2016-November/004031.html
-
-From dadb1954c8305ea7c7d61d30f7c6338024702280 Mon Sep 17 00:00:00 2001
-From: Torbjorn Granlund <tg@gmplib.org>
-Date: Sat, 26 Nov 2016 02:58:34 +0100
-Subject: [PATCH] Conditionalise udiv_w_sdiv inclusion on --enable-assembly.
-
----
- configure.ac | 16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 689e137f24c2..66c8b057574f 100644
---- a/configure
-+++ b/configure
-@@ -1269,7 +1269,9 @@ case $host in
- AC_DEFINE(HAVE_HOST_CPU_FAMILY_power)
- HAVE_HOST_CPU_FAMILY_power=1
- cclist="gcc"
-- extra_functions="udiv_w_sdiv"
-+ if test "$enable_assembly" = "yes" ; then
-+ extra_functions="udiv_w_sdiv"
-+ fi
- path="power"
-
- # gcc 2.7.2 knows rios1, rios2, rsc
-@@ -1306,7 +1308,9 @@ case $host in
- gcc_cflags="$gcc_cflags $fomit_frame_pointer"
- gcc_cflags_optlist="arch"
- path="s390_32"
-- extra_functions="udiv_w_sdiv"
-+ if test "$enable_assembly" = "yes" ; then
-+ extra_functions="udiv_w_sdiv"
-+ fi
- gcc_32_cflags_maybe="-m31"
-
- case $host_cpu in
-@@ -1603,14 +1607,18 @@ case $host in
- GMP_INCLUDE_MPN(vax/elf.m4)
- gcc_cflags="$gcc_cflags $fomit_frame_pointer"
- path="vax"
-- extra_functions="udiv_w_sdiv"
-+ if test "$enable_assembly" = "yes" ; then
-+ extra_functions="udiv_w_sdiv"
-+ fi
- ;;
- vax*-*-*)
- # Default to aout conventions (i.e., no register prefix, '_' global prefix)
- #
- gcc_cflags="$gcc_cflags $fomit_frame_pointer"
- path="vax"
-- extra_functions="udiv_w_sdiv"
-+ if test "$enable_assembly" = "yes" ; then
-+ extra_functions="udiv_w_sdiv"
-+ fi
- ;;
-
-
---
-2.11.0.rc2
-
diff --git a/dev-libs/gmp/gmp-6.0.0a.ebuild b/dev-libs/gmp/gmp-6.0.0a.ebuild
deleted file mode 100644
index 84c305ca602a..000000000000
--- a/dev-libs/gmp/gmp-6.0.0a.ebuild
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit eutils libtool toolchain-funcs multilib-minimal
-
-MY_PV=${PV/_p*}
-MY_P=${PN}-${MY_PV}
-PLEVEL=${PV/*p}
-DESCRIPTION="Library for arbitrary-precision arithmetic on different type of numbers"
-HOMEPAGE="https://gmplib.org/"
-SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
- ftp://ftp.gmplib.org/pub/${MY_P}/${MY_P}.tar.xz
- doc? ( https://gmplib.org/${PN}-man-${MY_PV}.pdf )"
-
-LICENSE="|| ( LGPL-3+ GPL-2+ )"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="doc cxx pgo static-libs"
-
-DEPEND="sys-devel/m4
- app-arch/xz-utils"
-RDEPEND=""
-
-S=${WORKDIR}/${MY_P%a}
-
-DOCS=( AUTHORS ChangeLog NEWS README doc/configuration doc/isa_abi_headache )
-HTML_DOCS=( doc )
-MULTILIB_WRAPPED_HEADERS=( /usr/include/gmp.h )
-
-src_prepare() {
- [[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
-
- # note: we cannot run autotools here as gcc depends on this package
- elibtoolize
-
- # GMP uses the "ABI" env var during configure as does Gentoo (econf).
- # So, to avoid patching the source constantly, wrap things up.
- mv configure configure.wrapped || die
- cat <<-\EOF > configure
- #!/bin/sh
- exec env ABI="${GMPABI}" "$0.wrapped" "$@"
- EOF
- # Patches to original configure might have lost the +x bit.
- chmod a+rx configure{,.wrapped}
-}
-
-multilib_src_configure() {
- # Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
- # https://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
- if [[ ${CHOST} == hppa2.0-* ]] ; then
- GMPABI="1.0"
- fi
-
- # ABI mappings (needs all architectures supported)
- case ${ABI} in
- 32|x86) GMPABI=32;;
- 64|amd64|n64) GMPABI=64;;
- [onx]32) GMPABI=${ABI};;
- esac
- export GMPABI
-
- tc-export CC
- ECONF_SOURCE="${S}" econf \
- --localstatedir=/var/state/gmp \
- --enable-shared \
- $(use_enable cxx) \
- $(use_enable static-libs static)
-}
-
-multilib_src_compile() {
- emake
-
- if use pgo ; then
- emake -j1 -C tune tuneup
- ebegin "Trying to generate tuned data"
- ./tune/tuneup | tee gmp.mparam.h.new
- if eend $(( 0 + ${PIPESTATUS[*]/#/+} )) ; then
- mv gmp.mparam.h.new gmp-mparam.h || die
- emake clean
- emake
- fi
- fi
-}
-
-multilib_src_test() {
- emake check
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- # should be a standalone lib
- rm -f "${D}"/usr/$(get_libdir)/libgmp.la
- # this requires libgmp
- local la="${D}/usr/$(get_libdir)/libgmpxx.la"
- use static-libs \
- && sed -i 's:/[^ ]*/libgmp.la:-lgmp:' "${la}" \
- || rm -f "${la}"
-}
-
-multilib_src_install_all() {
- einstalldocs
- use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${D}"/usr/share/doc/${PF}/
-}
-
-pkg_preinst() {
- preserve_old_lib /usr/$(get_libdir)/libgmp.so.3
-}
-
-pkg_postinst() {
- preserve_old_lib_notify /usr/$(get_libdir)/libgmp.so.3
-}
diff --git a/dev-libs/gmp/gmp-6.1.0.ebuild b/dev-libs/gmp/gmp-6.1.0.ebuild
deleted file mode 100644
index c679c5b9630e..000000000000
--- a/dev-libs/gmp/gmp-6.1.0.ebuild
+++ /dev/null
@@ -1,113 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit flag-o-matic eutils libtool multilib-minimal
-
-MY_PV=${PV/_p*}
-MY_PV=${MY_PV/_/-}
-MY_P=${PN}-${MY_PV}
-PLEVEL=${PV/*p}
-DESCRIPTION="Library for arbitrary-precision arithmetic on different type of numbers"
-HOMEPAGE="https://gmplib.org/"
-SRC_URI="ftp://ftp.gmplib.org/pub/${MY_P}/${MY_P}.tar.xz
- mirror://gnu/${PN}/${MY_P}.tar.xz
- doc? ( https://gmplib.org/${PN}-man-${MY_PV}.pdf )"
-
-LICENSE="|| ( LGPL-3+ GPL-2+ )"
-# The subslot reflects the C & C++ SONAMEs.
-SLOT="0/10.4"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="+asm doc cxx pgo static-libs"
-
-DEPEND="sys-devel/m4
- app-arch/xz-utils"
-RDEPEND=""
-
-S=${WORKDIR}/${MY_P%a}
-
-DOCS=( AUTHORS ChangeLog NEWS README doc/configuration doc/isa_abi_headache )
-HTML_DOCS=( doc )
-MULTILIB_WRAPPED_HEADERS=( /usr/include/gmp.h )
-
-src_prepare() {
- [[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
- epatch "${FILESDIR}"/${PN}-6.1.0-udiv.patch
- epatch "${FILESDIR}"/${PN}-6.1.0-tune-printf.patch
-
- # note: we cannot run autotools here as gcc depends on this package
- elibtoolize
-
- epatch "${FILESDIR}"/${PN}-6.1.0-noexecstack-detect.patch
-
- # GMP uses the "ABI" env var during configure as does Gentoo (econf).
- # So, to avoid patching the source constantly, wrap things up.
- mv configure configure.wrapped || die
- cat <<-\EOF > configure
- #!/bin/sh
- exec env ABI="${GMPABI}" "$0.wrapped" "$@"
- EOF
- # Patches to original configure might have lost the +x bit.
- chmod a+rx configure{,.wrapped}
-}
-
-multilib_src_configure() {
- # Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
- # https://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
- if [[ ${CHOST} == hppa2.0-* ]] ; then
- GMPABI="1.0"
- fi
-
- # ABI mappings (needs all architectures supported)
- case ${ABI} in
- 32|x86) GMPABI=32;;
- 64|amd64|n64) GMPABI=64;;
- [onx]32) GMPABI=${ABI};;
- esac
- export GMPABI
-
- tc-export CC
- ECONF_SOURCE="${S}" econf \
- --localstatedir="${EPREFIX}"/var/state/gmp \
- --enable-shared \
- $(use_enable asm assembly) \
- $(use_enable cxx) \
- $(use_enable static-libs static)
-}
-
-multilib_src_compile() {
- emake
-
- if use pgo ; then
- emake -j1 -C tune tuneup
- ebegin "Trying to generate tuned data"
- ./tune/tuneup | tee gmp.mparam.h.new
- if eend $(( 0 + ${PIPESTATUS[*]/#/+} )) ; then
- mv gmp.mparam.h.new gmp-mparam.h || die
- emake clean
- emake
- fi
- fi
-}
-
-multilib_src_test() {
- emake check
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- # should be a standalone lib
- rm -f "${D}"/usr/$(get_libdir)/libgmp.la
- # this requires libgmp
- local la="${D}/usr/$(get_libdir)/libgmpxx.la"
- use static-libs \
- && sed -i 's:/[^ ]*/libgmp.la:-lgmp:' "${la}" \
- || rm -f "${la}"
-}
-
-multilib_src_install_all() {
- einstalldocs
- use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${D}"/usr/share/doc/${PF}/
-}
diff --git a/dev-libs/gmp/gmp-6.1.1.ebuild b/dev-libs/gmp/gmp-6.1.1.ebuild
deleted file mode 100644
index a8231bd54b5c..000000000000
--- a/dev-libs/gmp/gmp-6.1.1.ebuild
+++ /dev/null
@@ -1,113 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit flag-o-matic eutils libtool multilib-minimal
-
-MY_PV=${PV/_p*}
-MY_PV=${MY_PV/_/-}
-MY_P=${PN}-${MY_PV}
-PLEVEL=${PV/*p}
-DESCRIPTION="Library for arbitrary-precision arithmetic on different type of numbers"
-HOMEPAGE="https://gmplib.org/"
-SRC_URI="ftp://ftp.gmplib.org/pub/${MY_P}/${MY_P}.tar.xz
- mirror://gnu/${PN}/${MY_P}.tar.xz
- doc? ( https://gmplib.org/${PN}-man-${MY_PV}.pdf )"
-
-LICENSE="|| ( LGPL-3+ GPL-2+ )"
-# The subslot reflects the C & C++ SONAMEs.
-SLOT="0/10.4"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="+asm doc cxx pgo static-libs"
-
-DEPEND="sys-devel/m4
- app-arch/xz-utils"
-RDEPEND=""
-
-S=${WORKDIR}/${MY_P%a}
-
-DOCS=( AUTHORS ChangeLog NEWS README doc/configuration doc/isa_abi_headache )
-HTML_DOCS=( doc )
-MULTILIB_WRAPPED_HEADERS=( /usr/include/gmp.h )
-
-src_prepare() {
- [[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
- epatch "${FILESDIR}"/${PN}-6.1.0-udiv.patch
- epatch "${FILESDIR}"/${PN}-6.1.0-tune-printf.patch
-
- # note: we cannot run autotools here as gcc depends on this package
- elibtoolize
-
- epatch "${FILESDIR}"/${PN}-6.1.0-noexecstack-detect.patch
-
- # GMP uses the "ABI" env var during configure as does Gentoo (econf).
- # So, to avoid patching the source constantly, wrap things up.
- mv configure configure.wrapped || die
- cat <<-\EOF > configure
- #!/bin/sh
- exec env ABI="${GMPABI}" "$0.wrapped" "$@"
- EOF
- # Patches to original configure might have lost the +x bit.
- chmod a+rx configure{,.wrapped}
-}
-
-multilib_src_configure() {
- # Because of our 32-bit userland, 1.0 is the only HPPA ABI that works
- # https://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613)
- if [[ ${CHOST} == hppa2.0-* ]] ; then
- GMPABI="1.0"
- fi
-
- # ABI mappings (needs all architectures supported)
- case ${ABI} in
- 32|x86) GMPABI=32;;
- 64|amd64|n64) GMPABI=64;;
- [onx]32) GMPABI=${ABI};;
- esac
- export GMPABI
-
- tc-export CC
- ECONF_SOURCE="${S}" econf \
- --localstatedir="${EPREFIX}"/var/state/gmp \
- --enable-shared \
- $(use_enable asm assembly) \
- $(use_enable cxx) \
- $(use_enable static-libs static)
-}
-
-multilib_src_compile() {
- emake
-
- if use pgo ; then
- emake -j1 -C tune tuneup
- ebegin "Trying to generate tuned data"
- ./tune/tuneup | tee gmp.mparam.h.new
- if eend $(( 0 + ${PIPESTATUS[*]/#/+} )) ; then
- mv gmp.mparam.h.new gmp-mparam.h || die
- emake clean
- emake
- fi
- fi
-}
-
-multilib_src_test() {
- emake check
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- # should be a standalone lib
- rm -f "${D}"/usr/$(get_libdir)/libgmp.la
- # this requires libgmp
- local la="${D}/usr/$(get_libdir)/libgmpxx.la"
- use static-libs \
- && sed -i 's:/[^ ]*/libgmp.la:-lgmp:' "${la}" \
- || rm -f "${la}"
-}
-
-multilib_src_install_all() {
- einstalldocs
- use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${D}"/usr/share/doc/${PF}/
-}