commit:     eb6622d02d2f24ff14e7bab7ae98961bc32134ad
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  8 21:55:30 2025 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Nov  8 22:02:09 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb6622d0

dev-libs/ntl: add 11.6.0

Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 dev-libs/ntl/Manifest          |  1 +
 dev-libs/ntl/ntl-11.6.0.ebuild | 86 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)

diff --git a/dev-libs/ntl/Manifest b/dev-libs/ntl/Manifest
index e07916ee1821..ffae528fa3cf 100644
--- a/dev-libs/ntl/Manifest
+++ b/dev-libs/ntl/Manifest
@@ -1 +1,2 @@
 DIST ntl-11.5.1.tar.gz 2304103 BLAKE2B 
92284383451c7a810f7ee8d9a82836695d19d2a2e46b71c8c60b00acb77f4b4d3bad5497a309616a3e3188567d20203f5ad31295130ab0f3ace08417188c9fda
 SHA512 
cf1f642b8a0f9cdc6dda888e07183817dc67ff494e56a852053aeb15b3d2a0e61fbc05824779c5d1f20b8115fba6f97266acf7e0b0b527c25df5989c86d5928f
+DIST ntl-11.6.0.tar.gz 2599487 BLAKE2B 
869add1e5992a2d0f0399f9af1062f67eeb482cf18e34d047c9db33c4e5c589740de950d1e41a19f33940448a609a22768daebe5c0b8e4cdfececb935e84098c
 SHA512 
7801e8a2b866f40b61af494291e888a0a4065e843d27c3ab38f61e93e76b6b5153906aea58d6cf4e5638f1f50f640f5c69548065c4d76c83c9820573a4852b3a

diff --git a/dev-libs/ntl/ntl-11.6.0.ebuild b/dev-libs/ntl/ntl-11.6.0.ebuild
new file mode 100644
index 000000000000..3d840ebe5459
--- /dev/null
+++ b/dev-libs/ntl/ntl-11.6.0.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs gnuconfig
+
+DESCRIPTION="High-performance and portable C++ number theory library"
+HOMEPAGE="https://www.shoup.net/ntl/ https://github.com/libntl/ntl";
+SRC_URI="https://www.shoup.net/ntl/${P}.tar.gz";
+S="${WORKDIR}/${P}/src"
+
+LICENSE="LGPL-2.1+"
+SLOT="0/45"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux 
~ppc-macos ~x64-macos"
+IUSE="doc threads"
+
+BDEPEND="dev-lang/perl"
+DEPEND="dev-libs/gmp:0=
+       dev-libs/gf2x
+       threads? ( >=dev-libs/gf2x-1.2 )"
+RDEPEND="${DEPEND}"
+
+DOCS=( "${WORKDIR}/${P}"/README )
+
+src_unpack() {
+       default
+       gnuconfig_update "${S}/libtool-origin/"
+}
+
+src_configure() {
+       # The DoConfig script builds its own libtool, but doesn't
+       # really try to set up the build environment (bug 718892).
+       export CC="$(tc-getCC)"
+       export CXX="$(tc-getCXX)"
+
+       # 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.
+       #
+       # We have left NTL_ENABLE_AVX_FFT unconditionally disabled: NTL's
+       # AVX2 detection can fail even when the CPU supports it (bug
+       # 815775), and moreover, can fail due to CXXFLAGS. When that
+       # happens, and if we try to use the AVX FFT, the build fails.
+       # Finally, doc/config.txt says, "this is experimental at moment, and
+       # may lead to worse performance." So we are probably not missing out
+       # on much.
+       #
+       perl DoConfig \
+               PREFIX="${EPREFIX}"/usr \
+               LIBDIR="${EPREFIX}"/usr/$(get_libdir) \
+               PKGDIR="${EPREFIX}"/usr/$(get_libdir)/pkgconfig \
+               CXXFLAGS="${CXXFLAGS}" \
+               CPPFLAGS="${CPPFLAGS}" \
+               LDFLAGS="${LDFLAGS}" \
+               CXX="$(tc-getCXX)" \
+               AR="$(tc-getAR)" \
+               RANLIB="$(tc-getRANLIB)" \
+               SHARED=on \
+               ENABLE_RPATH=off \
+               NTL_GMP_LIP=on \
+               NTL_GF2X_LIB=on \
+               NTL_THREADS=$(usex threads on off) \
+               NTL_ENABLE_AVX_FFT=off \
+               NATIVE=off \
+               || die "DoConfig failed"
+
+       if use doc; then
+               DOCS+=( "${WORKDIR}/${P}"/doc/*.txt )
+               HTML_DOCS=( "${WORKDIR}/${P}"/doc/*.html 
"${WORKDIR}/${P}"/doc/*.gif )
+       fi
+
+       # 780534 - Required for rlibtool so it can find the generated libtool
+       ln -sf libtool-build/libtool . || die
+}
+
+src_install() {
+       default
+       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
+
+       rm -r "${ED}"/usr/share/doc/NTL || die
+}

Reply via email to