public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/linbox/files/, sci-libs/linbox/
@ 2020-05-04 12:47 Michael Orlitzky
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Orlitzky @ 2020-05-04 12:47 UTC (permalink / raw
  To: gentoo-commits

commit:     87e61bbe8bc610d59716cee5dcfb972d300191eb
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Mon May  4 12:21:52 2020 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Mon May  4 12:42:36 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87e61bbe

sci-libs/linbox: new C++ template library for linear algebra.

This is a straightforward import of the sci-libs/linbox package from
the sage-on-gentoo overlay where François Bissey has been maintaining
it. Linbox is a dependency of SageMath, and users will soon be able to
use the system copy of linbox; see ticket 29631 on the SageMath Trac
instance. Having this in Gentoo will therefore avoid pointless
rebuilds of linbox for our SageMath users.

Closes: https://bugs.gentoo.org/227813
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 sci-libs/linbox/Manifest                    |  1 +
 sci-libs/linbox/files/linbox-1.6.3-pc.patch | 25 ++++++++
 sci-libs/linbox/linbox-1.6.3.ebuild         | 93 +++++++++++++++++++++++++++++
 sci-libs/linbox/metadata.xml                | 39 ++++++++++++
 4 files changed, 158 insertions(+)

diff --git a/sci-libs/linbox/Manifest b/sci-libs/linbox/Manifest
new file mode 100644
index 00000000000..11458f31701
--- /dev/null
+++ b/sci-libs/linbox/Manifest
@@ -0,0 +1 @@
+DIST linbox-1.6.3.tar.gz 1968034 BLAKE2B 55fb83db7da375d8d97f2567c6a120ac48fefc41eb02db68152cc32f1f16009b8c8108a07bbc68087ad2ef3279108db61b48b805c9ce39f4c5f0072ab6e96304 SHA512 ccef3b4c7b9d8f999e5e4ce4e544f22cd869154513827501ecb7e1abf132ff585dfb3315cced963abe842feecda9331dda9081efb3948987365d338223a8305c

diff --git a/sci-libs/linbox/files/linbox-1.6.3-pc.patch b/sci-libs/linbox/files/linbox-1.6.3-pc.patch
new file mode 100644
index 00000000000..de0025108b8
--- /dev/null
+++ b/sci-libs/linbox/files/linbox-1.6.3-pc.patch
@@ -0,0 +1,25 @@
+From 8fb95a5dba51fbfcd37db10da4db69d518f7b0f4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey@gmail.com>
+Date: Fri, 24 Apr 2020 14:10:05 +1200
+Subject: [PATCH] Remove @LINBOX_SAGE@ from linbox.pc.in. linbox_sage is gone
+ and the string stays as garbage in the final .pc file.
+
+---
+ linbox.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linbox.pc.in b/linbox.pc.in
+index f54285e..1f83834 100644
+--- a/linbox.pc.in
++++ b/linbox.pc.in
+@@ -9,6 +9,6 @@ Description: Exact Linear Algebra library
+ URL: http://github.com/linbox-team/linbox
+ Version: @VERSION@
+ Requires: fflas-ffpack >= 2.4.0, givaro >= 4.1.0
+-Libs: -L${libdir} -llinbox @LINBOXSAGE_LIBS@ @NTL_LIBS@ @MPFR_LIBS@ @FPLLL_LIBS@ @IML_LIBS@ @FLINT_LIBS@ @OCL_LIBS@
++Libs: -L${libdir} -llinbox @NTL_LIBS@ @MPFR_LIBS@ @FPLLL_LIBS@ @IML_LIBS@ @FLINT_LIBS@ @OCL_LIBS@
+ Cflags: @DEFAULT_CFLAGS@ -DDISABLE_COMMENTATOR -I${includedir} @NTL_CFLAGS@ @MPFR_CFLAGS@ @FPLLL_CFLAGS@  @IML_CFLAGS@ @FLINT_CFLAGS@ 
+ \-------------------------------------------------------
+-- 
+2.26.2
+

diff --git a/sci-libs/linbox/linbox-1.6.3.ebuild b/sci-libs/linbox/linbox-1.6.3.ebuild
new file mode 100644
index 00000000000..db82ccb781c
--- /dev/null
+++ b/sci-libs/linbox/linbox-1.6.3.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="C++ template library for integer and finite-field linear algebra"
+HOMEPAGE="https://linalg.org/"
+SRC_URI="https://github.com/linbox-team/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="doc opencl openmp static-libs cpu_flags_x86_fma3 cpu_flags_x86_fma4 cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 cpu_flags_x86_sse4_2 cpu_flags_x86_avx cpu_flags_x86_avx2"
+
+BDEPEND="doc? ( app-doc/doxygen )"
+
+# The project README says that gmp, givaro, and blas/lapack are required
+# transitively via fflas-ffpack, but that's not true. The build system
+# checks for them, and `git grep` shows that they're used directly.
+DEPEND="dev-libs/gmp[cxx]
+	=sci-libs/givaro-4.1*
+	=sci-libs/fflas-ffpack-2.4*
+	virtual/cblas
+	virtual/lapack
+	opencl? ( virtual/opencl )
+	dev-libs/ntl:=
+	sci-libs/iml
+	dev-libs/mpfr:=
+	sci-mathematics/flint"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${PN}-1.6.3-pc.patch" )
+
+pkg_pretend() {
+	[[ "${MERGE_TYPE}" != "binary" ]] && use openmp && tc-check-openmp
+}
+
+src_configure() {
+	#
+	# The --with-all flag includes,
+	#
+	#   --with-givaro: used for finite fields, integer, etc. (required)
+	#   --with-fflas-ffpack:  small field dense linear algebra (required)
+	#   --with-ntl: used for finite field, polynomial arithmetic (optional)
+	#   --with-iml: used for fast integer/rational linear algebra (optional)
+	#   --with-mpfr: not sure, doesn't seem to be used? (optional)
+	#   --with-flint: used in algorithms/matrix-blas3 once (optional)
+	#   --with-fplll: an fplll interface not directly used (optional)
+	#   --with-doxygen: needed with --enable-doc to build them (optional)
+	#
+	# Some of these could be behind USE flags, but the ./configure output
+	# says that they're "not yet mandatory," which makes me think we might
+	# be overcomplicating things to make them optional right now.
+	#
+	# Note: after v1.6.3, we'll need to append --without-archnative to
+	# these flags to avoid -march=native being appended by default.
+	#
+	econf \
+		--with-docdir="${EPREFIX}/usr/share/doc/${PF}" \
+		--with-all="${EPREFIX}"/usr \
+		--without-fplll \
+		$(use_enable doc) \
+		$(use_enable openmp) \
+		$(use_with opencl ocl) \
+		$(use_enable cpu_flags_x86_fma3 fma) \
+		$(use_enable cpu_flags_x86_fma4 fma4) \
+		$(use_enable cpu_flags_x86_sse3 sse) \
+		$(use_enable cpu_flags_x86_sse3 sse2) \
+		$(use_enable cpu_flags_x86_sse3 sse3) \
+		$(use_enable cpu_flags_x86_ssse3 ssse3) \
+		$(use_enable cpu_flags_x86_sse4_1 sse41) \
+		$(use_enable cpu_flags_x86_sse4_2 sse42) \
+		$(use_enable cpu_flags_x86_avx avx) \
+		$(use_enable cpu_flags_x86_avx2 avx2) \
+		$(use_enable static-libs static)
+}
+
+src_install(){
+	default
+	find "${ED}" -name '*.la' -delete || die
+	if use doc; then
+		# These files are used for incremental doxygen builds but aren't
+		# part of the final output. Check on
+		#
+		#   https://github.com/linbox-team/linbox/issues/252
+		#
+		# periodically to see if this is pointless.
+		find "${ED}/usr/share/doc/${PF}" -type f -name '*.md5' -delete || die
+		find "${ED}/usr/share/doc/${PF}" -type f -name '*.map' -delete || die
+	fi
+}

diff --git a/sci-libs/linbox/metadata.xml b/sci-libs/linbox/metadata.xml
new file mode 100644
index 00000000000..b8fdd1af15d
--- /dev/null
+++ b/sci-libs/linbox/metadata.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+    <maintainer type="person">
+    <email>mjo@gentoo.org</email>
+  </maintainer>
+  <!--
+      mjo: François maintained this package in the sage-on-gentoo overlay
+      long before I moved it into ::gentoo. You don't need an ACK from me
+      to merge his changes.
+  -->
+  <maintainer type="person">
+    <email>frp.bissey@gmail.com</email>
+    <name>François Bissey</name>
+  </maintainer>
+  <maintainer type="project">
+    <email>proxy-maint@gentoo.org</email>
+    <name>Proxy Maintainers</name>
+  </maintainer>
+
+  <use>
+    <flag name="opencl">
+      Enable the use of OpenCL in LinBox
+    </flag>
+  </use>
+
+  <longdescription lang="en">
+    LinBox is a C++ template library for exact, high-performance
+    linear algebra computation with dense, sparse, and structured
+    matrices over the integers and over finite fields. LinBox relies
+    on closely aligned libraries fflas-ffpack (exact dense matrix
+    linear algebra kernels), and Givaro (finite fields, integers, and
+    polynomials).
+  </longdescription>
+
+  <upstream>
+    <remote-id type="github">linbox-team/linbox</remote-id>
+  </upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/linbox/files/, sci-libs/linbox/
@ 2024-02-10 22:45 Michael Orlitzky
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Orlitzky @ 2024-02-10 22:45 UTC (permalink / raw
  To: gentoo-commits

commit:     39c2e588075de96a773da677a74ca17a96bd9df1
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 10 22:19:19 2024 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Feb 10 22:37:48 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39c2e588

sci-libs/linbox: add 1.7.0

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

 sci-libs/linbox/Manifest                           |   1 +
 .../files/linbox-1.7.0-hardened-testfails.patch    |  22 ++++
 sci-libs/linbox/linbox-1.7.0.ebuild                | 111 +++++++++++++++++++++
 3 files changed, 134 insertions(+)

diff --git a/sci-libs/linbox/Manifest b/sci-libs/linbox/Manifest
index 11458f317018..cae18c309ee6 100644
--- a/sci-libs/linbox/Manifest
+++ b/sci-libs/linbox/Manifest
@@ -1 +1,2 @@
 DIST linbox-1.6.3.tar.gz 1968034 BLAKE2B 55fb83db7da375d8d97f2567c6a120ac48fefc41eb02db68152cc32f1f16009b8c8108a07bbc68087ad2ef3279108db61b48b805c9ce39f4c5f0072ab6e96304 SHA512 ccef3b4c7b9d8f999e5e4ce4e544f22cd869154513827501ecb7e1abf132ff585dfb3315cced963abe842feecda9331dda9081efb3948987365d338223a8305c
+DIST linbox-1.7.0.tar.gz 2258420 BLAKE2B a416e7ab138c6f3f4778a00c0c1eb46aa0a5b26d84f19a2df93e9f8959d3237e5f298f8013f9414f66605c08eebd7d632f71dcdef7080c8df814afcd2de34456 SHA512 cb4e848186d1f6357f498d1e3bda6484b4c789c02440f9614a227a2ae206a31fb20b32be40bda74da3f2f8f981bbd58d80fc97c95499b5151bb06eafb867ef9e

diff --git a/sci-libs/linbox/files/linbox-1.7.0-hardened-testfails.patch b/sci-libs/linbox/files/linbox-1.7.0-hardened-testfails.patch
new file mode 100644
index 000000000000..9e46faa69dc4
--- /dev/null
+++ b/sci-libs/linbox/files/linbox-1.7.0-hardened-testfails.patch
@@ -0,0 +1,22 @@
+https://github.com/linbox-team/linbox/issues/304
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index d870aa9..f7234ea 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -57,7 +57,6 @@ EXTRA_DIST = \
+ BASIC_TESTS =            \
+     test-solve          \
+     test-solve-full             \
+-    test-smith-form-valence  \
+     test-local-smith-form-sparseelim\
+     test-smith-form             \
+     test-smith-form-adaptive     \
+@@ -66,7 +65,6 @@ BASIC_TESTS =            \
+     test-last-invariant-factor  \
+     test-qlup                    \
+     test-det            \
+-    test-regression        \
+     test-regression2       \
+     test-rank-ex        \
+     test-rank-u32        \

diff --git a/sci-libs/linbox/linbox-1.7.0.ebuild b/sci-libs/linbox/linbox-1.7.0.ebuild
new file mode 100644
index 000000000000..0745edcc409b
--- /dev/null
+++ b/sci-libs/linbox/linbox-1.7.0.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="C++ template library for integer and finite-field linear algebra"
+HOMEPAGE="https://linalg.org/"
+SRC_URI="https://github.com/linbox-team/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+# I think only macros/libtool.m4 (and COPYING) is GPL-2+; the source
+# headers all say LGPL-2.1
+LICENSE="GPL-2+ LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="doc opencl openmp"
+
+BDEPEND="doc? ( app-text/doxygen )"
+
+# The project README says that gmp, givaro, and blas/lapack are required
+# transitively via fflas-ffpack, but that's not true. The build system
+# checks for them, and `git grep` shows that they're used directly.
+DEPEND="dev-libs/gmp[cxx(+)]
+	=sci-libs/givaro-4.2*
+	=sci-libs/fflas-ffpack-2.5*
+	virtual/cblas
+	virtual/lapack
+	opencl? ( virtual/opencl )
+	dev-libs/ntl:=
+	sci-libs/iml
+	dev-libs/mpfr:=
+	sci-mathematics/flint"
+
+# Use mathjax to render inline latex rather than requiring a working latex
+# installation to generate bitmaps.
+RDEPEND="${DEPEND}
+	doc? ( >=dev-libs/mathjax-3 )
+"
+
+PATCHES=( "${FILESDIR}/${P}-hardened-testfails.patch" )
+
+# The --enable-openmp flag has been removed upstream, but we don't want
+# openmp support to disappear after the package has been compiled with
+# it, so we retain the USE flag and the toolchain check.
+pkg_pretend() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+	default
+
+	if use doc; then
+		# Avoid the need for a working LaTeX installation. MathJax does
+		# slow down the browser a bit but it also renders much more
+		# nicely than the latex-generated bitmaps would.
+		echo "
+			USE_MATHJAX = YES
+			MATHJAX_VERSION = MathJax_3
+			MATHJAX_RELPATH = \"${EPREFIX}/usr/share/mathjax\"
+			MATHJAX_EXTENSIONS = ams
+		" >> doc/Doxyfile.mod || die
+	fi
+
+	eautoreconf
+}
+
+src_configure() {
+	#
+	# The --with-all flag includes,
+	#
+	#   --with-givaro: used for finite fields, integer, etc. (required)
+	#   --with-fflas-ffpack:  small field dense linear algebra (required)
+	#   --with-ntl: used for finite field, polynomial arithmetic (optional)
+	#   --with-iml: used for fast integer/rational linear algebra (optional)
+	#   --with-mpfr: not sure, doesn't seem to be used? (optional)
+	#   --with-flint: used in algorithms/matrix-blas3 once (optional)
+	#   --with-fplll: an fplll interface not directly used (optional)
+	#   --with-doxygen: needed with --enable-doc to build them (optional)
+	#
+	# Some of these could be behind USE flags, but the ./configure output
+	# says that they're "not yet mandatory," which makes me think we might
+	# be overcomplicating things to make them optional right now.
+	#
+	econf \
+		--with-docdir="${EPREFIX}/usr/share/doc/${PF}" \
+		--with-all="${EPREFIX}"/usr \
+		--without-fplll \
+		--without-archnative \
+		$(use_enable doc) \
+		$(use_with opencl ocl)
+}
+
+src_install() {
+	default
+	find "${ED}" -name '*.la' -delete || die
+	if use doc; then
+		# These files are used for incremental doxygen builds but aren't
+		# part of the final output. Check on
+		#
+		#   https://github.com/linbox-team/linbox/issues/252
+		#
+		# periodically to see if this is pointless.
+		find "${ED}/usr/share/doc/${PF}" -type f -name '*.md5' -delete || die
+		find "${ED}/usr/share/doc/${PF}" -type f -name '*.map' -delete || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-10 22:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-04 12:47 [gentoo-commits] repo/gentoo:master commit in: sci-libs/linbox/files/, sci-libs/linbox/ Michael Orlitzky
  -- strict thread matches above, loose matches on Subject: below --
2024-02-10 22:45 Michael Orlitzky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox