From c7343e5800287e7f1673a67b0f01dc7dd6be55a9 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 4 Apr 2007 21:58:11 +0000 Subject: [PATCH] Some more fixes from upstream and snipe a fix for s390x from SuSE. Package-Manager: portage-2.1.2.3 --- dev-libs/gmp/ChangeLog | 10 +- dev-libs/gmp/Manifest | 45 +- dev-libs/gmp/files/4.2.1/gmpxx.h.ternary.diff | 519 ++++++++++++++++++ dev-libs/gmp/files/4.2.1/mpz_set_d.diff | 12 + dev-libs/gmp/files/digest-gmp-4.2.1-r1 | 6 + .../gmp/files/gmp-4.1.4-noexecstack.patch | 2 +- dev-libs/gmp/files/gmp-4.2.1-s390.diff | 68 +++ dev-libs/gmp/gmp-4.2.1-r1.ebuild | 77 +++ 8 files changed, 729 insertions(+), 10 deletions(-) create mode 100644 dev-libs/gmp/files/4.2.1/gmpxx.h.ternary.diff create mode 100644 dev-libs/gmp/files/4.2.1/mpz_set_d.diff create mode 100644 dev-libs/gmp/files/digest-gmp-4.2.1-r1 create mode 100644 dev-libs/gmp/files/gmp-4.2.1-s390.diff create mode 100644 dev-libs/gmp/gmp-4.2.1-r1.ebuild diff --git a/dev-libs/gmp/ChangeLog b/dev-libs/gmp/ChangeLog index 52d7c9ec0317..0eb40772e375 100644 --- a/dev-libs/gmp/ChangeLog +++ b/dev-libs/gmp/ChangeLog @@ -1,6 +1,14 @@ # 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.85 2007/02/22 12:09:46 blubb Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/gmp/ChangeLog,v 1.86 2007/04/04 21:58:11 vapier Exp $ + +*gmp-4.2.1-r1 (04 Apr 2007) + + 04 Apr 2007; Mike Frysinger + files/gmp-4.1.4-noexecstack.patch, +files/4.2.1/mpz_set_d.diff, + +files/gmp-4.2.1-s390.diff, +files/4.2.1/gmpxx.h.ternary.diff, + +gmp-4.2.1-r1.ebuild: + Some more fixes from upstream and snipe a fix for s390x from SuSE. 22 Feb 2007; Simon Stelling gmp-4.2.1.ebuild: replace some more ABIs with GMPABI; fix taken from kanaka's auto-multilib diff --git a/dev-libs/gmp/Manifest b/dev-libs/gmp/Manifest index e56d0a882e50..e33db42d0773 100644 --- a/dev-libs/gmp/Manifest +++ b/dev-libs/gmp/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX 4.2.1/aix.m4-RW.diff 529 RMD160 33b9e308733fda096601efdaab15764796484fca SHA1 82978580fc9819c246f975598d276a02f529b957 SHA256 0636df524109a52e9705355952097017242ade4527a0fbb0961fd288334c9ded MD5 fa553f0a338347c619138645ab7dd4a3 files/4.2.1/aix.m4-RW.diff 529 RMD160 33b9e308733fda096601efdaab15764796484fca files/4.2.1/aix.m4-RW.diff 529 @@ -6,32 +9,48 @@ AUX 4.2.1/configure-ppc.diff 2112 RMD160 ef6c739cb54d57d4e38aea7b0368a5e6cc447eb MD5 5fbc1dd75423ded13088f55faa34f341 files/4.2.1/configure-ppc.diff 2112 RMD160 ef6c739cb54d57d4e38aea7b0368a5e6cc447ebe files/4.2.1/configure-ppc.diff 2112 SHA256 6078a583ee7a90d203dda11743f427ffb8b4c7ea17f708d4711fce044f7fda8d files/4.2.1/configure-ppc.diff 2112 +AUX 4.2.1/gmpxx.h.ternary.diff 35363 RMD160 0a5416454918b4ec96892b587e07d8748a21c3b8 SHA1 37f20b4634b39ce3e2c774ff0baca3b80a5bdc4a SHA256 a8d81ab33bd184b4ea9ac4de6cec4eb272329a30f9d792286eec8830ebcecab6 +MD5 aabec4db837224998e0f117d23225ba1 files/4.2.1/gmpxx.h.ternary.diff 35363 +RMD160 0a5416454918b4ec96892b587e07d8748a21c3b8 files/4.2.1/gmpxx.h.ternary.diff 35363 +SHA256 a8d81ab33bd184b4ea9ac4de6cec4eb272329a30f9d792286eec8830ebcecab6 files/4.2.1/gmpxx.h.ternary.diff 35363 AUX 4.2.1/ia64-popcount.diff 951 RMD160 9ee01b3c3bb4cf29dee110e6d3e78ef582519e50 SHA1 9cf08d6c123d35aa1379a7d2d791d2d583e53131 SHA256 35c1b6690b0cc346b5404ae151fe6f3ace9574e191f63e0e221cae19d971de07 MD5 beafe285c767d9109b533d3e8f3fd1fb files/4.2.1/ia64-popcount.diff 951 RMD160 9ee01b3c3bb4cf29dee110e6d3e78ef582519e50 files/4.2.1/ia64-popcount.diff 951 SHA256 35c1b6690b0cc346b5404ae151fe6f3ace9574e191f63e0e221cae19d971de07 files/4.2.1/ia64-popcount.diff 951 +AUX 4.2.1/mpz_set_d.diff 258 RMD160 e33a6b64725b985906aa2480cbf1991edbf27d69 SHA1 df8b7d9a6b055ff598748e0eab9ee0590f80f229 SHA256 3fe0ec6e93aafc549a3e9dd0e1df8bd6846adb02f3c55c6a88dcfebe894f4642 +MD5 5800545e1d413c5f9e63fabb2e291260 files/4.2.1/mpz_set_d.diff 258 +RMD160 e33a6b64725b985906aa2480cbf1991edbf27d69 files/4.2.1/mpz_set_d.diff 258 +SHA256 3fe0ec6e93aafc549a3e9dd0e1df8bd6846adb02f3c55c6a88dcfebe894f4642 files/4.2.1/mpz_set_d.diff 258 AUX 4.2.1/x86-fat.diff 4732 RMD160 f85e410a5f7ef3c666e7b86d663f212cebf502fa SHA1 5c56d7f8cc26e67a82acad124874a4e70825f017 SHA256 cd4dedf4cba0ab33f4049e841f1588a775b9fe76248f535f4e85ad0e710b40f9 MD5 72e66a10dc0305e3585ee5e176222141 files/4.2.1/x86-fat.diff 4732 RMD160 f85e410a5f7ef3c666e7b86d663f212cebf502fa files/4.2.1/x86-fat.diff 4732 SHA256 cd4dedf4cba0ab33f4049e841f1588a775b9fe76248f535f4e85ad0e710b40f9 files/4.2.1/x86-fat.diff 4732 -AUX gmp-4.1.4-noexecstack.patch 500 RMD160 f6127c09401e20137dc84bf15bcc664882e8cb8c SHA1 4a4488042cd0ec374f014576c1e88e3d469ad571 SHA256 5596cceb83b0cb7d82512623a314b9dad4a595fe897403ec7f130511a35ed672 -MD5 c5cdde547a6d6877d618f865215b1180 files/gmp-4.1.4-noexecstack.patch 500 -RMD160 f6127c09401e20137dc84bf15bcc664882e8cb8c files/gmp-4.1.4-noexecstack.patch 500 -SHA256 5596cceb83b0cb7d82512623a314b9dad4a595fe897403ec7f130511a35ed672 files/gmp-4.1.4-noexecstack.patch 500 +AUX gmp-4.1.4-noexecstack.patch 528 RMD160 ef0a02c68481312a86970cb98c8d07a2d33c8dcd SHA1 a4b7299237cf48eb651ffbe24b2be5894df547eb SHA256 6c7ed4639ea6551fbaecb1cbff7e9f50ae7900711280ec050a27a775b44fdfd4 +MD5 a772335171a8409a9c478dace0a2ec0a files/gmp-4.1.4-noexecstack.patch 528 +RMD160 ef0a02c68481312a86970cb98c8d07a2d33c8dcd files/gmp-4.1.4-noexecstack.patch 528 +SHA256 6c7ed4639ea6551fbaecb1cbff7e9f50ae7900711280ec050a27a775b44fdfd4 files/gmp-4.1.4-noexecstack.patch 528 AUX gmp-4.2.1-ABI-multilib.patch 12390 RMD160 934645555459cabcf4c2f0e1ea0a6a7143387a81 SHA1 16fe122b8f88a38d27ed8205dc37b0f7ad53d21f SHA256 d5fa3b9cd07036abc99d8356ffd82935aa63b2aab53ffb49eb0f4004d35964aa MD5 c4ebcc92089f50c5918a83b8a6d2122e files/gmp-4.2.1-ABI-multilib.patch 12390 RMD160 934645555459cabcf4c2f0e1ea0a6a7143387a81 files/gmp-4.2.1-ABI-multilib.patch 12390 SHA256 d5fa3b9cd07036abc99d8356ffd82935aa63b2aab53ffb49eb0f4004d35964aa files/gmp-4.2.1-ABI-multilib.patch 12390 +AUX gmp-4.2.1-s390.diff 1848 RMD160 04eecb2aaae4c444841e40b33abd38a662254632 SHA1 38ba90ffd6cd9d66e07c5f71b4608e3ad9d32a6b SHA256 13c6b01e71534af2c353d79b7afd171f158b8fa6e3299e0f7c0335e516ce67ec +MD5 ddce691e68e722e03ea65d228ac650ea files/gmp-4.2.1-s390.diff 1848 +RMD160 04eecb2aaae4c444841e40b33abd38a662254632 files/gmp-4.2.1-s390.diff 1848 +SHA256 13c6b01e71534af2c353d79b7afd171f158b8fa6e3299e0f7c0335e516ce67ec files/gmp-4.2.1-s390.diff 1848 DIST gmp-4.2.1.tar.bz2 1726453 RMD160 831e02a36ac7b466857f8fafeffad7d51f7656e7 SHA1 00a97f0ec1eb1d9429ab5c64be6889e8a497425e SHA256 d07ffcb37eecec35c5ec72516d10b35fdf6e6fef1fcf1dcd37e30b8cbf8bf941 DIST gmp-man-4.2.1.pdf 996792 RMD160 3f8ea92b95e985d09ed8d5b45952ccf98fbd9dac SHA1 e1f3f84b38d6c459220dbd14015d440cd59195d1 SHA256 3bee6b5285eea339a5ea949cd9db12fe5f676f15beff8ae9cbee0011be24beef +EBUILD gmp-4.2.1-r1.ebuild 2200 RMD160 2601b04594a8f485ff2f98d43ca5acd0222851b8 SHA1 0f8c4c3b0d0804c88fb6abc5b0f7b6851289dbc9 SHA256 c764f11ba3e2606f7c0c15704da69263b3e5950cfae7885bcdd86f1f37c3607f +MD5 835500ba7ab3c327413832239a1fd2da gmp-4.2.1-r1.ebuild 2200 +RMD160 2601b04594a8f485ff2f98d43ca5acd0222851b8 gmp-4.2.1-r1.ebuild 2200 +SHA256 c764f11ba3e2606f7c0c15704da69263b3e5950cfae7885bcdd86f1f37c3607f gmp-4.2.1-r1.ebuild 2200 EBUILD gmp-4.2.1.ebuild 2224 RMD160 bb28659d2afbed7fdd6a9e6fcf1dd07ca61eb187 SHA1 1b7a43a4fa47cfd5766c54959fc7ea79af5500e9 SHA256 a4d740ecbde6def0a484cbdac395b56b179cbe6ea9de2eba388e66e1cd3ea2db MD5 43e344108ac1cfaee843c76b0ae34d98 gmp-4.2.1.ebuild 2224 RMD160 bb28659d2afbed7fdd6a9e6fcf1dd07ca61eb187 gmp-4.2.1.ebuild 2224 SHA256 a4d740ecbde6def0a484cbdac395b56b179cbe6ea9de2eba388e66e1cd3ea2db gmp-4.2.1.ebuild 2224 -MISC ChangeLog 11634 RMD160 4e2e372af9da00896851e901805e65e73ffffb4f SHA1 22e5732ed35959c35e7ebd351ed13f45c02d4ac4 SHA256 1ad73f75d4358e4e0ddfcd4a944c08957d3707a7a0784b3316b36d2f93395f8e -MD5 be276d0769a70392a45323b6b8b7c56a ChangeLog 11634 -RMD160 4e2e372af9da00896851e901805e65e73ffffb4f ChangeLog 11634 -SHA256 1ad73f75d4358e4e0ddfcd4a944c08957d3707a7a0784b3316b36d2f93395f8e ChangeLog 11634 +MISC ChangeLog 11939 RMD160 c43568508faa5d21ae570b56ac1310aa1decc240 SHA1 86678d07cccd15d0daa5c0592ddeed9192347680 SHA256 579df7a45b5ed4e867e00063690467fd1966ae67558fc9e4285a860715f9b7b4 +MD5 561437387f651ac10a63e0b24f94e5e2 ChangeLog 11939 +RMD160 c43568508faa5d21ae570b56ac1310aa1decc240 ChangeLog 11939 +SHA256 579df7a45b5ed4e867e00063690467fd1966ae67558fc9e4285a860715f9b7b4 ChangeLog 11939 MISC metadata.xml 162 RMD160 d002486a43522f2116b1d9d59828c484956d66e2 SHA1 d6b4923897f6ae673b4f93646f5b4ba61d5a2c3c SHA256 65a915d44de1f01d4b7f72d313b4192c38374a9835d24988c00c1e73dca5805a MD5 567094e03359ffc1c95af7356395228d metadata.xml 162 RMD160 d002486a43522f2116b1d9d59828c484956d66e2 metadata.xml 162 @@ -39,3 +58,13 @@ SHA256 65a915d44de1f01d4b7f72d313b4192c38374a9835d24988c00c1e73dca5805a metadata MD5 d87bd044c3923c0796531c3bf8576c9f files/digest-gmp-4.2.1 467 RMD160 98ab335c8f75e99dfd7ddc3d8997efb97f8ef99e files/digest-gmp-4.2.1 467 SHA256 72f6e7bb87de1a79792e7c22a78d0e16956ec7e0b80a13c7de181b691a627db9 files/digest-gmp-4.2.1 467 +MD5 d87bd044c3923c0796531c3bf8576c9f files/digest-gmp-4.2.1-r1 467 +RMD160 98ab335c8f75e99dfd7ddc3d8997efb97f8ef99e files/digest-gmp-4.2.1-r1 467 +SHA256 72f6e7bb87de1a79792e7c22a78d0e16956ec7e0b80a13c7de181b691a627db9 files/digest-gmp-4.2.1-r1 467 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.3 (GNU/Linux) + +iD8DBQFGFB+A8bi6rjpTunYRAhMeAJ9y2IVG0ru/RBpZr5jEdS2QUqKa8gCaA9SL +RpYEDlmDWhAhDZv2/Z1P14A= +=1yG+ +-----END PGP SIGNATURE----- diff --git a/dev-libs/gmp/files/4.2.1/gmpxx.h.ternary.diff b/dev-libs/gmp/files/4.2.1/gmpxx.h.ternary.diff new file mode 100644 index 000000000000..79bbb1ab3807 --- /dev/null +++ b/dev-libs/gmp/files/4.2.1/gmpxx.h.ternary.diff @@ -0,0 +1,519 @@ +Index: gmpxx.h +=================================================================== +RCS file: /home/cvsfiles/gmp42/gmpxx.h,v +retrieving revision 1.4 +retrieving revision 1.5 +diff -p -2 -r1.4 -r1.5 +*** gmpxx.h 8 Apr 2006 19:58:48 -0000 1.4 +--- gmpxx.h 31 Oct 2006 10:40:59 -0000 1.5 +*************** struct __gmp_cmp_function +*** 1278,1367 **** + }; + +- struct __gmp_ternary_addmul // z = w + v * u +- { +- static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v, mpz_srcptr u) +- { mpz_set(z, w); mpz_addmul(z, v, u); } +- +- static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v, unsigned long int l) +- { mpz_set(z, w); mpz_addmul_ui(z, v, l); } +- static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l, mpz_srcptr v) +- { mpz_set(z, w); mpz_addmul_ui(z, v, l); } +- static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v, signed long int l) +- { +- mpz_set(z, w); +- if (l >= 0) +- mpz_addmul_ui(z, v, l); +- else +- mpz_submul_ui(z, v, -l); +- } +- static void eval(mpz_ptr z, mpz_srcptr w, signed long int l, mpz_srcptr v) +- { +- mpz_set(z, w); +- if (l >= 0) +- mpz_addmul_ui(z, v, l); +- else +- mpz_submul_ui(z, v, -l); +- } +- static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v, double d) +- { +- mpz_t temp; +- mpz_init_set_d(temp, d); +- mpz_set(z, w); +- mpz_addmul(z, v, temp); +- mpz_clear(temp); +- } +- static void eval(mpz_ptr z, mpz_srcptr w, double d, mpz_srcptr v) +- { +- mpz_t temp; +- mpz_init_set_d(temp, d); +- mpz_set(z, w); +- mpz_addmul(z, temp, v); +- mpz_clear(temp); +- } +- }; +- +- struct __gmp_ternary_submul // z = w - v * u +- { +- static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v, mpz_srcptr u) +- { mpz_set(z, w); mpz_submul(z, v, u); } +- +- static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v, unsigned long int l) +- { mpz_set(z, w); mpz_submul_ui(z, v, l); } +- static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l, mpz_srcptr v) +- { mpz_set(z, w); mpz_submul_ui(z, v, l); } +- static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v, signed long int l) +- { +- mpz_set(z, w); +- if (l >= 0) +- mpz_submul_ui(z, v, l); +- else +- mpz_addmul_ui(z, v, -l); +- } +- static void eval(mpz_ptr z, mpz_srcptr w, signed long int l, mpz_srcptr v) +- { +- mpz_set(z, w); +- if (l >= 0) +- mpz_submul_ui(z, v, l); +- else +- mpz_addmul_ui(z, v, -l); +- } +- static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v, double d) +- { +- mpz_t temp; +- mpz_init_set_d(temp, d); +- mpz_set(z, w); +- mpz_submul(z, v, temp); +- mpz_clear(temp); +- } +- static void eval(mpz_ptr z, mpz_srcptr w, double d, mpz_srcptr v) +- { +- mpz_t temp; +- mpz_init_set_d(temp, d); +- mpz_set(z, w); +- mpz_submul(z, temp, v); +- mpz_clear(temp); +- } +- }; +- + struct __gmp_rand_function + { +--- 1278,1281 ---- +*************** __GMPZQ_DEFINE_EXPR(__gmp_binary_minus) +*** 2863,3277 **** + + +- /* Integer ternary expressions of the kind `a+b*c' or `a*b+c' can be +- evaluated directly via mpz_addmul */ +- +- // a + b * c +- #define __GMP_DEFINE_TERNARY_EXPR(eval_fun1, eval_fun2, eval_both) \ +- \ +- template <> \ +- class __gmp_expr >, eval_fun2> > \ +- { \ +- private: \ +- typedef mpz_class val1_type; \ +- typedef __gmp_expr \ +- > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { eval_both::eval \ +- (z, expr.val1.get_mpz_t(), expr.val2.get_val1().get_mpz_t(), \ +- expr.val2.get_val2().get_mpz_t()); } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr >, eval_fun2> > \ +- { \ +- private: \ +- typedef mpz_class val1_type; \ +- typedef __gmp_expr \ +- > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { eval_both::eval \ +- (z, expr.val1.get_mpz_t(), expr.val2.get_val1().get_mpz_t(), \ +- expr.val2.get_val2()); } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr >, eval_fun2> > \ +- { \ +- private: \ +- typedef mpz_class val1_type; \ +- typedef __gmp_expr \ +- > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { eval_both::eval \ +- (z, expr.val1.get_mpz_t(), expr.val2.get_val1(), \ +- expr.val2.get_val2().get_mpz_t()); } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr, eval_fun1> >, \ +- eval_fun2> > \ +- { \ +- private: \ +- typedef mpz_class val1_type; \ +- typedef __gmp_expr, eval_fun1> > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { \ +- mpz_class temp(expr.val2.get_val2()); \ +- eval_both::eval \ +- (z, expr.val1.get_mpz_t(), expr.val2.get_val1().get_mpz_t(), \ +- temp.get_mpz_t()); \ +- } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr, mpz_class, eval_fun1> >, \ +- eval_fun2> > \ +- { \ +- private: \ +- typedef mpz_class val1_type; \ +- typedef __gmp_expr, mpz_class, eval_fun1> > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { \ +- mpz_class temp(expr.val2.get_val1()); \ +- eval_both::eval(z, expr.val1.get_mpz_t(), temp.get_mpz_t(), \ +- expr.val2.get_val2().get_mpz_t()); \ +- } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr, U, eval_fun1> >, \ +- eval_fun2> > \ +- { \ +- private: \ +- typedef mpz_class val1_type; \ +- typedef __gmp_expr, U, eval_fun1> > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { \ +- mpz_class temp(expr.val2.get_val1()); \ +- eval_both::eval \ +- (z, expr.val1.get_mpz_t(), temp.get_mpz_t(), expr.val2.get_val2()); \ +- } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr, eval_fun1> >, \ +- eval_fun2> > \ +- { \ +- private: \ +- typedef mpz_class val1_type; \ +- typedef __gmp_expr, eval_fun1> > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { \ +- mpz_class temp(expr.val2.get_val2()); \ +- eval_both::eval \ +- (z, expr.val1.get_mpz_t(), expr.val2.get_val1(), temp.get_mpz_t()); \ +- } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr, __gmp_expr, \ +- eval_fun1> >, eval_fun2> > \ +- { \ +- private: \ +- typedef mpz_class val1_type; \ +- typedef __gmp_expr, __gmp_expr, eval_fun1> > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { \ +- mpz_class temp1(expr.val2.get_val1()); \ +- mpz_class temp2(expr.val2.get_val2()); \ +- eval_both::eval \ +- (z, expr.val1.get_mpz_t(), temp1.get_mpz_t(), temp2.get_mpz_t()); \ +- } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr, \ +- __gmp_expr >, \ +- eval_fun2> > \ +- { \ +- private: \ +- typedef __gmp_expr val1_type; \ +- typedef __gmp_expr \ +- > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { \ +- mpz_class temp(expr.val1); \ +- eval_both::eval(z, temp.get_mpz_t(), expr.val2.get_val1().get_mpz_t(), \ +- expr.val2.get_val2().get_mpz_t()); \ +- } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr, \ +- __gmp_expr >, \ +- eval_fun2> > \ +- { \ +- private: \ +- typedef __gmp_expr val1_type; \ +- typedef __gmp_expr \ +- > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { \ +- mpz_class temp(expr.val1); \ +- eval_both::eval(z, temp.get_mpz_t(), expr.val2.get_val1().get_mpz_t(), \ +- expr.val2.get_val2()); \ +- } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr, \ +- __gmp_expr >, \ +- eval_fun2> > \ +- { \ +- private: \ +- typedef __gmp_expr val1_type; \ +- typedef __gmp_expr \ +- > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { \ +- mpz_class temp(expr.val1); \ +- eval_both::eval(z, temp.get_mpz_t(), expr.val2.get_val1(), \ +- expr.val2.get_val2().get_mpz_t()); \ +- } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr, \ +- __gmp_expr, \ +- eval_fun1> >, eval_fun2> > \ +- { \ +- private: \ +- typedef __gmp_expr val1_type; \ +- typedef __gmp_expr, eval_fun1> > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { \ +- mpz_class temp1(expr.val1); \ +- mpz_class temp2(expr.val2.get_val2()); \ +- eval_both::eval \ +- (z, temp1.get_mpz_t(), expr.val2.get_val1().get_mpz_t(), \ +- temp2.get_mpz_t()); \ +- } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr, \ +- __gmp_expr, mpz_class, \ +- eval_fun1> >, eval_fun2> > \ +- { \ +- private: \ +- typedef __gmp_expr val1_type; \ +- typedef __gmp_expr, mpz_class, eval_fun1> > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { \ +- mpz_class temp1(expr.val1); \ +- mpz_class temp2(expr.val2.get_val1()); \ +- eval_both::eval(z, temp1.get_mpz_t(), temp2.get_mpz_t(), \ +- expr.val2.get_val2().get_mpz_t()); \ +- } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr, \ +- __gmp_expr, V, \ +- eval_fun1> >, eval_fun2> > \ +- { \ +- private: \ +- typedef __gmp_expr val1_type; \ +- typedef __gmp_expr, V, eval_fun1> > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { \ +- mpz_class temp1(expr.val1); \ +- mpz_class temp2(expr.val2.get_val1()); \ +- eval_both::eval \ +- (z, temp1.get_mpz_t(), temp2.get_mpz_t(), expr.val2.get_val2()); \ +- } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr, \ +- __gmp_expr, \ +- eval_fun1> >, eval_fun2> > \ +- { \ +- private: \ +- typedef __gmp_expr val1_type; \ +- typedef __gmp_expr, eval_fun1> > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { \ +- mpz_class temp1(expr.val1); \ +- mpz_class temp2(expr.val2.get_val2()); \ +- eval_both::eval \ +- (z, temp1.get_mpz_t(), expr.val2.get_val1(), temp2.get_mpz_t()); \ +- } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; \ +- \ +- template \ +- class __gmp_expr, \ +- __gmp_expr, \ +- __gmp_expr, eval_fun1> >, eval_fun2> > \ +- { \ +- private: \ +- typedef __gmp_expr val1_type; \ +- typedef __gmp_expr, __gmp_expr, eval_fun1> > val2_type; \ +- \ +- __gmp_binary_expr expr; \ +- public: \ +- __gmp_expr(const val1_type &val1, const val2_type &val2) \ +- : expr(val1, val2) { } \ +- void eval(mpz_ptr z) const \ +- { \ +- mpz_class temp1(expr.val1); \ +- mpz_class temp2(expr.val2.get_val1()); \ +- mpz_class temp3(expr.val2.get_val2()); \ +- eval_both::eval \ +- (z, temp1.get_mpz_t(), temp2.get_mpz_t(), temp3.get_mpz_t()); \ +- } \ +- const val1_type & get_val1() const { return expr.val1; } \ +- const val2_type & get_val2() const { return expr.val2; } \ +- unsigned long int get_prec() const { return mpf_get_default_prec(); } \ +- }; +- +- +- __GMP_DEFINE_TERNARY_EXPR(__gmp_binary_multiplies, __gmp_binary_plus, +- __gmp_ternary_addmul) +- __GMP_DEFINE_TERNARY_EXPR(__gmp_binary_multiplies, __gmp_binary_minus, +- __gmp_ternary_submul) + + /**************** Macros for defining functions ****************/ +--- 2777,2780 ---- diff --git a/dev-libs/gmp/files/4.2.1/mpz_set_d.diff b/dev-libs/gmp/files/4.2.1/mpz_set_d.diff new file mode 100644 index 000000000000..6c4d0cfdcbbb --- /dev/null +++ b/dev-libs/gmp/files/4.2.1/mpz_set_d.diff @@ -0,0 +1,12 @@ +*** mpz/set_d.c 14 Mar 2006 15:57:54 -0000 1.1 +--- mpz/set_d.c 31 May 2006 14:50:05 -0000 1.2 +*************** mpz_set_d (mpz_ptr r, double d) +*** 57,60 **** +--- 58,64 ---- + _mpz_realloc (r, rn); + ++ if (rn <= 0) ++ rn = 0; ++ + rp = PTR (r); + diff --git a/dev-libs/gmp/files/digest-gmp-4.2.1-r1 b/dev-libs/gmp/files/digest-gmp-4.2.1-r1 new file mode 100644 index 000000000000..dc6f8c7b5df0 --- /dev/null +++ b/dev-libs/gmp/files/digest-gmp-4.2.1-r1 @@ -0,0 +1,6 @@ +MD5 091c56e0e1cca6b09b17b69d47ef18e3 gmp-4.2.1.tar.bz2 1726453 +RMD160 831e02a36ac7b466857f8fafeffad7d51f7656e7 gmp-4.2.1.tar.bz2 1726453 +SHA256 d07ffcb37eecec35c5ec72516d10b35fdf6e6fef1fcf1dcd37e30b8cbf8bf941 gmp-4.2.1.tar.bz2 1726453 +MD5 09ab91ee64673cb78af2a02a310fd15b gmp-man-4.2.1.pdf 996792 +RMD160 3f8ea92b95e985d09ed8d5b45952ccf98fbd9dac gmp-man-4.2.1.pdf 996792 +SHA256 3bee6b5285eea339a5ea949cd9db12fe5f676f15beff8ae9cbee0011be24beef gmp-man-4.2.1.pdf 996792 diff --git a/dev-libs/gmp/files/gmp-4.1.4-noexecstack.patch b/dev-libs/gmp/files/gmp-4.1.4-noexecstack.patch index 8adc25d8b3e2..56f4604fc763 100644 --- a/dev-libs/gmp/files/gmp-4.1.4-noexecstack.patch +++ b/dev-libs/gmp/files/gmp-4.1.4-noexecstack.patch @@ -13,7 +13,7 @@ fixed executable stack as per bug #115038 thanks to Petteri R --- gmp-4.1.4/nostackexec +++ gmp-4.1.4/nostackexec @@ -0,0 +1,4 @@ -+#ifdef __ELF__ ++#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits +.previous +#endif diff --git a/dev-libs/gmp/files/gmp-4.2.1-s390.diff b/dev-libs/gmp/files/gmp-4.2.1-s390.diff new file mode 100644 index 000000000000..82dbb722eb14 --- /dev/null +++ b/dev-libs/gmp/files/gmp-4.2.1-s390.diff @@ -0,0 +1,68 @@ +stolen from SuSE + +--- configure.in ++++ configure.in +@@ -1050,6 +1050,9 @@ + ;; + + ++ s390x-*-*) ++ path="s390x" ;; ++ + # IBM s/370 and similar + [s3[6-9]0*-*-*]) + gcc_cflags="-O2 $fomit_frame_pointer" +--- configure ++++ configure +@@ -1050,6 +1050,9 @@ + ;; + + ++ s390x-*-*) ++ path="s390x" ;; ++ + # IBM s/370 and similar + s3[6-9]0*-*-*) + gcc_cflags="-O2 $fomit_frame_pointer" +--- mpn/s390/gmp-mparam.h ++++ mpn/s390/gmp-mparam.h +@@ -20,7 +20,8 @@ + MA 02110-1301, USA. */ + + +-/* BITS_PER_MP_LIMB etc generated by configure */ ++#define BITS_PER_MP_LIMB 32 ++#define BYTES_PER_MP_LIMB 4 + + + /* Generated by tuneup.c, 2001-12-03, gcc 2.95 */ +--- mpn/s390x/gmp-mparam.h ++++ mpn/s390x/gmp-mparam.h +@@ -0,0 +1,27 @@ ++/* gmp-mparam.h -- Compiler/machine parameter header file. ++ ++Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc. ++ ++This file is part of the GNU MP Library. ++ ++The GNU MP Library is free software; you can redistribute it and/or modify ++it under the terms of the GNU Library General Public License as published by ++the Free Software Foundation; either version 2 of the License, or (at your ++option) any later version. ++ ++The GNU MP Library is distributed in the hope that it will be useful, but ++WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public ++License for more details. ++ ++You should have received a copy of the GNU Library General Public License ++along with the GNU MP Library; see the file COPYING.LIB. If not, write to ++the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ++MA 02111-1307, USA. */ ++ ++#define BITS_PER_MP_LIMB 64 ++#define BYTES_PER_MP_LIMB 8 ++#define BITS_PER_LONGINT 64 ++#define BITS_PER_INT 32 ++#define BITS_PER_SHORTINT 16 ++#define BITS_PER_CHAR 8 diff --git a/dev-libs/gmp/gmp-4.2.1-r1.ebuild b/dev-libs/gmp/gmp-4.2.1-r1.ebuild new file mode 100644 index 000000000000..b21e2053e68e --- /dev/null +++ b/dev-libs/gmp/gmp-4.2.1-r1.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/gmp/gmp-4.2.1-r1.ebuild,v 1.1 2007/04/04 21:58:11 vapier Exp $ + +inherit flag-o-matic eutils libtool + +DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers" +HOMEPAGE="http://www.swox.com/gmp/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2 + doc? ( http://www.swox.se/${PN}/${PN}-man-${PV}.pdf )" + +LICENSE="LGPL-2" +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}" + EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV} + epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch + epatch "${FILESDIR}"/${P}-ABI-multilib.patch + epatch "${FILESDIR}"/${P}-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 + if [[ ${CHOST} == hppa2.0-* ]] ; then + is_hppa_2_0=1 + export CHOST="${CHOST/2.0/1.1}" + fi + + # ABI mappings (needs all architectures supported) + if [ -n "${ABI}" ]; then + [ "${ABI}" = "32" ] && export GMPABI=32 + [ "${ABI}" = "64" ] && export GMPABI=64 + [ "${ABI}" = "x86" ] && export GMPABI=32 + [ "${ABI}" = "amd64" ] && export GMPABI=64 + [ "${ABI}" = "n64" ] && export GMPABI=64 + [ "${ABI}" = "o32" ] && export GMPABI=o32 + [ "${ABI}" = "n32" ] && export GMPABI=n32 + fi + + econf \ + --localstatedir=/var/state/gmp \ + --disable-mpfr \ + --disable-mpbsd \ + $(use_enable !nocxx cxx) \ + || die "configure failed" + + # Fix the ABI for hppa2.0 + if [ ! -z "${is_hppa_2_0}" ]; then + sed -i "${S}/config.h" -e 's:pa32/hppa1_1:pa32/hppa2_0:' + 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}/ +} -- 2.26.2