# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 DESCRIPTION="(GMP-ECM) Elliptic Curve Method for Integer Factorization" HOMEPAGE="http://gforge.inria.fr/projects/ecm/" SRC_URI="http://gforge.inria.fr/frs/download.php/4837/${P}.tar.gz" inherit autotools LICENSE="GPL-2, LGPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="asm-redc debug openmp shellcmd sse2" DEPEND=">=dev-libs/gmp-4.2.2 openmp? ( >=sys-devel/gcc-4.2[openmp] )" RDEPEND="${DEPEND}" src_prepare() { epatch "${FILESDIR}/configure.patch" epatch "${FILESDIR}/makefile.patch" epatch "${FILESDIR}/execstack.patch" epatch "${FILESDIR}/execstack-redc.patch" eautoreconf } src_configure() { local myconf="--prefix=/usr --enable-shared $(use_enable sse2) $(use_enable openmp) $(use_enable asm-redc) $(use_enable shellcmd)" use debug && myconf="${myconf} --enable-memory-debug --enable-assert" econf ${myconf} || die "econf failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" dodoc TODO NEWS README README.lib }