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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Mar 10 09:02:26 2013 UTC (18 months, 3 weeks ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -2 lines
Fixing configure

(Portage version: 2.2.0_alpha166/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.4-r1.ebuild,v 1.1 2013/03/07 09:06:37 jlec Exp $
4
5 EAPI=5
6
7 inherit autotools eutils flag-o-matic multilib
8
9 DESCRIPTION="Elliptic Curve Method for Integer Factorization"
10 HOMEPAGE="http://ecm.gforge.inria.fr/"
11 SRC_URI="https://gforge.inria.fr/frs/download.php/32159/${P}.tar.gz"
12
13 LICENSE="GPL-3 LGPL-3"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="+blas +custom-tune gwnum -openmp static-libs 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_prepare() {
33 sed -e '/libecm_la_LIBADD/s:$: -lgmp:g' -i Makefile.am || die
34 eautoreconf
35 }
36
37 src_configure() {
38 use gwnum && local myconf="--with-gwnum="${EPREFIX}"/usr/$(get_libdir)"
39 # --enable-shellcmd is broken
40 econf \
41 --enable-shared \
42 $(use_enable static-libs static) \
43 $(use_enable openmp) \
44 ${myconf}
45 }
46
47 src_compile() {
48 append-ldflags "-Wl,-z,noexecstack"
49 if use custom-tune; then
50 use amd64 && cd x86_64
51 use x86 && cd pentium4
52 emake
53 cd .. && make bench_mulredc || die
54 sed -i -e 's:#define TUNE_MULREDC_TABLE://#define TUNE_MULREDC_TABLE:g' `readlink ecm-params.h` || die
55 sed -i -e 's:#define TUNE_SQRREDC_TABLE://#define TUNE_SQRREDC_TABLE:g' `readlink ecm-params.h` || die
56 ./bench_mulredc | tail -n 4 >> `readlink ecm-params.h` || die
57 fi
58 default
59 }
60
61 src_install() {
62 default
63 mkdir -p "${D}/usr/include/${PN}/"
64 cp "${S}"/*.h "${D}/usr/include/${PN}" || die "Failed to copy headers" # needed by other apps like YAFU
65 }

  ViewVC Help
Powered by ViewVC 1.1.20