diff options
Diffstat (limited to 'sci-mathematics/yafu/yafu-1.33.ebuild')
-rw-r--r-- | sci-mathematics/yafu/yafu-1.33.ebuild | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/sci-mathematics/yafu/yafu-1.33.ebuild b/sci-mathematics/yafu/yafu-1.33.ebuild new file mode 100644 index 000000000000..be1868ef9e3a --- /dev/null +++ b/sci-mathematics/yafu/yafu-1.33.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/yafu/yafu-1.33.ebuild,v 1.1 2012/11/19 07:41:56 patrick Exp $ + +EAPI=4 +DESCRIPTION="Yet another factoring utility" +HOMEPAGE="http://sourceforge.net/projects/yafu/" +SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip" + +inherit eutils + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="dev-libs/gmp + sci-mathematics/gmp-ecm" +RDEPEND="${DEPEND}" + +src_prepare() { + # This is not nice. But then the Makefile is quite special :) + sed -i -e 's:../gmp/include:gmp:' Makefile || die "Failed to rectify things" + sed -i -e 's:../gmp-ecm/include:gmp-ecm:' Makefile || die "Failed to rectify things" + sed -i -e 's:LIBS += -L../:# LIBS += -L../:g' Makefile || die "Failed to rectify things" + sed -i -e 's:\"config.h\":<gmp-ecm/config.h>:g' top/driver.c || die "Failed to rectify things" +} + +src_compile() { + if use amd64; then + emake x86_64 || die "Failed to build" + fi + if use x86; then + emake x86 || die "Failed to build" + fi +} + +src_install() { + mkdir -p "${D}/usr/bin/" + cp "${S}/yafu" "${D}/usr/bin/" || die "Failed to install" + mkdir -p "${D}/usr/share/doc/${PN}" + cp "${S}/docfile.txt" "${D}/usr/share/doc/${PN}/yafu.txt" || die "Failed to install" + cp "${S}/README" "${D}/usr/share/doc/${PN}/" || die "Failed to install" + cp "${S}/yafu.ini" "${D}/usr/share/doc/${PN}/yafu.ini.example" || die "Failed to install" +} |