blob: 342b94dbcb0683715bb2b50fe210584fa811804d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic edos2unix toolchain-funcs
MY_PV="$(ver_cut 1-2)"
DESCRIPTION="Yet another factoring utility"
HOMEPAGE="https://sourceforge.net/projects/yafu/"
SRC_URI="https://downloads.sourceforge.net/${PN}/${MY_PV}/${PN}-${MY_PV}-src.zip"
LICENSE="public-domain"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND="
|| (
>=sys-devel/gcc-4.2:*[openmp]
llvm-core/clang-runtime:*[openmp]
)
dev-libs/gmp:0=
sci-mathematics/gmp-ecm"
RDEPEND="${DEPEND}"
BDEPEND="app-arch/unzip"
PATCHES=(
"${FILESDIR}"/${P}-fix-makefiles.patch
"${FILESDIR}"/${P}-mpz_set.patch
)
src_prepare() {
edos2unix top/eratosthenes/soe_util.c factor/factor_common.c
default
}
src_compile() {
tc-export CC
append-cflags -fcommon
use amd64 && emake x86_64
use x86 && emake x86
}
src_test() {
"${S}"/yafu "factor(121)" || die
}
src_install() {
dobin "${S}"/yafu
dodoc docfile.txt README yafu.ini
}
|