1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit toolchain-funcs
8 DESCRIPTION="Fast public domain large integer arithmetic library"
9 HOMEPAGE="https://www.libtom.net/TomsFastMath/
10 https://github.com/libtom/tomsfastmath"
11 SRC_URI="https://github.com/libtom/tomsfastmath/releases/download/v${PV}/tfm-${PV}.tar.xz"
15 # Please bump when the ABI changes upstream
17 # https://abi-laboratory.pro/index.php?view=timeline&l=tomsfastmath
20 KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~sparc"
23 "${FILESDIR}/${P}-makefile-fix.patch"
27 # Standard boilerplate
28 # Upstream use homebrewed makefiles
29 # Best to use same args for all, for consistency,
30 # in case behaviour changes (v possible).
34 RANLIB="$(tc-getRANLIB)" \
36 LIBPATH="/usr/$(get_libdir)" \
42 _emake -f makefile.shared
46 _emake test_standalone stest rsatest
48 # We choose to be verbose during the test process
49 # because the output is quite repetitive with no
50 # clear demarcation b/t tests
51 local tests=( "test" "stest" "rsatest" )
54 for test in "${tests[@]}"; do
55 einfo "Running test (${test})"
56 ./${test} || die "Test (${test}) failed"
57 einfo "Completed test (${test})"
62 _emake -f makefile.shared install
64 # Remove unnecessary .la files
65 find "${ED}" -name '*.la' -delete || die
66 # Same for static libs
67 find "${ED}" -name "*.a" -delete || die