diff options
-rw-r--r-- | dev-libs/gmp/ChangeLog | 10 | ||||
-rw-r--r-- | dev-libs/gmp/Manifest | 10 | ||||
-rw-r--r-- | dev-libs/gmp/files/4.2.2/mpf_set_str.c.diff | 38 | ||||
-rw-r--r-- | dev-libs/gmp/gmp-4.2.2-r1.ebuild | 76 |
4 files changed, 128 insertions, 6 deletions
diff --git a/dev-libs/gmp/ChangeLog b/dev-libs/gmp/ChangeLog index fcf657efee9d..b65cc3e9e52f 100644 --- a/dev-libs/gmp/ChangeLog +++ b/dev-libs/gmp/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-libs/gmp -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/gmp/ChangeLog,v 1.92 2007/12/26 07:49:48 drac Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/gmp/ChangeLog,v 1.93 2008/05/02 04:23:52 vapier Exp $ + +*gmp-4.2.2-r1 (02 May 2008) + + 02 May 2008; Mike Frysinger <vapier@gentoo.org> + +files/4.2.2/mpf_set_str.c.diff, +gmp-4.2.2-r1.ebuild: + Add fix from upstream. 26 Dec 2007; Samuli Suominen <drac@gentoo.org> gmp-4.2.2.ebuild: amd64 stable wrt #202665 diff --git a/dev-libs/gmp/Manifest b/dev-libs/gmp/Manifest index f4cd600985d2..4fa6079992c2 100644 --- a/dev-libs/gmp/Manifest +++ b/dev-libs/gmp/Manifest @@ -1,18 +1,20 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX 4.2.2/mpf_set_str.c.diff 1062 RMD160 455375f049ff8ef809e796441ec7a83ec648287b SHA1 8e5133ec2dbf4c19738faf90f8df5343cf2533f1 SHA256 245601a618cc7fd52e11495ace7d5183dc4822eb7e8089bb5175ec519fc786cd AUX gmp-4.1.4-noexecstack.patch 528 RMD160 ef0a02c68481312a86970cb98c8d07a2d33c8dcd SHA1 a4b7299237cf48eb651ffbe24b2be5894df547eb SHA256 6c7ed4639ea6551fbaecb1cbff7e9f50ae7900711280ec050a27a775b44fdfd4 AUX gmp-4.2.1-s390.diff 1848 RMD160 04eecb2aaae4c444841e40b33abd38a662254632 SHA1 38ba90ffd6cd9d66e07c5f71b4608e3ad9d32a6b SHA256 13c6b01e71534af2c353d79b7afd171f158b8fa6e3299e0f7c0335e516ce67ec AUX gmp-4.2.2-ABI-multilib.patch 12425 RMD160 b30e1a237252663199457f5f020de7fb81118e2a SHA1 d716749bad6f7996f6862bc8468eb2c7b6c89c42 SHA256 deac10a8fd120e3b8d2a566c5babfea3cf7e6ecf6cc234fe7787b4ffecacb521 DIST gmp-4.2.2.tar.bz2 1747068 RMD160 4021720f78b02244197c0c49522289e7fe81aad9 SHA1 8c5f9798956f9b0162a25a56477a3566a92abc72 SHA256 2b2c0aacafa2dc41f4604b381349d49596921e38a58bf782b0d70b33f548657b DIST gmp-man-4.2.2.pdf 1002466 RMD160 20b37f581d5c993fcc3e092123d5554efc8b2a81 SHA1 706dfd027e208b089f95bf9ff494d298dfa5b4b7 SHA256 44a5dcfbf1bef54c5244e2a1960c479e18b9740849daffb844472c60bc8e962c +EBUILD gmp-4.2.2-r1.ebuild 2073 RMD160 e3390d596c131879e9153de7aaf690a56cadfd61 SHA1 d93cba522df3ecf62c08b75145efa158d4cbca1c SHA256 a250ca38c6a3c3e3f544b8968322677bd0e381094913af60fc7fc55d5f8fea34 EBUILD gmp-4.2.2.ebuild 2058 RMD160 907d052000da0d202e660d1d848495851da11d8b SHA1 aad3a4dda5bd8f35c27a0fc2d340c69df9312c3c SHA256 1c9b5dc08b6dafa0164783858f992e42c10699a051eb249e578acc10f6b79120 -MISC ChangeLog 12599 RMD160 0c5efa567c5e37f0ebf0a3b4f6242db8e471c1a9 SHA1 caee3e0946c5a48ffd221c383c63b62ef51091a6 SHA256 f0fd3049f32f5f82eaf09268b7586f93b74fb18016356b6f329d99a97de92f06 +MISC ChangeLog 12763 RMD160 8632e39e46353b05055d20e398e23bf3dba56770 SHA1 ccd3f476341e1b278e23b7bbad11ddc36f79aadb SHA256 e2c04108630eecb653426999c237b776dab8849ab2ca8a8da7a755eccad122e8 MISC metadata.xml 162 RMD160 d002486a43522f2116b1d9d59828c484956d66e2 SHA1 d6b4923897f6ae673b4f93646f5b4ba61d5a2c3c SHA256 65a915d44de1f01d4b7f72d313b4192c38374a9835d24988c00c1e73dca5805a -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) -iD8DBQFIGpXIj9hvisErhMIRAm23AJ9W+yVUZbISLKPIJx+1orVTeLbKdwCeLTcg -wpD0gCyKfaE9zjArHVicvYI= -=O7aA +iD8DBQFIGpdej9hvisErhMIRAtm8AJwJIh0bvn1yAKHakWMFR86SEjBTUQCgm4pU +RV1YTR1MOs0N5mHGrLdAm8c= +=3/0Z -----END PGP SIGNATURE----- diff --git a/dev-libs/gmp/files/4.2.2/mpf_set_str.c.diff b/dev-libs/gmp/files/4.2.2/mpf_set_str.c.diff new file mode 100644 index 000000000000..9ea58b9f0384 --- /dev/null +++ b/dev-libs/gmp/files/4.2.2/mpf_set_str.c.diff @@ -0,0 +1,38 @@ +*** mpf/set_str.c 30 Aug 2007 18:19:41 -0000 +--- mpf/set_str.c 10 Dec 2007 04:47:18 -0000 +*************** mpf_set_str (mpf_ptr x, const char *str, +*** 272,277 **** + + if (expptr != 0) +! /* FIXME: Should do some error checking here. */ +! exp_in_base = strtol (expptr, (char **) 0, exp_base); + else + exp_in_base = 0; +--- 272,298 ---- + + if (expptr != 0) +! { +! /* Scan and convert the exponent, in base exp_base. */ +! long dig, neg = -(long) ('-' == expptr[0]); +! expptr -= neg; /* conditional increment */ +! c = (unsigned char) *expptr++; +! dig = digit_value[c]; +! if (dig >= exp_base) +! { +! TMP_FREE; +! return -1; +! } +! exp_in_base = dig; +! c = (unsigned char) *expptr++; +! dig = digit_value[c]; +! while (dig < exp_base) +! { +! exp_in_base = exp_in_base * exp_base; +! exp_in_base += dig; +! c = (unsigned char) *expptr++; +! dig = digit_value[c]; +! } +! exp_in_base = (exp_in_base ^ neg) - neg; /* conditional negation */ +! } + else + exp_in_base = 0; diff --git a/dev-libs/gmp/gmp-4.2.2-r1.ebuild b/dev-libs/gmp/gmp-4.2.2-r1.ebuild new file mode 100644 index 000000000000..7bb0e0002e44 --- /dev/null +++ b/dev-libs/gmp/gmp-4.2.2-r1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/gmp/gmp-4.2.2-r1.ebuild,v 1.1 2008/05/02 04:23:52 vapier Exp $ + +inherit flag-o-matic eutils libtool + +DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers" +HOMEPAGE="http://gmplib.org/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2 + doc? ( http://gmplib.org/${PN}-man-${PV}.pdf )" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="doc nocxx" + +RDEPEND="" +DEPEND="" + +src_unpack () { + unpack ${A} + cd "${S}" + [[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV} + epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch + epatch "${FILESDIR}"/${PN}-4.2.2-ABI-multilib.patch + epatch "${FILESDIR}"/${PN}-4.2.1-s390.diff + + sed -i -e 's:ABI = @ABI@:GMPABI = @GMPABI@:' \ + Makefile.in */Makefile.in */*/Makefile.in + + # note: we cannot run autotools here as gcc depends on this package + elibtoolize +} + +src_compile() { + # GMP believes hppa2.0 is 64bit + local is_hppa_2_0 + if [[ ${CHOST} == hppa2.0-* ]] ; then + is_hppa_2_0=1 + export CHOST=${CHOST/2.0/1.1} + fi + + # ABI mappings (needs all architectures supported) + case ${ABI} in + 32|x86) export GMPABI=32;; + 64|amd64|n64) export GMPABI=64;; + o32|n32) export GMPABI=${ABI};; + esac + + econf \ + --localstatedir=/var/state/gmp \ + --disable-mpfr \ + --disable-mpbsd \ + $(use_enable !nocxx cxx) \ + || die "configure failed" + + # Fix the ABI for hppa2.0 + if [[ -n ${is_hppa_2_0} ]] ; then + sed -i \ + -e 's:pa32/hppa1_1:pa32/hppa2_0:' \ + "${S}"/config.h || die + export CHOST=${CHOST/1.1/2.0} + fi + + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + + dodoc AUTHORS ChangeLog NEWS README + dodoc doc/configuration doc/isa_abi_headache + dohtml -r doc + + use doc && cp "${DISTDIR}"/gmp-man-${PV}.pdf "${D}"/usr/share/doc/${PF}/ +} |