You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.2 KiB
54 lines
1.2 KiB
4 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
12 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
12 years ago
|
|
||
4 years ago
|
EAPI=7
|
||
12 years ago
|
|
||
4 years ago
|
inherit flag-o-matic
|
||
12 years ago
|
|
||
4 years ago
|
MY_PV="$(ver_cut 1-2)"
|
||
12 years ago
|
DESCRIPTION="Yet another factoring utility"
|
||
8 years ago
|
HOMEPAGE="https://sourceforge.net/projects/yafu/"
|
||
12 years ago
|
SRC_URI="mirror://sourceforge/${PN}/${MY_PV}/${PN}-${MY_PV}-src.zip"
|
||
12 years ago
|
|
||
|
SLOT="0"
|
||
12 years ago
|
LICENSE="public-domain"
|
||
12 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
|
|
||
12 years ago
|
DEPEND="
|
||
8 years ago
|
dev-libs/gmp:0=
|
||
4 years ago
|
sci-mathematics/gmp-ecm"
|
||
12 years ago
|
RDEPEND="${DEPEND}"
|
||
4 years ago
|
BDEPEND="app-arch/unzip"
|
||
|
|
||
|
PATCHES=( "${FILESDIR}"/${P}-Makefile.patch )
|
||
12 years ago
|
|
||
|
src_prepare() {
|
||
4 years ago
|
default
|
||
|
sed -i \
|
||
|
-e 's:../gmp/include:gmp:' \
|
||
|
-e 's:../gmp-ecm/include:gmp-ecm:' \
|
||
|
-e 's:# LIBS += -L../msieve/lib/linux/x86_64:LIBS += -lmsieve -lz -ldl:' \
|
||
|
-e 's:CFLAGS = -g:#CFLAGS = -g:' \
|
||
|
-e '/$(LIBS)$/s:$(CC):$(CC) $(LDFLAGS):g' Makefile || die
|
||
|
sed -i -e 's:\"config.h\":<gmp-ecm/config.h>:g' top/driver.c || die
|
||
12 years ago
|
|
||
|
# proper ggnfs default path
|
||
4 years ago
|
sed -i -e 's~strcpy(fobj->nfs_obj.ggnfs_dir,"./");~strcpy(fobj->nfs_obj.ggnfs_dir,"/usr/bin/");~' factor/factor_common.c || die
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
append-cflags -fcommon
|
||
|
default
|
||
12 years ago
|
}
|
||
|
|
||
|
src_compile() {
|
||
4 years ago
|
local VAR
|
||
12 years ago
|
use amd64 && emake $VAR x86_64
|
||
|
use x86 && emake $VAR x86
|
||
12 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
4 years ago
|
dobin "${S}"/yafu
|
||
12 years ago
|
dodoc docfile.txt README yafu.ini
|
||
12 years ago
|
}
|