summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kahle <tomka@gentoo.org>2013-05-22 16:20:34 +0000
committerThomas Kahle <tomka@gentoo.org>2013-05-22 16:20:34 +0000
commit3ea5bfb827aefc6f5d7bb176c0ef9d215ecd8e8f (patch)
treef7c98b462a08d60cfe843a2fe6316d2f96294c70 /sci-libs
parentMarked ~hppa (bug #471002). (diff)
downloadgentoo-2-3ea5bfb827aefc6f5d7bb176c0ef9d215ecd8e8f.tar.gz
gentoo-2-3ea5bfb827aefc6f5d7bb176c0ef9d215ecd8e8f.tar.bz2
gentoo-2-3ea5bfb827aefc6f5d7bb176c0ef9d215ecd8e8f.zip
fix tests with gcc-4.8 (bug 470838)
(Portage version: 2.1.12.1/cvs/Linux x86_64, signed Manifest commit with key 0x89DEB219565C32BC!)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/mpir/ChangeLog8
-rw-r--r--sci-libs/mpir/files/mpir-2.6.0-gcc48.patch13
-rw-r--r--sci-libs/mpir/mpir-2.6.0-r2.ebuild64
3 files changed, 84 insertions, 1 deletions
diff --git a/sci-libs/mpir/ChangeLog b/sci-libs/mpir/ChangeLog
index 11f0c5565b79..e356f928bb61 100644
--- a/sci-libs/mpir/ChangeLog
+++ b/sci-libs/mpir/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-libs/mpir
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/mpir/ChangeLog,v 1.18 2013/02/19 16:03:02 tomka Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/mpir/ChangeLog,v 1.19 2013/05/22 16:20:34 tomka Exp $
+
+*mpir-2.6.0-r2 (22 May 2013)
+
+ 22 May 2013; Thomas Kahle <tomka@gentoo.org> +files/mpir-2.6.0-gcc48.patch,
+ +mpir-2.6.0-r2.ebuild:
+ fix tests with gcc-4.8 (bug 470838)
*mpir-2.6.0-r1 (19 Feb 2013)
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/mpir-2.6.0-r2.ebuild b/sci-libs/mpir/mpir-2.6.0-r2.ebuild
new file mode 100644
index 000000000000..1381aa6c951e
--- /dev/null
+++ b/sci-libs/mpir/mpir-2.6.0-r2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/mpir/mpir-2.6.0-r2.ebuild,v 1.1 2013/05/22 16:20:34 tomka Exp $
+
+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"
+KEYWORDS="~amd64 ~ppc ~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
+}