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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Jan 1 17:08:45 2013 UTC (7 years, 6 months ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Add blas useflag

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

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

  ViewVC Help
Powered by ViewVC 1.1.20