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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Mar 7 08:05:21 2013 UTC (2 years, 1 month ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -2 lines
sci-mathematics/gmp-ecm: Fix download location; bump to EAPI=5 and clean some die

(Portage version: 2.2.0_alpha166/cvs/Linux x86_64, signed Manifest commit with key 70EB7916)

1 # Copyright 1999-2013 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-r5.ebuild,v 1.1 2013/01/01 17:08:45 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-3 LGPL-3"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="+blas +custom-tune gwnum -openmp test"
16
17 # gmp 5.1 breaks a few things with this version
18 DEPEND="<dev-libs/gmp-5.1.0
19 blas? ( sci-libs/gsl )
20 gwnum? ( sci-mathematics/gwnum )
21 openmp? ( sys-devel/gcc[openmp] )"
22 RDEPEND="${DEPEND}"
23
24 # can't be both enabled
25 REQUIRED_USE="gwnum? ( !openmp )"
26
27 S=${WORKDIR}/ecm-${PV}
28
29 src_configure() {
30 if use gwnum; then myconf="--with-gwnum=/usr/lib"; fi
31 # --enable-shellcmd is broken
32 econf $(use_enable openmp) $myconf
33 }
34
35 src_compile() {
36 if use custom-tune; then
37 use amd64 && cd x86_64
38 use x86 && cd pentium4
39 emake -j1 || die # build libecm/libmulredc.la
40 cd .. && make bench_mulredc || die
41 sed -i -e 's:#define TUNE_MULREDC_TABLE://#define TUNE_MULREDC_TABLE:g' `readlink ecm-params.h` || die
42 sed -i -e 's:#define TUNE_SQRREDC_TABLE://#define TUNE_SQRREDC_TABLE:g' `readlink ecm-params.h` || die
43 ./bench_mulredc | tail -n 4 >> `readlink ecm-params.h` || die
44 fi
45 emake -j1 || die
46 }
47
48 src_install() {
49 emake DESTDIR="${D}" install || die
50 mkdir -p "${D}/usr/include/${PN}/"
51 cp "${S}"/*.h "${D}/usr/include/${PN}" || die "Failed to copy headers" # needed by other apps like YAFU
52 }
53
54 src_test() {
55 make check || die
56 }

  ViewVC Help
Powered by ViewVC 1.1.20