mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-libs/ntl: new revision to fix the x86 build (and drop static-libs).
Bug: https://bugs.gentoo.org/815775 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
This commit is contained in:
@@ -12,7 +12,7 @@ SRC_URI="https://www.shoup.net/ntl/${P}.tar.gz"
|
||||
LICENSE="LGPL-2.1+"
|
||||
SLOT="0/44"
|
||||
KEYWORDS="~amd64 ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
IUSE="doc static-libs threads cpu_flags_x86_avx2"
|
||||
IUSE="doc threads cpu_flags_x86_avx2"
|
||||
|
||||
BDEPEND="dev-lang/perl"
|
||||
DEPEND="dev-libs/gmp:0=
|
||||
@@ -35,6 +35,16 @@ src_configure() {
|
||||
export CC="$(tc-getCC)"
|
||||
export CXX="$(tc-getCXX)"
|
||||
|
||||
# The "AVX2" detection within NTL does more than just detect AVX2;
|
||||
# it also checks that (for example) the size of a "long" is 64 bits.
|
||||
# If we try to enable the AVX FFT (based on the avx2 cpu flag) and
|
||||
# if NTL determines that AVX2 is unusable for some other reason,
|
||||
# then the build will fail (bug 815775). To work around that, we
|
||||
# disable the AVX FFT on x86 entirely. This still isn't perfect, but
|
||||
# it should fix the cases we know about.
|
||||
local avx_fft=$(usex cpu_flags_x86_avx2 on off)
|
||||
use x86 && avx_fft=off
|
||||
|
||||
# Currently the build system can build a static library or both
|
||||
# static and shared libraries, but not only shared libraries. The
|
||||
# name NTL_GMP_LIP is *not* a typo.
|
||||
@@ -51,7 +61,7 @@ src_configure() {
|
||||
NTL_GMP_LIP=on \
|
||||
NTL_GF2X_LIB=on \
|
||||
NTL_THREADS=$(usex threads on off) \
|
||||
NTL_ENABLE_AVX_FFT=$(usex cpu_flags_x86_avx2 on off) \
|
||||
NTL_ENABLE_AVX_FFT="${avx_fft}" \
|
||||
NATIVE=off \
|
||||
|| die "DoConfig failed"
|
||||
|
||||
@@ -66,15 +76,11 @@ src_configure() {
|
||||
|
||||
src_install() {
|
||||
default
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
|
||||
if ! use static-libs; then
|
||||
# bug #775884
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
|
||||
# Use rm -f because the static archive may not be created when
|
||||
# using (for example) slibtool-shared.
|
||||
rm -f "${ED}/usr/$(get_libdir)"/libntl.a || die
|
||||
fi
|
||||
# Use rm -f because the static archive may not be created when
|
||||
# using (for example) slibtool-shared.
|
||||
rm -f "${ED}/usr/$(get_libdir)"/libntl.a || die
|
||||
|
||||
rm -r "${ED}"/usr/share/doc/NTL || die
|
||||
}
|
||||
Reference in New Issue
Block a user