From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/flint/, sci-mathematics/flint/files/
Date: Sun, 24 Dec 2023 04:29:12 +0000 (UTC) [thread overview]
Message-ID: <1703391494.92e78412b4cfab142f98c25a4de65386f8f54da9.mjo@gentoo> (raw)
commit: 92e78412b4cfab142f98c25a4de65386f8f54da9
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 24 04:17:42 2023 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sun Dec 24 04:18:14 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92e78412
sci-mathematics/flint: add 3.0.1
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
sci-mathematics/flint/Manifest | 1 +
.../flint/files/flint-3.0.1-find-cblas.patch | 44 ++++++++++++
sci-mathematics/flint/flint-3.0.1.ebuild | 81 ++++++++++++++++++++++
3 files changed, 126 insertions(+)
diff --git a/sci-mathematics/flint/Manifest b/sci-mathematics/flint/Manifest
index de7412c463e2..730cca7ed921 100644
--- a/sci-mathematics/flint/Manifest
+++ b/sci-mathematics/flint/Manifest
@@ -1 +1,2 @@
DIST flint-2.9.0.tar.gz 5283894 BLAKE2B a790437ee142d8acb5cec1e6c7d21812f8d83f5d30d1e8c07e799713e96791d87792f25fbd4ce2d0d68f6a8ee2f0cde2b8d9f8db8ab26922a48485e0e90394aa SHA512 4494cba6a4e215e817d7c74ef6834c4e05a832488f4808bbd7bea8b02a4a35d47ef3c63a4f213230c712b32842f5588c503fc1cf23e5e2ddc4a4a5a1627a02ba
+DIST flint-3.0.1.tar.gz 7624944 BLAKE2B 0d94252075945f39af3dd2e49803cbe16aa65b108964dfc0c12bdfd9188748944c1e839401e17b974f8f6f8832e4da84d62a63f20b63cfff0ff5c2736bfd2d47 SHA512 4b5b432b962135cd708a0ce4242343f3226f0fdf73c3f541728ed4540e7ef6cb7812a48b6b46e65a8fcc1f5cae93d8bb59838d24728024cd9aa0f7b8e5c6f98f
diff --git a/sci-mathematics/flint/files/flint-3.0.1-find-cblas.patch b/sci-mathematics/flint/files/flint-3.0.1-find-cblas.patch
new file mode 100644
index 000000000000..77a9ed2e888f
--- /dev/null
+++ b/sci-mathematics/flint/files/flint-3.0.1-find-cblas.patch
@@ -0,0 +1,44 @@
+From 5cb3535b911c78adb9c8a908104fc4be3ffbfe51 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 23 Dec 2023 14:38:46 -0500
+Subject: [PATCH 1/1] CMake/FindCBLAS.cmake: search only for cblas
+
+On Gentoo, users can "eselect cblas" to choose a cblas implementation
+at runtime. Packages build against the reference cblas, but the others
+are (by design) compatible, so we can force one to take precedence at
+runtime with an ld.so.conf entry. But that only works when consumers
+link to libcblas.so. If they link directly to (say) openblas, then
+changing how libcblas.so resolves won't help.
+
+When Flint tries to find "cblas," it looks for accelerate and openblas
+before plain cblas. That runs afoul of the scheme described above. To
+remedy it, we patch the search function so that only "cblas" is
+considered. Since virtual/cblas always pulls in the reference
+implementation, there'd be no point in altering the search order to
+consider e.g. openblas after cblas.
+---
+ CMake/FindCBLAS.cmake | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/CMake/FindCBLAS.cmake b/CMake/FindCBLAS.cmake
+index f5b5b1c..f4919f4 100644
+--- a/CMake/FindCBLAS.cmake
++++ b/CMake/FindCBLAS.cmake
+@@ -11,13 +11,11 @@
+ find_path(CBLAS_INCLUDE_DIRS NAMES cblas.h
+ HINTS CBLAS_ROOT ENV CBLAS_ROOT
+ PATHS ${INCLUDE_INSTALL_DIR} ${CMAKE_INSTALL_PREFIX}/include
+- PATH_SUFFIXES openblas cblas blis flexiblas
+ )
+
+-find_library(CBLAS_LIBRARIES NAMES accelerate openblas cblas blas blis flexiblas
++find_library(CBLAS_LIBRARIES NAMES cblas
+ HINTS CBLAS_ROOT ENV CBLAS_ROOT
+ PATHS ${LIB_INSTALL_DIR} ${CMAKE_INSTALL_PREFIX}/lib
+- PATH_SUFFIXES openblas cblas blis flexiblas
+ )
+
+ include(FindPackageHandleStandardArgs)
+--
+2.41.0
+
diff --git a/sci-mathematics/flint/flint-3.0.1.ebuild b/sci-mathematics/flint/flint-3.0.1.ebuild
new file mode 100644
index 000000000000..7f24b83f5744
--- /dev/null
+++ b/sci-mathematics/flint/flint-3.0.1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake flag-o-matic python-any-r1
+
+DESCRIPTION="Fast Library for Number Theory"
+HOMEPAGE="https://www.flintlib.org/"
+
+# flintlib.org tarballs have been broken in the past, Bill Hart suggests
+# we get them from Github (which he has control over).
+SRC_URI="https://github.com/flintlib/flint/archive/refs/tags/v${PV}.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+
+# Based off the soname, e.g. /usr/lib64/libflint.so -> libflint.so.15
+SLOT="0/18"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+IUSE="doc ntl test"
+
+RESTRICT="!test? ( test )"
+
+BDEPEND="${PYTHON_DEPS}
+ doc? (
+ app-text/texlive-core
+ dev-python/sphinx
+ dev-tex/latexmk
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ )
+"
+DEPEND="dev-libs/gmp:=
+ dev-libs/mpfr:=
+ ntl? ( dev-libs/ntl:= )
+ virtual/cblas"
+# flint 3 includes arb and arb cannot use flint 3.
+RDEPEND="${DEPEND}
+ !sci-mathematics/arb"
+
+# The rst files are API docs, but they're very low-effort compared to
+# the PDF and HTML docs, so we ship them unconditionally and hide only
+# the painful parts behind USE=doc.
+DOCS="AUTHORS README.md doc/source/*.rst"
+
+PATCHES=( "${FILESDIR}/flint-3.0.1-find-cblas.patch" )
+
+src_configure() {
+ # https://github.com/flintlib/flint/issues/1683
+ append-cflags -Wno-error=strict-prototypes
+
+ local mycmakeargs=(
+ -DWITH_NTL="$(usex ntl)"
+ -DBUILD_TESTING="$(usex test)"
+ -DBUILD_DOCS="$(usex doc)"
+ )
+
+ cmake_src_configure
+
+ if use doc; then
+ # Avoid the "html/_source" directory that will contain a copy of
+ # the rst sources we've already installed, and also avoid
+ # installing html/objects.inv.
+ HTML_DOCS="${BUILD_DIR}/html/*.html
+ ${BUILD_DIR}/html/*.js
+ ${BUILD_DIR}/html/_static"
+ DOCS+=" ${BUILD_DIR}/latex/Flint.pdf"
+ fi
+}
+
+src_compile() {
+ cmake_src_compile
+
+ if use doc; then
+ cmake_build html
+ cmake_build pdf
+ fi
+}
next reply other threads:[~2023-12-24 4:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-24 4:29 Michael Orlitzky [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-14 12:44 [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/flint/, sci-mathematics/flint/files/ Michael Orlitzky
2024-06-26 22:23 Michael Orlitzky
2024-06-26 22:23 Michael Orlitzky
2024-03-11 2:55 Michael Orlitzky
2022-12-19 14:47 Andreas Sturmlechner
2021-08-07 11:52 Michael Orlitzky
2020-06-17 1:42 Michael Orlitzky
2017-09-24 19:17 Thomas Deutschmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1703391494.92e78412b4cfab142f98c25a4de65386f8f54da9.mjo@gentoo \
--to=mjo@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox