diff options
author | Patrick Lauer <patrick@gentoo.org> | 2012-11-28 08:11:17 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2012-11-28 08:11:17 +0000 |
commit | 2a688014d6aaaaaed4e6b3c993538ff0ae799d20 (patch) | |
tree | ccacad43f4fc27b1daebf912bedabbddd3a82a13 /sci-mathematics/gmp-ecm | |
parent | Initial import, ebuild by me (diff) | |
download | gentoo-2-2a688014d6aaaaaed4e6b3c993538ff0ae799d20.tar.gz gentoo-2-2a688014d6aaaaaed4e6b3c993538ff0ae799d20.tar.bz2 gentoo-2-2a688014d6aaaaaed4e6b3c993538ff0ae799d20.zip |
Adding gwnum dep
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'sci-mathematics/gmp-ecm')
-rw-r--r-- | sci-mathematics/gmp-ecm/ChangeLog | 8 | ||||
-rw-r--r-- | sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r2.ebuild | 4 | ||||
-rw-r--r-- | sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r3.ebuild | 50 | ||||
-rw-r--r-- | sci-mathematics/gmp-ecm/metadata.xml | 1 |
4 files changed, 60 insertions, 3 deletions
diff --git a/sci-mathematics/gmp-ecm/ChangeLog b/sci-mathematics/gmp-ecm/ChangeLog index 1087d52df43e..d4b1788882dd 100644 --- a/sci-mathematics/gmp-ecm/ChangeLog +++ b/sci-mathematics/gmp-ecm/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-mathematics/gmp-ecm # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gmp-ecm/ChangeLog,v 1.3 2012/11/25 07:36:31 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gmp-ecm/ChangeLog,v 1.4 2012/11/28 08:11:17 patrick Exp $ + +*gmp-ecm-6.4.3-r3 (28 Nov 2012) + + 28 Nov 2012; Patrick Lauer <patrick@gentoo.org> +gmp-ecm-6.4.3-r3.ebuild, + gmp-ecm-6.4.3-r2.ebuild, metadata.xml: + Adding gwnum dep *gmp-ecm-6.4.3-r2 (25 Nov 2012) diff --git a/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r2.ebuild b/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r2.ebuild index 8157ed2d681a..9b0b3bddd00c 100644 --- a/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r2.ebuild +++ b/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r2.ebuild,v 1.1 2012/11/25 07:36:31 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r2.ebuild,v 1.2 2012/11/28 08:11:17 patrick Exp $ EAPI=4 DESCRIPTION="Elliptic Curve Method for Integer Factorization" @@ -12,7 +12,7 @@ inherit eutils LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="custom-tune openmp" +IUSE="+custom-tune openmp" DEPEND="dev-libs/gmp openmp? ( sys-devel/gcc[openmp] )" diff --git a/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r3.ebuild b/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r3.ebuild new file mode 100644 index 000000000000..b576cd4b49f0 --- /dev/null +++ b/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r3.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r3.ebuild,v 1.1 2012/11/28 08:11:17 patrick Exp $ + +EAPI=4 +DESCRIPTION="Elliptic Curve Method for Integer Factorization" +HOMEPAGE="http://ecm.gforge.inria.fr/" +SRC_URI="https://gforge.inria.fr/frs/download.php/30965/${P}.tar.gz" + +inherit eutils + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+custom-tune +gwnum -openmp" + +DEPEND="dev-libs/gmp + gwnum? ( sci-mathematics/gwnum ) + openmp? ( sys-devel/gcc[openmp] )" +RDEPEND="${DEPEND}" + +# can't be both enabled +REQUIRED_USE="gwnum? ( !openmp )" + +S=${WORKDIR}/ecm-${PV} + +src_configure() { + if use gwnum; then myconf="--with-gwnum=/usr/lib"; fi + # --enable-shellcmd is broken + econf $(use_enable openmp) $myconf || die +} + +src_compile() { + if use custom-tune; then + use amd64 && cd x86_64 + use x86 && cd pentium4 + emake || die # build libecm/libmulredc.la + cd .. && make bench_mulredc || die + sed -i -e 's:#define TUNE_MULREDC_TABLE://#define TUNE_MULREDC_TABLE:g' `readlink ecm-params.h` || die + sed -i -e 's:#define TUNE_SQRREDC_TABLE://#define TUNE_SQRREDC_TABLE:g' `readlink ecm-params.h` || die + ./bench_mulredc | tail -n 4 >> `readlink ecm-params.h` || die + fi + emake || die +} + +src_install() { + emake DESTDIR="${D}" install || die + mkdir -p "${D}/usr/include/${PN}/" + cp "${S}"/*.h "${D}/usr/include/${PN}" || die "Failed to copy headers" # needed by other apps like YAFU +} diff --git a/sci-mathematics/gmp-ecm/metadata.xml b/sci-mathematics/gmp-ecm/metadata.xml index 943079ae9149..33cbddc879e8 100644 --- a/sci-mathematics/gmp-ecm/metadata.xml +++ b/sci-mathematics/gmp-ecm/metadata.xml @@ -7,5 +7,6 @@ </maintainer> <use> <flag name='custom-tune'>Improve performance of some operations by selecting machine-specific defaults</flag> + <flag name='gwnum'>Use GWNum lib where possible</flag> </use> </pkgmetadata> |