/[gentoo-x86]/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r3.ebuild
Gentoo

Contents of /sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Jan 1 14:28:37 2013 UTC (7 years ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Fix gmp dep, add test phase, add live ebuild

(Portage version: 2.2.0_alpha143/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r3.ebuild,v 1.2 2012/11/28 09:47:26 patrick Exp $
4
5 EAPI=4
6 DESCRIPTION="Elliptic Curve Method for Integer Factorization"
7 HOMEPAGE="http://ecm.gforge.inria.fr/"
8 SRC_URI="https://gforge.inria.fr/frs/download.php/30965/${P}.tar.gz"
9
10 inherit eutils
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="+custom-tune +gwnum -openmp"
16
17 DEPEND="dev-libs/gmp
18 gwnum? ( sci-mathematics/gwnum )
19 openmp? ( sys-devel/gcc[openmp] )"
20 RDEPEND="${DEPEND}"
21
22 # can't be both enabled
23 REQUIRED_USE="gwnum? ( !openmp )"
24
25 S=${WORKDIR}/ecm-${PV}
26
27 src_configure() {
28 if use gwnum; then myconf="--with-gwnum=/usr/lib"; fi
29 # --enable-shellcmd is broken
30 econf $(use_enable openmp) $myconf || die
31 }
32
33 src_compile() {
34 if use custom-tune; then
35 use amd64 && cd x86_64
36 use x86 && cd pentium4
37 emake -j1 || die # build libecm/libmulredc.la
38 cd .. && make bench_mulredc || die
39 sed -i -e 's:#define TUNE_MULREDC_TABLE://#define TUNE_MULREDC_TABLE:g' `readlink ecm-params.h` || die
40 sed -i -e 's:#define TUNE_SQRREDC_TABLE://#define TUNE_SQRREDC_TABLE:g' `readlink ecm-params.h` || die
41 ./bench_mulredc | tail -n 4 >> `readlink ecm-params.h` || die
42 fi
43 emake -j1 || die
44 }
45
46 src_install() {
47 emake DESTDIR="${D}" install || die
48 mkdir -p "${D}/usr/include/${PN}/"
49 cp "${S}"/*.h "${D}/usr/include/${PN}" || die "Failed to copy headers" # needed by other apps like YAFU
50 }

  ViewVC Help
Powered by ViewVC 1.1.20