summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2013-01-06 14:24:33 +0000
committerPatrick Lauer <patrick@gentoo.org>2013-01-06 14:24:33 +0000
commit5f48011b0ce1e22f13b8aaaa3677e60baa940ad0 (patch)
treef53a875e3a5c28cb8b027335383d77e2a7a614d3 /sci-mathematics
parentAdding live ebuild (diff)
downloadgentoo-2-5f48011b0ce1e22f13b8aaaa3677e60baa940ad0.tar.gz
gentoo-2-5f48011b0ce1e22f13b8aaaa3677e60baa940ad0.tar.bz2
gentoo-2-5f48011b0ce1e22f13b8aaaa3677e60baa940ad0.zip
Add live ebuild
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/yafu/ChangeLog9
-rw-r--r--sci-mathematics/yafu/yafu-9999.ebuild58
2 files changed, 65 insertions, 2 deletions
diff --git a/sci-mathematics/yafu/ChangeLog b/sci-mathematics/yafu/ChangeLog
index 3fe962e9fac8..b536b2e6542d 100644
--- a/sci-mathematics/yafu/ChangeLog
+++ b/sci-mathematics/yafu/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sci-mathematics/yafu
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/yafu/ChangeLog,v 1.3 2012/11/28 08:12:53 patrick Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/yafu/ChangeLog,v 1.4 2013/01/06 14:24:33 patrick Exp $
+
+*yafu-9999 (06 Jan 2013)
+
+ 06 Jan 2013; Patrick Lauer <patrick@gentoo.org> +yafu-9999.ebuild:
+ Add live ebuild
28 Nov 2012; Patrick Lauer <patrick@gentoo.org> yafu-1.33-r1.ebuild:
Adding ggnfs dep
diff --git a/sci-mathematics/yafu/yafu-9999.ebuild b/sci-mathematics/yafu/yafu-9999.ebuild
new file mode 100644
index 000000000000..6832df91d5d6
--- /dev/null
+++ b/sci-mathematics/yafu/yafu-9999.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/yafu/yafu-9999.ebuild,v 1.1 2013/01/06 14:24:33 patrick Exp $
+
+EAPI=4
+DESCRIPTION="Yet another factoring utility"
+HOMEPAGE="http://sourceforge.net/projects/yafu/"
+#SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+ESVN_REPO_URI="https://yafu.svn.sourceforge.net/svnroot/yafu"
+
+inherit eutils subversion
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS=""
+# nfs is overloaded, so using less confusing sieve here
+IUSE="+sieve"
+
+DEPEND="dev-libs/gmp
+ sci-mathematics/gmp-ecm
+ sieve? ( sci-mathematics/msieve
+ sci-mathematics/ggnfs )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cd trunk
+ # 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"
+ sed -i -e 's:# LIBS += -L../msieve/lib/linux/x86_64:LIBS += -lmsieve -lz -ldl:' Makefile || die "Failed to rectify things"
+ sed -i -e 's:CFLAGS = -g:#CFLAGS = -g:' Makefile || die "Failed to rectify things"
+}
+
+src_compile() {
+ cd trunk
+ # hmm, not that useful:
+ #VAR="TIMING=1 "
+ if use sieve; then
+ VAR+="NFS=1"
+ fi
+ if use amd64; then
+ emake $VAR x86_64 || die "Failed to build"
+ fi
+ if use x86; then
+ emake $VAR x86 || die "Failed to build"
+ fi
+}
+
+src_install() {
+ mkdir -p "${D}/usr/bin/"
+ cp "${S}/trunk/yafu" "${D}/usr/bin/" || die "Failed to install"
+ mkdir -p "${D}/usr/share/doc/${PN}"
+ cp "${S}/trunk/docfile.txt" "${D}/usr/share/doc/${PN}/yafu.txt" || die "Failed to install"
+ cp "${S}/trunk/README" "${D}/usr/share/doc/${PN}/" || die "Failed to install"
+ cp "${S}/trunk/yafu.ini" "${D}/usr/share/doc/${PN}/yafu.ini.example" || die "Failed to install"
+}