/[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.3 - (hide annotations) (download)
Wed Mar 11 04:19:52 2015 UTC (5 years, 4 months ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +4 -4 lines
Fix prefix paths #466852

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

1 patrick 1.3 # Copyright 1999-2015 Gentoo Foundation
2 jlec 1.1 # Distributed under the terms of the GNU General Public License v2
3 patrick 1.3 # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gmp-ecm/gmp-ecm-6.4.4-r1.ebuild,v 1.2 2013/03/10 09:02:26 patrick Exp $
4 jlec 1.1
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 patrick 1.2 $(use_enable static-libs static) \
43 jlec 1.1 $(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 patrick 1.3 mkdir -p "${ED}/usr/include/${PN}/"
64     cp "${S}"/*.h "${ED}/usr/include/${PN}" || die "Failed to copy headers" # needed by other apps like YAFU
65 jlec 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20