summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kahle <tomka@gentoo.org>2010-11-12 13:15:46 +0000
committerThomas Kahle <tomka@gentoo.org>2010-11-12 13:15:46 +0000
commitf92ce155a282d76560af387b2fe72e096b6ea73f (patch)
tree4b5a3b35a3145ec6c4b3474d7e75c41680531a32 /sci-libs/mpir
parentrespect LDFLAGS, bug #337247 (diff)
downloadgentoo-2-f92ce155a282d76560af387b2fe72e096b6ea73f.tar.gz
gentoo-2-f92ce155a282d76560af387b2fe72e096b6ea73f.tar.bz2
gentoo-2-f92ce155a282d76560af387b2fe72e096b6ea73f.zip
New package: sci-libs/mpir, imported from science overlay,
fixes bug 293383. Thanks to science team and users for ebuild work. (Portage version: 2.1.9.24/cvs/Linux i686)
Diffstat (limited to 'sci-libs/mpir')
-rw-r--r--sci-libs/mpir/ChangeLog11
-rw-r--r--sci-libs/mpir/files/mpir-1.3.0-ABI-multilib.patch145
-rw-r--r--sci-libs/mpir/files/mpir-2.0.0-yasm.patch51
-rw-r--r--sci-libs/mpir/metadata.xml22
-rw-r--r--sci-libs/mpir/mpir-2.1.3.ebuild65
5 files changed, 294 insertions, 0 deletions
diff --git a/sci-libs/mpir/ChangeLog b/sci-libs/mpir/ChangeLog
new file mode 100644
index 000000000000..eee80c334dc0
--- /dev/null
+++ b/sci-libs/mpir/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for sci-libs/mpir
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/mpir/ChangeLog,v 1.1 2010/11/12 13:15:46 tomka Exp $
+
+*mpir-2.1.3 (12 Nov 2010)
+
+ 12 Nov 2010; Thomas Kahle <tomka@gentoo.org>
+ +files/mpir-1.3.0-ABI-multilib.patch, +files/mpir-2.0.0-yasm.patch,
+ +mpir-2.1.3.ebuild, +metadata.xml:
+ Initial import from science overlay, fixes bug 293383
+
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 <<EOF
+ User:
+-ABI=$ABI
++MPIRABI=$MPIRABI
+ CC=$CC
+ CFLAGS=$CFLAGS_or_unset
+ CPPFLAGS=$CPPFLAGS_or_unset
+@@ -1611,22 +1611,22 @@
+ # If the user specifies an ABI then it must be in $abilist, after that
+ # $abilist is restricted to just that choice.
+ #
+-if test -n "$ABI"; then
++if test -n "$MPIRABI"; then
+ found=no
+ for abi in $abilist; do
+- if test $abi = "$ABI"; then found=yes; break; fi
++ if test $abi = "$MPIRABI"; then found=yes; break; fi
+ done
+ if test $found = no; then
+- AC_MSG_ERROR([ABI=$ABI is not among the following valid choices: $abilist])
++ AC_MSG_ERROR([MPIRABI=$MPIRABI is not among the following valid choices: $abilist])
+ fi
+- abilist="$ABI"
++ abilist="$MPIRABI"
+ fi
+
+ found_compiler=no
+
+ for abi in $abilist; do
+
+- echo "checking ABI=$abi"
++ echo "checking MPIRABI=$abi"
+
+ # Suppose abilist="64 32", then for abi=64, will have abi1="_64" and
+ # abi2="_64". For abi=32, will have abi1="_32" and abi2="". This is how
+@@ -1879,7 +1879,7 @@
+ done
+ fi
+
+- ABI="$abi"
++ MPIRABI="$abi"
+ CC="$cc"
+ CFLAGS="$cflags"
+ CPPFLAGS="$cppflags"
+@@ -1895,8 +1895,8 @@
+ AC_SUBST(GMP_CFLAGS)
+
+ # Could easily have this in config.h too, if desired.
+- ABI_nodots=`echo $ABI | sed 's/\./_/'`
+- GMP_DEFINE_RAW("define_not_for_expansion(\`HAVE_ABI_$ABI_nodots')", POST)
++ ABI_nodots=`echo $MPIRABI | sed 's/\./_/'`
++ GMP_DEFINE_RAW("define_not_for_expansion(\`HAVE_ABI_$MPIRABI_nodots')", POST)
+
+
+ # GMP_LDFLAGS substitution, selected according to ABI.
+@@ -2094,7 +2094,7 @@
+ #
+ case $host in
+ X86_PATTERN | X86_64_PATTERN)
+- if test "$ABI" = 32; then
++ if test "$MPIRABI" = 32; then
+ case "$path $fat_path" in
+ *mmx*) GMP_ASM_X86_MMX( , [GMP_STRIP_PATH(*mmx*)]) ;;
+ esac
+@@ -2108,7 +2108,7 @@
+
+ cat >&AC_FD_CC <<EOF
+ Decided:
+-ABI=$ABI
++MPIRABI=$MPIRABI
+ CC=$CC
+ CFLAGS=$CFLAGS
+ CPPFLAGS=$CPPFLAGS
+@@ -2117,7 +2117,7 @@
+ CXXFLAGS=$CXXFLAGS
+ path=$path
+ EOF
+-echo "using ABI=\"$ABI\""
++echo "using MPIRABI=\"$MPIRABI\""
+ echo " CC=\"$CC\""
+ echo " CFLAGS=\"$CFLAGS\""
+ echo " CPPFLAGS=\"$CPPFLAGS\""
+@@ -2593,7 +2593,7 @@
+
+
+ if test -n "$fat_path"; then
+- if test "$ABI" = 64; then
++ if test "$MPIRABI" = 64; then
+ fat_path="$fat_path_64"
+ fi
+
+@@ -3099,19 +3099,19 @@
+ GMP_INCLUDE_MPN(powerpc32/powerpc-defs.m4)
+ case $host in
+ *-*-aix*)
+- case $ABI in
++ case $MPIRABI in
+ 64 | aix64) GMP_INCLUDE_MPN(powerpc64/aix.m4) ;;
+ *) GMP_INCLUDE_MPN(powerpc32/aix.m4) ;;
+ esac
+ ;;
+ *-*-linux* | *-*-*bsd*)
+- case $ABI in
++ case $MPIRABI in
+ mode64) GMP_INCLUDE_MPN(powerpc64/elf.m4) ;;
+ mode32 | 32) GMP_INCLUDE_MPN(powerpc32/elf.m4) ;;
+ esac
+ ;;
+ *-*-darwin*)
+- case $ABI in
++ case $MPIRABI in
+ mode64) GMP_INCLUDE_MPN(powerpc64/darwin.m4) ;;
+ mode32 | 32) GMP_INCLUDE_MPN(powerpc32/darwin.m4) ;;
+ esac
+@@ -3126,7 +3126,7 @@
+ GMP_INCLUDE_MPN(powerpc32/aix.m4)
+ ;;
+ sparcv9*-*-* | ultrasparc*-*-* | sparc64-*-*)
+- case $ABI in
++ case $MPIRABI in
+ 64)
+ GMP_ASM_SPARC_REGISTER
+ ;;
+@@ -3134,7 +3134,7 @@
+ ;;
+ X86_PATTERN | X86_64_PATTERN)
+ GMP_ASM_ALIGN_FILL_0x90
+- case $ABI in
++ case $MPIRABI in
+ 32)
+ GMP_INCLUDE_MPN(x86/x86-defs.m4)
+ AC_DEFINE(HAVE_HOST_CPU_FAMILY_x86)
diff --git a/sci-libs/mpir/files/mpir-2.0.0-yasm.patch b/sci-libs/mpir/files/mpir-2.0.0-yasm.patch
new file mode 100644
index 000000000000..156851bae97e
--- /dev/null
+++ b/sci-libs/mpir/files/mpir-2.0.0-yasm.patch
@@ -0,0 +1,51 @@
+--- configure.in.orig 2010-05-20 22:50:45.883576257 +1200
++++ configure.in 2010-05-20 22:51:52.405575089 +1200
+@@ -1596,8 +1596,6 @@
+ ;;
+ esac
+
+-AM_CONDITIONAL(BUILD_YASM, test "$want_yasm" = "yes")
+-
+ CFLAGS_or_unset=${CFLAGS-'(unset)'}
+ CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
+
+@@ -1995,7 +1993,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
+@@ -3373,9 +3371,6 @@
+ # FIXME: Upcoming version of autoconf/automake don't like broken lines.
+ # 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])
+-
+ if test $enable_fat = yes; then
+ YASM_MAC_INC=yasm_mac.inc.fat
+ else
+--- mpn/Makeasm.am.orig 2010-05-20 22:52:23.080577062 +1200
++++ mpn/Makeasm.am 2010-05-20 22:53:17.802576960 +1200
+@@ -111,4 +111,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)/'`$<
+--- Makefile.am.orig 2010-05-20 22:57:02.288576440 +1200
++++ Makefile.am 2010-05-20 22:57:14.616576831 +1200
+@@ -93,10 +93,6 @@
+
+ SUBDIRS = tests
+
+-if BUILD_YASM
+-SUBDIRS += yasm
+-endif
+-
+ SUBDIRS += mpn mpz mpq mpf printf scanf cxx demos tune doc
+
+ EXTRA_DIST = configfsf.guess configfsf.sub .gdbinit INSTALL.autoconf
diff --git a/sci-libs/mpir/metadata.xml b/sci-libs/mpir/metadata.xml
new file mode 100644
index 000000000000..ea212fd9d22f
--- /dev/null
+++ b/sci-libs/mpir/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <maintainer>
+ <email>tomka@gentoo.org</email>
+ <name>Thomas Kahle</name>
+ </maintainer>
+ <longdescription>
+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.
+</longdescription>
+ <use>
+ <flag name='cpudetection'>Enables runtime cpudetection (useful for bindist, compatability on other CPUs)</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-libs/mpir/mpir-2.1.3.ebuild b/sci-libs/mpir/mpir-2.1.3.ebuild
new file mode 100644
index 000000000000..47530eb66cd8
--- /dev/null
+++ b/sci-libs/mpir/mpir-2.1.3.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/mpir/mpir-2.1.3.ebuild,v 1.1 2010/11/12 13:15:46 tomka Exp $
+
+EAPI="3"
+
+inherit eutils autotools
+
+DESCRIPTION="library for arbitrary precision integer arithmetic derived from version 4.2.1 of gmp"
+HOMEPAGE="http://www.mpir.org/"
+SRC_URI="http://www.mpir.org/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+cxx cpudetection"
+
+DEPEND="x86? ( dev-lang/yasm )
+ amd64? ( dev-lang/yasm )"
+RDEPEND=""
+
+src_prepare(){
+ epatch "${FILESDIR}/${PN}-2.0.0-yasm.patch"
+ epatch "${FILESDIR}/${PN}-1.3.0-ABI-multilib.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"
+
+ 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.
+ econf \
+ $(use_enable cxx) \
+ $(use_enable cpudetection fat) \
+ || "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc ChangeLog README NEWS
+}