gentoo-ebuilds/sci-mathematics/yafu/yafu-1.34.3-r2.ebuild
NHOrus ae2dae47a6
sci-mathematics/yafu: update EAPI 7 -> 8, fix build failure
Tricky problem with openmp types, consolidating seds, old patch and
fix-up for allowing toolchain functions and system environment into
one patch file

Closes: https://bugs.gentoo.org/920324
Closes: https://bugs.gentoo.org/774099
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40707
Signed-off-by: Sam James <sam@gentoo.org>
2025-02-24 21:26:09 +00:00

51 lines
998 B
Bash

# 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
}