diff options
-rw-r--r-- | dev-libs/gmp/Manifest | 2 | ||||
-rw-r--r-- | dev-libs/gmp/gmp-6.1.2.ebuild | 111 |
2 files changed, 113 insertions, 0 deletions
diff --git a/dev-libs/gmp/Manifest b/dev-libs/gmp/Manifest index c192f570fd15..d174f8dd0c38 100644 --- a/dev-libs/gmp/Manifest +++ b/dev-libs/gmp/Manifest @@ -2,6 +2,8 @@ DIST gmp-4.3.2.tar.bz2 1897483 SHA256 936162c0312886c21581002b79932829aa048cfaf9 DIST gmp-6.0.0a.tar.xz 1904112 SHA256 9156d32edac6955bc53b0218f5f3763facb890b73a835d5e1b901dcf8eb8b764 SHA512 50368f4368b244b442438ce1768cf0f1166e490d1bafb8feda1ffc90fea3807e7328f30f3faa861799e4f5ff6e3113049ca3231b2f48571e4583fc3d60441816 WHIRLPOOL 81639a9d433ce9ccb26527af309c7c41437bb3463e5986cce3b35f81b527068a2304ec3287e660454f850dedab61463a077f49d4ea2b7ee87eec94b15730c394 DIST gmp-6.1.0.tar.xz 1950316 SHA256 68dadacce515b0f8a54f510edf07c1b636492bcdb8e8d54c56eb216225d16989 SHA512 3647f07914e6c01b28d94f2d9783e50b0ca9f742a694f56d5759e79a057143ded578b71707ff909c6b0f5710862974606461608e73b33af3114b5338670d8630 WHIRLPOOL 54de621aa9d7c6896fe454e399b8716743d7ac41e312180f8211c961ec8eb358423e75992aa22ee6809ae57cb143783d271e5c0fca61714a556a12ee55882a05 DIST gmp-6.1.1.tar.xz 1943164 SHA256 d36e9c05df488ad630fff17edb50051d6432357f9ce04e34a09b3d818825e831 SHA512 6ead5fdf15891e0c47b094351497a052cc691973f09c60a8322546418eb615bddb180a93fd7846b88b096b5644cb9d375eab2a4a07af64399f5159eccf3edee2 WHIRLPOOL 0a899c6d414e5d6e0b4d2e8fa45baa74adbcaee8960bbb6a8beb8a2e76baa85f07f8fc198e941ed386cffdf73bdf7ef44be7312c39b786a6584410e86bc887b5 +DIST gmp-6.1.2.tar.xz 1946336 SHA256 87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912 SHA512 9f098281c0593b76ee174b722936952671fab1dae353ce3ed436a31fe2bc9d542eca752353f6645b7077c1f395ab4fdd355c58e08e2a801368f1375690eee2c6 WHIRLPOOL 1f4be0fcb5868cc5e3f5e699e51da0d52cdb131906468f5401a40ae145dad2d48935b87330b786fff2a2f593d6f39542c4d5fb7bef5922817ae61ff57870951d DIST gmp-man-6.0.0a.pdf 1187496 SHA256 b38ed1d760b20c01b734b65380ab667373fa48d8203f762a434cd3f326c67a38 SHA512 528972502d65d23b58c47a594a628e648f11cc027bd0894a39b8f892bb421ceabb7f35640a9eede21cea791f5f597ed4661a1f73444c56a6fb31fa6e362d96c2 WHIRLPOOL e6c4eb3a9adc82496a1872223ceb153e05c3aabd2323aeb38064739a5200eb8fc24fa3bb96f5fb1e632cc90a2576bd3966bae3c7a7a0c750ca56faeb30837eea DIST gmp-man-6.1.0.pdf 825716 SHA256 c3fea59f39497839b48010e612d0ef898c3efea9c0601a3b4d1597628c8ea40e SHA512 cec172766c6f5dce6b7306edbd542a63788df590391b8b2e6fb4e9d48947b2fbb47dd23acaf74eab6d35cb627bcb804e7ebb1d63aa5f043e4daa4558b698a5a0 WHIRLPOOL afe825c4dbbde11c2c013d6aa3e168d6e59743f647269487df2679d944b5aa748319e455211f2c20137f56e7177ea0543182a4f5bef8274b205b0a3c03254c81 DIST gmp-man-6.1.1.pdf 825669 SHA256 f0c87df68a1d6f01c434253986541107a65f350b5388f2b1a1b405f7e06921f2 SHA512 18e6aca87f5ff8848f82456d86233f127328bfbe309e67902c8dd6f25228db344bd3e6cc3a55e48f2c3f19d0a57358bc4ada7cd623799b273030a5119fb1257b WHIRLPOOL ff3ce6f16ae7a1c7954c432d28a88f6abebae769be9a63ca85f481fb85dd3e0e5d691cb4d9b9aec1ad7e2387167eef8413277698dc2d7cbd3b941759979ef6d9 +DIST gmp-man-6.1.2.pdf 825720 SHA256 f78f18ac0b0e56920920af0209415a4b371b7b101ceaa03739a31bfe3c2888f8 SHA512 85de10b2c03f7381881c3e95aa7fc53d8e018115028496ffbb5a79ab4967106c69ed7e97a5e434e6bb39752498aade8c2caa7cf77a8942b7ffd9150368a0d9c3 WHIRLPOOL d952544d178c7d970ec3c1b080191603326a2c77523c27f03f80bc03b9a8910a0093c3f6990640aa596d45adb8fa34a7ef3c9c35abf60945c43c533499052ce0 diff --git a/dev-libs/gmp/gmp-6.1.2.ebuild b/dev-libs/gmp/gmp-6.1.2.ebuild new file mode 100644 index 000000000000..48abb3cbda0a --- /dev/null +++ b/dev-libs/gmp/gmp-6.1.2.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2016 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 arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers" +HOMEPAGE="http://gmplib.org/" +SRC_URI="ftp://ftp.gmplib.org/pub/${MY_P}/${MY_P}.tar.xz + mirror://gnu/${PN}/${MY_P}.tar.xz + doc? ( http://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 ~sparc-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} + + # 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 + # http://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}/ +} |