From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 19BED158091 for ; Mon, 20 Jun 2022 02:03:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 07436E0CB1; Mon, 20 Jun 2022 02:03:39 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E07FCE0CB1 for ; Mon, 20 Jun 2022 02:03:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 98D7634178B for ; Mon, 20 Jun 2022 02:03:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CEBD450B for ; Mon, 20 Jun 2022 02:03:35 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1655690606.804f5a2e842505c50952abbeb716aef498701bf7.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/ntl/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/ntl/ntl-11.5.1-r2.ebuild X-VCS-Directories: dev-libs/ntl/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 804f5a2e842505c50952abbeb716aef498701bf7 X-VCS-Branch: master Date: Mon, 20 Jun 2022 02:03:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 982db826-7a4d-4b8b-a20a-ac424882b073 X-Archives-Hash: d411d2cc4fc3139cc9b73b585a5f37cd commit: 804f5a2e842505c50952abbeb716aef498701bf7 Author: orbea riseup net> AuthorDate: Sun Jun 19 02:56:25 2022 +0000 Commit: Sam James gentoo org> CommitDate: Mon Jun 20 02:03:26 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=804f5a2e dev-libs/ntl: Fix build with rlibtool + remove USE The build fails with rlibtool because the generated libtool is in the libtool-build directory. The easiest way to work around this is to symlink it in place. The bindist USE flag controls the NATIVE argument for ntl's DoConfig which enables or disables -march=native. The user should set -march flags on their own and not the build system. Bug: https://bugs.gentoo.org/780534 Signed-off-by: orbea riseup.net> Closes: https://github.com/gentoo/gentoo/pull/25967 Signed-off-by: Sam James gentoo.org> dev-libs/ntl/ntl-11.5.1-r2.ebuild | 80 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/dev-libs/ntl/ntl-11.5.1-r2.ebuild b/dev-libs/ntl/ntl-11.5.1-r2.ebuild new file mode 100644 index 000000000000..fd3a3c4dcc5d --- /dev/null +++ b/dev-libs/ntl/ntl-11.5.1-r2.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2022 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" + +LICENSE="LGPL-2.1+" +SLOT="0/44" +KEYWORDS="~amd64 ~arm64 ~ppc ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="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" + +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. + 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=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 + + 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 + + rm -r "${ED}"/usr/share/doc/NTL || die +}