From 766ccf333003215d0b0d0fc3b86a84eb52a7feb4 Mon Sep 17 00:00:00 2001 From: Jakov Smolic Date: Thu, 27 May 2021 23:05:41 +0200 Subject: sci-libs/mpir: Port to EAPI 7, drop static-libs Signed-off-by: Jakov Smolic Signed-off-by: David Seifert --- sci-libs/mpir/files/mpir-2.7.2-ABI-multilib.patch | 4 +- sci-libs/mpir/mpir-3.0.0-r1.ebuild | 75 ++++++++++++++++++++++ sci-libs/mpir/mpir-3.0.0.ebuild | 77 ----------------------- 3 files changed, 77 insertions(+), 79 deletions(-) create mode 100644 sci-libs/mpir/mpir-3.0.0-r1.ebuild delete mode 100644 sci-libs/mpir/mpir-3.0.0.ebuild (limited to 'sci-libs') 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 index f02df55ccf98..100a6ae7088d 100644 --- a/sci-libs/mpir/files/mpir-2.7.2-ABI-multilib.patch +++ b/sci-libs/mpir/files/mpir-2.7.2-ABI-multilib.patch @@ -1,5 +1,5 @@ ---- a/configure.ac 2009-11-28 10:48:59.196977657 +0000 -+++ b/configure.ac 2009-11-28 10:54:50.717976971 +0000 +--- a/configure.ac ++++ b/configure.ac @@ -361,7 +361,7 @@ # hugely bloat the output. diff --git a/sci-libs/mpir/mpir-3.0.0-r1.ebuild b/sci-libs/mpir/mpir-3.0.0-r1.ebuild new file mode 100644 index 000000000000..eab814932b38 --- /dev/null +++ b/sci-libs/mpir/mpir-3.0.0-r1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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="~alpha amd64 arm ~arm64 hppa ~ia64 ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux" +IUSE="+cxx cpudetection" + +BDEPEND=" + x86? ( dev-lang/yasm ) + amd64? ( dev-lang/yasm ) +" + +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 || die + + #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 || die + + %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) + --disable-static + ) + # https://bugs.gentoo.org/661430 + if ! use amd64 && ! use x86; then + myeconfargs+=( --with-yasm="${BROOT}"/bin/false ) + fi + econf "${myeconfargs[@]}" +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} diff --git a/sci-libs/mpir/mpir-3.0.0.ebuild b/sci-libs/mpir/mpir-3.0.0.ebuild deleted file mode 100644 index ccd38ea08c0d..000000000000 --- a/sci-libs/mpir/mpir-3.0.0.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# 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="~alpha amd64 arm ~arm64 hppa ~ia64 ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux" -IUSE="+cxx cpudetection static-libs" - -DEPEND=" - x86? ( dev-lang/yasm ) - amd64? ( dev-lang/yasm ) - amd64-fbsd? ( 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) - ) - # https://bugs.gentoo.org/661430 - if ! use amd64 && ! use x86; then - myeconfargs+=( --with-yasm=/bin/false ) - fi - econf "${myeconfargs[@]}" -} - -src_install() { - default - use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*la -} -- cgit v1.2.3-65-gdbad