commit: 056a0f27e0ec06f2aaae218ede325211e97b12f7 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> AuthorDate: Tue Jan 21 04:41:36 2025 +0000 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> CommitDate: Tue Jan 21 13:36:08 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=056a0f27
sci-libs/m4rie: add 20250103 Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> sci-libs/m4rie/Manifest | 1 + .../m4rie/files/m4rie-20250103-pkgconfig.patch | 41 ++++++++++++++++++++++ sci-libs/m4rie/m4rie-20250103.ebuild | 41 ++++++++++++++++++++++ 3 files changed, 83 insertions(+) diff --git a/sci-libs/m4rie/Manifest b/sci-libs/m4rie/Manifest index 4dda6fb591cb..b8ac2c499a96 100644 --- a/sci-libs/m4rie/Manifest +++ b/sci-libs/m4rie/Manifest @@ -1 +1,2 @@ DIST m4rie-20200115.tar.gz 500702 BLAKE2B d8b1506ef9902def6577851a97dd6f7da986dce39b3250f9f9b66f9caf8f811568b7975165fb75b6b8ab3c9faf65d890f7c2254725224266f1250a0bcf18a464 SHA512 22c990cf06de9ac790f82f48e498b2bfc87fdf6834257f4e4a4c44e2446b4226438d21692d654008b58df36d8da746bba04dcf1a3d50e34ccf8c678efd5b642b +DIST release-20250103.tar.gz 167745 BLAKE2B b4f76e51ef9561ce7fc10c0fc0f50c8ebff1c65c9e4c51d0f120db48a9b4b4417057c2bb919b6a4d1ba23f68179c59e2a5d97063063654723f210a5d10d0e5ce SHA512 8fd80fa265d234101ee56f464a59ce5aaf0f3c600e70ee9495ec490d06b758e0073a084474ad72d79d8ade5ac4421c53ed6b12cbaaaeda96287d94137c8c61b1 diff --git a/sci-libs/m4rie/files/m4rie-20250103-pkgconfig.patch b/sci-libs/m4rie/files/m4rie-20250103-pkgconfig.patch new file mode 100644 index 000000000000..b0a8daac1ff9 --- /dev/null +++ b/sci-libs/m4rie/files/m4rie-20250103-pkgconfig.patch @@ -0,0 +1,41 @@ +From 4ddb0c88b6b1cb9a6c180dab1651256ce5ed15f9 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <[email protected]> +Date: Mon, 20 Jan 2025 22:55:08 -0500 +Subject: [PATCH] m4rie.pc.in: improve compiler/linker flag handling + + 1. List m4ri in Requires.private. This will automatically + add -lm4ri for people who are statically linking, but will + omit it when dynamically linking. + + 2. Move $OPENMP_CFLAGS to Libs.private. Consumers of m4rie do not + need to enable OpenMP at compile time to avoid problems, only at + link time, and only when statically linking. In particular we want + to _avoid_ enabling OpenMP by "accident" in a larger project that + makes use of m4rie. + + 3. Drop $M4RI_CFLAGS. There's just... no reason to add these here. + In theory if M4RI had some important -D flags, they would go here, + but at the moment it's just adding a bunch of -msse and -fopenmp + stuff that we do not necessarily want to use when compiling + consumers of m4rie. +--- + m4rie.pc.in | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/m4rie.pc.in b/m4rie.pc.in +index e716441..29bbc6d 100644 +--- a/m4rie.pc.in ++++ b/m4rie.pc.in +@@ -6,5 +6,7 @@ includedir=@includedir@ + Name: M4RIE + Description: Dense linear algebra over GF(2^e). + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lm4rie -lm4ri -lm +-Cflags: -I${includedir} @M4RI_CFLAGS@ @OPENMP_CFLAGS@ ++Requires.private: m4ri >= 20240729 ++Libs: -L${libdir} -lm4rie -lm ++Libs.private: @OPENMP_CFLAGS@ ++Cflags: -I${includedir} +-- +2.45.2 + diff --git a/sci-libs/m4rie/m4rie-20250103.ebuild b/sci-libs/m4rie/m4rie-20250103.ebuild new file mode 100644 index 000000000000..a66226079ae6 --- /dev/null +++ b/sci-libs/m4rie/m4rie-20250103.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Fast dense matrix arithmetic over GF(2^e) for 2 <= e <= 16" +HOMEPAGE="https://github.com/malb/m4rie" +SRC_URI="https://github.com/malb/${PN}/archive/refs/tags/release-${PV}.tar.gz" + +S="${WORKDIR}/${PN}-release-${PV}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="debug" + +DEPEND=">=sci-libs/m4ri-20240729" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/${P}-pkgconfig.patch" ) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # m4rie doesn't actually have any openmp code. The configure flag + # stems from a mistaken belief that it needs to be there to use the + # openmp code in m4ri. + econf \ + --disable-openmp \ + $(use_enable debug) +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +}
