summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2017-07-24 19:29:23 +0000
committerSébastien Fabbro <bicatali@gentoo.org>2017-07-24 19:32:43 +0000
commit225d0f08f014632aa519898bf333f7d3c02b5307 (patch)
tree2189b5d6746429b9150464f60cbeb89752ecf196 /sci-libs/mpir/mpir-3.0.0.ebuild
parentsci-libs/pgplot: fix for static build, prefix, and for EAPI6 (diff)
downloadgentoo-225d0f08f014632aa519898bf333f7d3c02b5307.tar.gz
gentoo-225d0f08f014632aa519898bf333f7d3c02b5307.tar.bz2
gentoo-225d0f08f014632aa519898bf333f7d3c02b5307.zip
sci-libs/mpir:
Package-Manager: Portage-2.3.6, Repoman-2.3.3
Diffstat (limited to 'sci-libs/mpir/mpir-3.0.0.ebuild')
-rw-r--r--sci-libs/mpir/mpir-3.0.0.ebuild72
1 files changed, 72 insertions, 0 deletions
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
+}