From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sci-libs/mpir/Manifest | 15 +++ sci-libs/mpir/files/mpir-1.3.0-ABI-multilib.patch | 145 +++++++++++++++++++++ sci-libs/mpir/files/mpir-2.5.1-automake-1.12.patch | 95 ++++++++++++++ sci-libs/mpir/files/mpir-2.6.0-gcc48.patch | 13 ++ sci-libs/mpir/files/mpir-2.6.0-yasm.patch | 52 ++++++++ sci-libs/mpir/files/mpir-2.7.2-ABI-multilib.patch | 145 +++++++++++++++++++++ sci-libs/mpir/files/mpir-2.7.2-sed-backport.patch | 16 +++ sci-libs/mpir/metadata.xml | 21 +++ sci-libs/mpir/mpir-2.6.0-r2.ebuild | 63 +++++++++ sci-libs/mpir/mpir-2.7.2.ebuild | 74 +++++++++++ sci-libs/mpir/mpir-3.0.0.ebuild | 72 ++++++++++ 11 files changed, 711 insertions(+) create mode 100644 sci-libs/mpir/Manifest create mode 100644 sci-libs/mpir/files/mpir-1.3.0-ABI-multilib.patch create mode 100644 sci-libs/mpir/files/mpir-2.5.1-automake-1.12.patch create mode 100644 sci-libs/mpir/files/mpir-2.6.0-gcc48.patch create mode 100644 sci-libs/mpir/files/mpir-2.6.0-yasm.patch create mode 100644 sci-libs/mpir/files/mpir-2.7.2-ABI-multilib.patch create mode 100644 sci-libs/mpir/files/mpir-2.7.2-sed-backport.patch create mode 100644 sci-libs/mpir/metadata.xml create mode 100644 sci-libs/mpir/mpir-2.6.0-r2.ebuild create mode 100644 sci-libs/mpir/mpir-2.7.2.ebuild create mode 100644 sci-libs/mpir/mpir-3.0.0.ebuild (limited to 'sci-libs/mpir') diff --git a/sci-libs/mpir/Manifest b/sci-libs/mpir/Manifest new file mode 100644 index 000000000000..d207a623f8e7 --- /dev/null +++ b/sci-libs/mpir/Manifest @@ -0,0 +1,15 @@ +AUX mpir-1.3.0-ABI-multilib.patch 3903 SHA256 3db2dc41f385d6c8ce9da8406a42072c8462e6e15eba0b6ff93664ef31c00957 SHA512 a1b008f7daccb03a5e6c7af6311d96279ff2d052201f54ef32890ad0404e79e179a0a8d60e2adde5a0b487e16325ce2df4d0fd74464411c983e9630833662886 WHIRLPOOL ae123f02a8e2868f19ad27802042ba45d6e40204ecdf982e346e503ef6808d3f6fafd9b4da336db92164327f2af9e59dfd5e51d97876097ba18a60c30a4ef70b +AUX mpir-2.5.1-automake-1.12.patch 3388 SHA256 dc003924094f88d89582a5e4d626e67c6edacf8e81ee5080fff34fae1b9f836a SHA512 d96b238d2a0deaae1d5489121db02766bfde34e602cf137a608a862584192694da6bd61a27dce3294c62cb950fdbc80b71302585f9cf4a2ac0e5f68c48a66846 WHIRLPOOL 949cb479df53d8d643fdefa95199c777516b843368ef7c68e40fc85429c2736a4d62bda469c9b08224016af223617c573795f6d4041045c90997511a0513fd28 +AUX mpir-2.6.0-gcc48.patch 467 SHA256 5e3656543f9a50bbfe063681d1135a33ca2c272bb79c1762a6759d907b601355 SHA512 28d88aa3ac0c9ccdc849e3ca63eb7768efbbcd77947a1d3befd3cb723eae0b3dda0ff8237f2fcccc9c161026e2a3a05d18ba848d55e51002ea31ab9fb291ed6f WHIRLPOOL 62be75abb8b04bd2653780602c31b7834ad269b7be554830e28210c3ae7368c0a38ad8e943c59ffe1a68cf62d682ea0cdaa73fdf14809b6f2840ef35866b8875 +AUX mpir-2.6.0-yasm.patch 1897 SHA256 e7102052ea1bcda73107ec6c89c20a5f8e1233e9b85732d8847e74ba69a322ae SHA512 0ac3f67f9f8e340e02e4e33e84a482388c45cb59c0d62adf316bc94d1450144b0afcaa639ab9f18fe3a5bc74bb6c2730fdf910b036b4a79272aa28276256ec5c WHIRLPOOL eac13201f78bfe52297aa3787d7896f0d1da1d949118991836ef08559a1ec1ad5eba634b8886e47358bed17790ad79aecda028ad9af978a50c7490771c3bd777 +AUX mpir-2.7.2-ABI-multilib.patch 3902 SHA256 cf4f47ce0170f52ec7847195064155589b091fb63265bee0f27811d6b9e9101d SHA512 81dd03d85dde94fedd4777ae1e5075420de0886675a4f8fba065cfba46f8bf0a3caf15c1efecbed4125ff27bad9c5b39e5eb05719aeabc72b52723f973d59eeb WHIRLPOOL 2a1bb0ef33bebcd61ec0c097abb5c138f17c5aceb2e3d0c7c6a41a49bc81186d0a2735e058248022d144e2d4d11156aa9141149ae6e958282c6e9d012f3a9fd1 +AUX mpir-2.7.2-sed-backport.patch 704 SHA256 5b6ff1f771589ac1d2d9ac128348fab64766b84a0c108aadd05cb9cc20b17a82 SHA512 420f1835c184335445ecd9f57989bd6fdb5c3f65fc78ee52881a272b6a1981d56a6c58047212ebb387e3fe36251a556a466c16479e13e52325fd3db3d809c152 WHIRLPOOL 5d71baf9a64b834309bc635729fc96c9fa05858fccec148208e22c0e95235c8cb4d1d9b09e9cef1c50f0a3185a7e96dffdb01dbedc08e7072fc3e0a04b9eb1f7 +DIST mpir-2.6.0.tar.lzma 2472231 SHA256 2d2cd75a21a73bcd8898f092e4f123016b578288d7c7eab2df05df5e1921695f SHA512 e2608beeb72651c9b2e47f8fb2bcf672f8c74e2cd622e17cd19b12100b66e929ee31d102d2901816379b23aee1a3ea3a854e3e10ebffe2a6e4772748858f911d WHIRLPOOL 4759be848778fc4f34e87083e83e3697bfb57b9c9360ab69666afadc1b2652285a3c2a4c14321d9091ed90d0df307e89e34875a7592e24c2e405453a0b6f6e06 +DIST mpir-2.7.2.tar.bz2 3771429 SHA256 a7d4c33595b4f781a51c92d5d139ec2efb3cf1bf101dfc3eef5b40c54e6f45ec SHA512 8436a0123201f9e30130ea340331c5a6445dddb58ce1f6c6a3a8303c310ac5b3c279c83b5c520a757cba82c2b14e92da44583e0eec287090cf69cbb29d516a9c WHIRLPOOL 8c7804b183282b7d804e91233176ce948a2e5e5c83dcefc4eaf31194a59431af55002a8b6a3405ddb45cac89270066c3c0ae2c4adcaa22329f4af06dbdf10ffb +DIST mpir-3.0.0.tar.bz2 2572041 SHA256 52f63459cf3f9478859de29e00357f004050ead70b45913f2c2269d9708675bb SHA512 c735105db8b86db739fd915bf16064e6bc82d0565ad8858059e4e93f62c9d72d9a1c02a5ca9859b184346a8dc64fa714d4d61404cff1e405dc548cbd54d0a88e WHIRLPOOL 7f10d08291f3a47db2d02d1db63fde8a187bd6896d42dfdd45ec9d77dafa35199b87871c53abbd43b22f78f2948e202402100c67f78f73c60a0692e5bdb49753 +EBUILD mpir-2.6.0-r2.ebuild 1713 SHA256 90d99aa37129aa7b2f634f5c5b3ec0f057d5fa225608363b7af029d58d6247be SHA512 0fc862cd24cb1dbb78d54e444b5fdc04a8c2f0f053e78c766c08139b7ea7af88fc172bcd337a5e79de1b867cd29ca71b4eb2e9fbd4a8cd44693c630065f0c647 WHIRLPOOL ffc66b33042c2af49cf09f0c7d1ee094c165e3acb40ea998ac43615c18fdb2dd5d74a4c096bfbf5a3a98709383debed402089a1e6c2b8a7e29c026c5fed521fe +EBUILD mpir-2.7.2.ebuild 1719 SHA256 bbca6d41ee58a32a0a7fafb597b57a5330748382312ae312b81e8b2a4396b373 SHA512 0cabe5c4e5c1df7b8ecd54b4ba87caff0b934d1805fcbb32b68ba393ba5684fac4314ed277e39286697295f94e79900fc809586b96131d0d03c264873dfd0c07 WHIRLPOOL 273d7a03826e8254de52dc0a3f6e5f6683251da9115e63e80c33aeb9f3d202b9646304887663375e9db6bda6763d800f0af9fbbfac5456b7b75dea9ae3f13269 +EBUILD mpir-3.0.0.ebuild 1687 SHA256 21e043ea728afd83e83c11336b9c750f22cfc9375c874043967b7f0af825007b SHA512 fda52e860d04b4ad1010dfd4714268c95a513893412a51cc2372e2eafdba93b3a309224433259dff638098d251d094341a838b39237f68315850978240899a20 WHIRLPOOL 8fd786cd46b0bfda8970a1a4b84bb474ba329e9aa918f9235f32c88767fe0d949d80ac83cfa3dfc69db606b39d444b9aba5ff65014002fa0ce72658a0728df0c +MISC ChangeLog 2596 SHA256 da427fa177831b7ac91d047cdd8fcd7efcb7c2106d4f944be42d097f70a54c1e SHA512 8e2410e4e6d43cbf1bd28f35a5fb5a89baefead81baed33928669b4151655c812056c6f9a9a0d7877d0e55b6a4b96eedf350df16f6b30c96960e31f324596cc3 WHIRLPOOL 4084d790d46b6bd3744ff9f1b221c70b1e6d5682561f50c3111407570cc50f99d110bd19208bdff7ab81baaddf7eaf75f2d9317a71ee9a948720e3e9e5699c9a +MISC ChangeLog-2015 3708 SHA256 661bbbcb2f7eaaca96f8b85ac15a98cef28e0e375d9a244a04356f9997aa9dff SHA512 33bce2b1f0ab840840a97ddbcf579c04c0c08dbe6cc17c17eb950819598ea631da59b1c9d63a7ff76489180a248140ee53c8a89765e36700b0fbef4deb400eb7 WHIRLPOOL 90270644f24e7bac9e97ccb9bd2f87581e8c46fab296f9d7819574834f9d24e774f8b747fb4f6ca5ec5626df626e7f9bdf150351dc057ffac9fbf4edcdc224f0 +MISC metadata.xml 792 SHA256 71b812200a975413857f7bf7e9a19646acb6cf6b64925094b61fb7253b09f834 SHA512 811f781a961982955ba036f719ec5cce3def93190fb786ef3c3a60f1b54f9b7638d8083cf0f273174002da7d358d25e8764de591d7b587b41198c48c52908fcc WHIRLPOOL f9c05457cfa28226e7b9ea57d08e96be05ebdcace8a1ec6c578360cb2ff0d6a28e845548e99ae11edd11160a764ac209260797baf88efde4c75162c23e2b6a62 diff --git a/sci-libs/mpir/files/mpir-1.3.0-ABI-multilib.patch b/sci-libs/mpir/files/mpir-1.3.0-ABI-multilib.patch new file mode 100644 index 000000000000..fba6fea2e8f6 --- /dev/null +++ b/sci-libs/mpir/files/mpir-1.3.0-ABI-multilib.patch @@ -0,0 +1,145 @@ +--- configure.in.orig 2009-11-28 10:48:59.196977657 +0000 ++++ configure.in 2009-11-28 10:54:50.717976971 +0000 +@@ -361,7 +361,7 @@ + # hugely bloat the output. + + +-AC_ARG_VAR(ABI, [desired ABI (for processors supporting more than one ABI)]) ++AC_ARG_VAR(MPIRABI, [desired ABI (for processors supporting more than one ABI)]) + + # abilist needs to be non-empty, "standard" is just a generic name here + abilist="standard" +@@ -1590,7 +1590,7 @@ + + cat >&AC_FD_CC <&AC_FD_CC <= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined ++# In automake >= 1.10, @MKDIR_P@ is derived from ${MKDIR_P}, which is defined + # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake + # versions, $(mkinstalldirs) and $(install_sh) are unused. + mkinstalldirs = $(SHELL) @install_sh@ -d + install_sh = $(SHELL) @install_sh@ + MKDIR_P = @MKDIR_P@ +-mkdir_p = @mkdir_p@ ++MKDIR_P = @MKDIR_P@ + + GMSGFMT_ = @GMSGFMT@ + GMSGFMT_no = @GMSGFMT@ +@@ -204,7 +204,7 @@ + install-exec: + install-data: install-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ +- $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ ++ $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \ + for file in $(DISTFILES.common) Makevars.template; do \ + $(INSTALL_DATA) $(srcdir)/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ +@@ -217,13 +217,13 @@ + fi + install-data-no: all + install-data-yes: all +- $(mkdir_p) $(DESTDIR)$(datadir) ++ $(MKDIR_P) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ +- $(mkdir_p) $(DESTDIR)$$dir; \ ++ $(MKDIR_P) $(DESTDIR)$$dir; \ + if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ + $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ + echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ +@@ -263,19 +263,19 @@ + installdirs-exec: + installdirs-data: installdirs-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ +- $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ ++ $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \ + else \ + : ; \ + fi + installdirs-data-no: + installdirs-data-yes: +- $(mkdir_p) $(DESTDIR)$(datadir) ++ $(MKDIR_P) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ +- $(mkdir_p) $(DESTDIR)$$dir; \ ++ $(MKDIR_P) $(DESTDIR)$$dir; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ diff --git a/sci-libs/mpir/files/mpir-2.6.0-gcc48.patch b/sci-libs/mpir/files/mpir-2.6.0-gcc48.patch new file mode 100644 index 000000000000..55cd1a087ed6 --- /dev/null +++ b/sci-libs/mpir/files/mpir-2.6.0-gcc48.patch @@ -0,0 +1,13 @@ +https://bugs.gentoo.org/470838 + +--- a/tests/mpz/t-scan.c ++++ b/tests/mpz/t-scan.c +@@ -84,7 +84,7 @@ check_ref (void) + + for (isize = 0; isize <= size; isize++) + { +- for (oindex = 0; oindex <= numberof (offset); oindex++) ++ for (oindex = 0; oindex < numberof (offset); oindex++) + { + o = offset[oindex]; + if ((int) isize*GMP_NUMB_BITS < -o) diff --git a/sci-libs/mpir/files/mpir-2.6.0-yasm.patch b/sci-libs/mpir/files/mpir-2.6.0-yasm.patch new file mode 100644 index 000000000000..3c6b1881f170 --- /dev/null +++ b/sci-libs/mpir/files/mpir-2.6.0-yasm.patch @@ -0,0 +1,52 @@ +diff -U 3 -dHrN mpir-2.6.0.orig/configure.in mpir-2.6.0/configure.in +--- mpir-2.6.0.orig/configure.in 2013-01-16 10:51:13.141047276 +0100 ++++ mpir-2.6.0/configure.in 2013-01-16 10:51:52.437353115 +0100 +@@ -1295,8 +1295,6 @@ + ;; + esac + +-AM_CONDITIONAL(BUILD_YASM, test "$want_yasm" = "yes") +- + CFLAGS_or_unset=${CFLAGS-'(unset)'} + CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'} + +@@ -1681,7 +1679,7 @@ + GMP_CHECK_LIBM_FOR_BUILD + + +-MPIR_AS="/yasm/yasm" ++MPIR_AS="yasm" + + # How to assemble, used with CFLAGS etc, see mpn/Makeasm.am. + # Using the compiler is a lot easier than figuring out how to invoke the +@@ -2984,7 +2982,6 @@ + # Right now automake isn't accepting the new AC_CONFIG_FILES scheme. + + # allways configure all subdirectorys , even if there are not going to be built , +-AC_CONFIG_SUBDIRS([yasm]) + + case $host in + *-w64-mingw*) +diff -U 3 -dHrN mpir-2.6.0.orig/Makefile.am mpir-2.6.0/Makefile.am +--- mpir-2.6.0.orig/Makefile.am 2013-01-16 10:51:13.121047120 +0100 ++++ mpir-2.6.0/Makefile.am 2013-01-16 10:52:25.675611816 +0100 +@@ -98,10 +98,6 @@ + + SUBDIRS = tests + +-if BUILD_YASM +-SUBDIRS += yasm +-endif +- + SUBDIRS += mpn fft mpz mpq mpf printf scanf cxx tune doc + + EXTRA_DIST = configfsf.guess configfsf.sub .gdbinit INSTALL.autoconf +diff -U 3 -dHrN mpir-2.6.0.orig/mpn/Makeasm.am mpir-2.6.0/mpn/Makeasm.am +--- mpir-2.6.0.orig/mpn/Makeasm.am 2013-01-16 10:51:13.045046528 +0100 ++++ mpir-2.6.0/mpn/Makeasm.am 2013-01-16 10:53:25.333076126 +0100 +@@ -119,4 +119,4 @@ + # .as assembler, assembled with Yasm + + .as.lo: +- $(LIBTOOL) --mode=compile --tag=CC $(top_srcdir)/strip_fPIC.sh $(top_builddir)$(MPIR_AS) -I $(top_builddir) $(OBJECT_FORMAT) $(GSYM_FLAG) -o $@ `test -f '$<' || echo '$(srcdir)/'`$< ++ $(LIBTOOL) --mode=compile --tag=CC $(top_srcdir)/strip_fPIC.sh $(MPIR_AS) -I $(top_builddir) $(OBJECT_FORMAT) $(GSYM_FLAG) -o $@ `test -f '$<' || echo '$(srcdir)/'`$< diff --git a/sci-libs/mpir/files/mpir-2.7.2-ABI-multilib.patch b/sci-libs/mpir/files/mpir-2.7.2-ABI-multilib.patch new file mode 100644 index 000000000000..f02df55ccf98 --- /dev/null +++ b/sci-libs/mpir/files/mpir-2.7.2-ABI-multilib.patch @@ -0,0 +1,145 @@ +--- a/configure.ac 2009-11-28 10:48:59.196977657 +0000 ++++ b/configure.ac 2009-11-28 10:54:50.717976971 +0000 +@@ -361,7 +361,7 @@ + # hugely bloat the output. + + +-AC_ARG_VAR(ABI, [desired ABI (for processors supporting more than one ABI)]) ++AC_ARG_VAR(MPIRABI, [desired ABI (for processors supporting more than one ABI)]) + + # abilist needs to be non-empty, "standard" is just a generic name here + abilist="standard" +@@ -1590,7 +1590,7 @@ + + cat >&AC_FD_CC <&AC_FD_CC < + + + + sci@gentoo.org + Gentoo Science Project + + +MPIR is an open source multiprecision integer (bignum) library forked +from the GMP (GNU Multi Precision) project. It consists of much code +from past GMP releases, in combination with much original contributed +code. + +MPIR is constructed by a developer and vendor friendly community of +professional and amateur mathematicians, computer scientists and +hobbyists. + + + Enables runtime cpudetection (useful for bindist, compatability on other CPUs) + + diff --git a/sci-libs/mpir/mpir-2.6.0-r2.ebuild b/sci-libs/mpir/mpir-2.6.0-r2.ebuild new file mode 100644 index 000000000000..ee388c74a0e7 --- /dev/null +++ b/sci-libs/mpir/mpir-2.6.0-r2.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools-utils eutils toolchain-funcs + +DESCRIPTION="Library for arbitrary precision integer arithmetic (fork of gmp)" +HOMEPAGE="http://www.mpir.org/" +SRC_URI="http://www.mpir.org/${P}.tar.lzma" + +LICENSE="LGPL-3" +SLOT="0/11" +KEYWORDS="alpha amd64 ~arm ~arm64 ~hppa ia64 ppc ppc64 x86 ~amd64-linux ~x86-linux" +IUSE="+cxx cpudetection static-libs" + +DEPEND="x86? ( dev-lang/yasm ) + amd64? ( dev-lang/yasm )" +RDEPEND="" + +src_prepare() { + tc-export CC + epatch \ + "${FILESDIR}"/${PN}-2.6.0-yasm.patch \ + "${FILESDIR}"/${PN}-1.3.0-ABI-multilib.patch \ + "${FILESDIR}"/${PN}-2.5.1-automake-1.12.patch \ + "${FILESDIR}"/${PN}-2.6.0-gcc48.patch + + # In the same way there was QA regarding executable stacks + # with GMP we have some here as well. We cannot apply the + # GMP solution as yasm is used, at least on x86/amd64. + # Furthermore we are able to patch config.ac. + ebegin "Patching assembler files to remove executable sections" + local i + for i in $(find . -type f -name '*.asm') ; do + cat >> $i <<-EOF + #if defined(__linux__) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + EOF + done + + for i in $(find . -type f -name '*.as') ; do + cat >> $i <<-EOF + %ifidn __OUTPUT_FORMAT__,elf + section .note.GNU-stack noalloc noexec nowrite progbits + %endif + EOF + done + eend + eautoreconf +} + +src_configure() { + # beware that cpudetection aka fat binaries is x86/amd64 only. + # Place mpir in profiles/arch/$arch/package.use.mask + # when making it available on $arch. + myeconfargs+=( + $(use_enable cxx) + $(use_enable cpudetection fat) + ) + autotools-utils_src_configure +} diff --git a/sci-libs/mpir/mpir-2.7.2.ebuild b/sci-libs/mpir/mpir-2.7.2.ebuild new file mode 100644 index 000000000000..f3e1deeb567d --- /dev/null +++ b/sci-libs/mpir/mpir-2.7.2.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools toolchain-funcs + +DESCRIPTION="Library for arbitrary precision integer arithmetic (fork of gmp)" +HOMEPAGE="http://www.mpir.org/" +SRC_URI="http://www.mpir.org/${P}.tar.bz2" + +LICENSE="LGPL-3" +SLOT="0/16" +KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="+cxx cpudetection static-libs" + +DEPEND=" + x86? ( dev-lang/yasm ) + amd64? ( dev-lang/yasm ) +" +RDEPEND="" + +PATCHES=( + "${FILESDIR}"/${P}-ABI-multilib.patch + "${FILESDIR}"/${P}-sed-backport.patch +) + +src_prepare() { + tc-export CC + + default + + # In the same way there was QA regarding executable stacks + # with GMP we have some here as well. We cannot apply the + # GMP solution as yasm is used, at least on x86/amd64. + # Furthermore we are able to patch config.ac. + ebegin "Patching assembler files to remove executable sections" + local i + for i in $(find . -type f -name '*.asm') ; do + cat >> $i <<-EOF + #if defined(__linux__) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + EOF + done + + for i in $(find . -type f -name '*.as') ; do + cat >> $i <<-EOF + %ifidn __OUTPUT_FORMAT__,elf + section .note.GNU-stack noalloc noexec nowrite progbits + %endif + EOF + done + eend + eautoreconf +} + +src_configure() { + # beware that cpudetection aka fat binaries is x86/amd64 only. + # Place mpir in profiles/arch/$arch/package.use.mask + # when making it available on $arch. + myeconfargs+=( + --with-system-yasm + $(use_enable cxx) + $(use_enable cpudetection fat) + $(use_enable static-libs static) + ) + econf ${myeconfargs[@]} +} + +src_install() { + default + rm "${ED}"/usr/$(get_libdir)/*la || die +} diff --git a/sci-libs/mpir/mpir-3.0.0.ebuild b/sci-libs/mpir/mpir-3.0.0.ebuild new file mode 100644 index 000000000000..14bfad90ba26 --- /dev/null +++ b/sci-libs/mpir/mpir-3.0.0.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools toolchain-funcs + +DESCRIPTION="Library for arbitrary precision integer arithmetic (fork of gmp)" +HOMEPAGE="http://www.mpir.org/" +SRC_URI="http://www.mpir.org/${P}.tar.bz2" + +LICENSE="LGPL-3" +SLOT="0/23" +KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="+cxx cpudetection static-libs" + +DEPEND=" + x86? ( dev-lang/yasm ) + amd64? ( dev-lang/yasm ) +" +RDEPEND="" + +PATCHES=( + "${FILESDIR}"/${PN}-2.7.2-ABI-multilib.patch +) + +src_prepare() { + tc-export CC + default + # In the same way there was QA regarding executable stacks + # with GMP we have some here as well. We cannot apply the + # GMP solution as yasm is used, at least on x86/amd64. + # Furthermore we are able to patch config.ac. + ebegin "Patching assembler files to remove executable sections" + local i + for i in $(find . -type f -name '*.asm') ; do + cat >> $i <<-EOF + + #if defined(__linux__) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + EOF + done + + for i in $(find . -type f -name '*.as') ; do + cat >> $i <<-EOF + + %ifidn __OUTPUT_FORMAT__,elf + section .note.GNU-stack noalloc noexec nowrite progbits + %endif + EOF + done + eend + eautoreconf +} + +src_configure() { + # beware that cpudetection aka fat binaries is x86/amd64 only. + # Place mpir in profiles/arch/$arch/package.use.mask + # when making it available on $arch. + local myeconfargs+=( + $(use_enable cxx) + $(use_enable cpudetection fat) + $(use_enable static-libs static) + ) + econf ${myeconfargs[@]} +} + +src_install() { + default + use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*la +} -- cgit v1.2.3