From fe1ca8eeed1282a6fb9ba576d56557f7fe7a4010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= Date: Thu, 7 May 2026 19:44:10 +0200 Subject: [PATCH] sci-mathematics/lpsolve: add renovated 5.5.2.14 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - drop unused dependency on colamd, since a C implementation was bundled into lpsolve in the (never packaged) 5.5.2.13 release. This implementation is older than the current upstream colamd and unbundling is not easily possible due to API changes. - properly use CFLAGS from portage - migrate from SourceForge to Github Closes: https://bugs.gentoo.org/974282 Signed-off-by: Holger Hoffstätte Part-of: https://codeberg.org/gentoo/gentoo/pulls/852 Merges: https://codeberg.org/gentoo/gentoo/pulls/852 Signed-off-by: Sam James --- sci-mathematics/lpsolve/Manifest | 1 + .../lpsolve/lpsolve-5.5.2.14.ebuild | 52 +++++++++++++++++++ sci-mathematics/lpsolve/metadata.xml | 1 + 3 files changed, 54 insertions(+) create mode 100644 sci-mathematics/lpsolve/lpsolve-5.5.2.14.ebuild diff --git a/sci-mathematics/lpsolve/Manifest b/sci-mathematics/lpsolve/Manifest index 6f4877b98ae79..36f159ec73c69 100644 --- a/sci-mathematics/lpsolve/Manifest +++ b/sci-mathematics/lpsolve/Manifest @@ -1 +1,2 @@ DIST lp_solve_5.5.2.11_source.tar.gz 556506 BLAKE2B 4c5b53ddadc9db2cbfb78fee141505ced17719f6bd7c780720c6960cc902165c7c3cffbadd048ad5d61ba3951fd65fd6ac08b8d1874dd57c7ac41a168bccd260 SHA512 24f5a14d0c77a71e1ab3f46e08ea3f85f2f116ae2d3d2c54acddc5fb138251ba258240284060827e1b8b7ef15d580acecc242329ec775802fe5e8028407499bc +DIST lpsolve-5.5.2.14.tar.gz 565652 BLAKE2B 72061b87423859d69f7def08629dbc68cae2efc7e59cdaf3672c7b56f1d72ca17f1199e47d17d839096146ea4155996f4421c62291ad92638eebfb9c244f9c10 SHA512 48ea4429c1cad9edf7718b0f71296294d7e1a0e71668f79a28e5e522f0390e575c32ad678e6eae3a6a9866021dcb1151e38fa9229b042304125ef5e698986713 diff --git a/sci-mathematics/lpsolve/lpsolve-5.5.2.14.ebuild b/sci-mathematics/lpsolve/lpsolve-5.5.2.14.ebuild new file mode 100644 index 0000000000000..58d8acc0e023e --- /dev/null +++ b/sci-mathematics/lpsolve/lpsolve-5.5.2.14.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Mixed Integer Linear Programming (MILP) solver" +HOMEPAGE="https://github.com/lp-solve/lp_solve/" +SRC_URI="https://github.com/lp-solve/lp_solve/releases/download/${PV}/lp_solve_${PV}_source.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/lp_solve" + +LICENSE="LGPL-2.1" +SLOT="0/55" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" + +src_prepare() { + default + + # remove hardcoded -O3 + sed -i "s/'-O3'/'${CFLAGS}'/g" $(find . -name ccc) || die + + # verify subslot against soname (bug #614866) + local actual_soname=$(grep -iEo -- "-soname,liblpsolve([A-z0-9]+)" lpsolve*/ccc | sed -e 's:-soname,liblpsolve::') + if [[ ${actual_soname} != ${SLOT##*/} ]] ; then + eerror "Actual SONAME: ${actual_soname}" + eerror "Expected SONAME: ${SLOT##*/}" + die "Expected SONAME not found! Please update the subslot in the ebuild!" + fi +} + +src_compile() { + tc-export AR CC RANLIB LD + + cd lpsolve55 || die + sh -x ccc || die + + rm bin/ux*/liblpsolve55.a || die + + cd ../lp_solve || die + sh -x ccc || die +} + +src_install() { + einstalldocs + + dobin lp_solve/bin/ux*/lp_solve + dolib.so lpsolve55/bin/ux*/liblpsolve55.so + + insinto /usr/include/lpsolve + doins *.h +} diff --git a/sci-mathematics/lpsolve/metadata.xml b/sci-mathematics/lpsolve/metadata.xml index b64ab6cdd8449..8b7a23495fb6a 100644 --- a/sci-mathematics/lpsolve/metadata.xml +++ b/sci-mathematics/lpsolve/metadata.xml @@ -10,6 +10,7 @@ Gentoo Mathematics Project + lp-solve/lp_solve lpsolve