summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2020-03-24 14:05:29 -0400
committerMichael Orlitzky <mjo@gentoo.org>2020-03-24 14:20:30 -0400
commit61c774894ebc9a92986363b21f8a537ea000447f (patch)
treebf00d2fc4f4b640e85203e0266447dbdb099f38b /dev-libs/ntl/ntl-11.4.3.ebuild
parentapp-admin/sysrqd: remove unneeded dodir (diff)
downloadgentoo-61c774894ebc9a92986363b21f8a537ea000447f.tar.gz
gentoo-61c774894ebc9a92986363b21f8a537ea000447f.tar.bz2
gentoo-61c774894ebc9a92986363b21f8a537ea000447f.zip
dev-libs/ntl: new version 11.4.3.
Update to the latest version using François Bissey's ebuild from the sage-on-gentoo overlay. I've updated the LICENSE to LGPL-2.1+ per the project's homepage, and have removed the CFLAGS override since now NTL builds and passes its test suite with -O3 (if you set anything higher than that, you're on your own). I've also tried to simplify a few of the usex calls in the DoConfig process. Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'dev-libs/ntl/ntl-11.4.3.ebuild')
-rw-r--r--dev-libs/ntl/ntl-11.4.3.ebuild62
1 files changed, 62 insertions, 0 deletions
diff --git a/dev-libs/ntl/ntl-11.4.3.ebuild b/dev-libs/ntl/ntl-11.4.3.ebuild
new file mode 100644
index 000000000000..ff46212b8526
--- /dev/null
+++ b/dev-libs/ntl/ntl-11.4.3.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit toolchain-funcs
+
+DESCRIPTION="High-performance and portable C++ number theory library"
+HOMEPAGE="https://www.shoup.net/ntl/"
+SRC_URI="https://www.shoup.net/ntl/${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0/43"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="bindist doc static-libs threads cpu_flags_x86_avx2"
+
+BDEPEND="dev-lang/perl"
+DEPEND="dev-libs/gmp:0=
+ dev-libs/gf2x
+ threads? ( >=dev-libs/gf2x-1.2 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P}/src"
+
+REQUIRED_USE="bindist? ( !cpu_flags_x86_avx2 )"
+
+DOCS=( "${WORKDIR}/${P}"/README )
+
+src_configure() {
+ # 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.
+ perl DoConfig \
+ PREFIX="${EPREFIX}"/usr \
+ LIBDIR="${EPREFIX}"/usr/$(get_libdir) \
+ CXXFLAGS="${CXXFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ SHARED=on \
+ 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) \
+ NATIVE=$(usex bindist off on) \
+ || die "DoConfig failed"
+
+ if use doc; then
+ DOCS+=( "${WORKDIR}/${P}"/doc/*.txt )
+ HTML_DOCS=( "${WORKDIR}/${P}"/doc/*.html "${WORKDIR}/${P}"/doc/*.gif )
+ fi
+}
+
+src_install() {
+ default
+ if ! use static-libs; then
+ rm "${ED}/usr/$(get_libdir)"/libntl.{la,a} || die
+ fi
+
+ rm -r "${ED}"/usr/share/doc/NTL || die
+}