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

Contents of /sci-mathematics/gmp-ecm/gmp-ecm-6.4.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Mar 7 09:06:37 2013 UTC (6 years, 10 months ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
sci-mathematics/gmp-ecm: Fix underlinking; add static-libs support

(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.4.ebuild,v 1.2 2013/03/07 08:05:21 jlec Exp $
4
5 EAPI=5
6
7 DESCRIPTION="Elliptic Curve Method for Integer Factorization"
8 HOMEPAGE="http://ecm.gforge.inria.fr/"
9 SRC_URI="https://gforge.inria.fr/frs/download.php/32159/${P}.tar.gz"
10
11 inherit eutils flag-o-matic
12
13 LICENSE="GPL-3 LGPL-3"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="+blas +custom-tune gwnum -openmp test"
17
18 DEPEND="
19 dev-libs/gmp
20 blas? ( sci-libs/gsl )
21 gwnum? ( sci-mathematics/gwnum )
22 openmp? ( sys-devel/gcc[openmp] )"
23 RDEPEND="${DEPEND}"
24
25 # can't be both enabled
26 REQUIRED_USE="gwnum? ( !openmp )"
27
28 S=${WORKDIR}/ecm-${PV}
29
30 MAKEOPTS+=" -j1"
31
32 src_configure() {
33 if use gwnum; then myconf="--with-gwnum=/usr/lib"; fi
34 # --enable-shellcmd is broken
35 econf $(use_enable openmp) $myconf
36 }
37
38 src_compile() {
39 append-ldflags "-Wl,-z,noexecstack"
40 if use custom-tune; then
41 use amd64 && cd x86_64
42 use x86 && cd pentium4
43 emake
44 cd .. && make bench_mulredc || die
45 sed -i -e 's:#define TUNE_MULREDC_TABLE://#define TUNE_MULREDC_TABLE:g' `readlink ecm-params.h` || die
46 sed -i -e 's:#define TUNE_SQRREDC_TABLE://#define TUNE_SQRREDC_TABLE:g' `readlink ecm-params.h` || die
47 ./bench_mulredc | tail -n 4 >> `readlink ecm-params.h` || die
48 fi
49 default
50 }
51
52 src_install() {
53 default
54 mkdir -p "${D}/usr/include/${PN}/"
55 cp "${S}"/*.h "${D}/usr/include/${PN}" || die "Failed to copy headers" # needed by other apps like YAFU
56 }

  ViewVC Help
Powered by ViewVC 1.1.20