summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2023-09-12 04:11:33 +0000
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2023-09-12 09:29:01 +0200
commitef8ae9fd73383bb7944f6874c10dba3800a5c552 (patch)
tree4368cafec501576476d685287aa3b172215f798d /sci-libs/coinor-utils
parentsci-libs/primegen: Fix build error and update EAPI 7 -> 8 (diff)
downloadgentoo-ef8ae9fd73383bb7944f6874c10dba3800a5c552.tar.gz
gentoo-ef8ae9fd73383bb7944f6874c10dba3800a5c552.tar.bz2
gentoo-ef8ae9fd73383bb7944f6874c10dba3800a5c552.zip
sci-libs/coinor-utils: add 2.11.9
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/31497 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-libs/coinor-utils')
-rw-r--r--sci-libs/coinor-utils/Manifest1
-rw-r--r--sci-libs/coinor-utils/coinor-utils-2.11.9.ebuild105
-rw-r--r--sci-libs/coinor-utils/files/coinor-utils-2.11.9-drop-register.patch71
3 files changed, 177 insertions, 0 deletions
diff --git a/sci-libs/coinor-utils/Manifest b/sci-libs/coinor-utils/Manifest
index 1f3f6c213142..bb45afeae108 100644
--- a/sci-libs/coinor-utils/Manifest
+++ b/sci-libs/coinor-utils/Manifest
@@ -1 +1,2 @@
DIST coinor-utils-2.11.4.tar.gz 1225148 BLAKE2B d55f9b3efbb3ce1c04fb9193ec70f62d8f130cd2f7ddf033c0df35f37006c542bd39e345662c271b4466b00c4bb1ec3cc14965bfe35f5b89370071d675113f4d SHA512 a7ac337b0f0bb11d578c44fd12d292ba8e77568362eaaaecbed8f4bc22ed85aaee911e2dd3153a2197b0165df082821969336d73fe1c5f0374a4636755d9a4ad
+DIST coinor-utils-2.11.9.tar.gz 1234195 BLAKE2B 5fb097c9c0fc0e76f9b3c269357d70320a1386ea5850ea1f4520da44ef9337ed3540e9a3624676c6094f5571ef62bb3f4fd89d8b49643fb2901850597ad7195b SHA512 c9343edd0ce2dac5a7f025cc8d4a06e48cf966d9b9581d97e787ec801ceda9fbb7ab54c32618304573fed873ba7e291c2562f015fe0446a959b347d32365c2bb
diff --git a/sci-libs/coinor-utils/coinor-utils-2.11.9.ebuild b/sci-libs/coinor-utils/coinor-utils-2.11.9.ebuild
new file mode 100644
index 000000000000..894f4b5605b5
--- /dev/null
+++ b/sci-libs/coinor-utils/coinor-utils-2.11.9.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+MY_PN=CoinUtils
+
+DESCRIPTION="COIN-OR Matrix, Vector and other utility classes"
+HOMEPAGE="https://github.com/coin-or/CoinUtils/"
+SRC_URI="https://github.com/coin-or/${MY_PN}/archive/releases/${PV}.tar.gz
+ -> ${P}.tar.gz"
+LICENSE="EPL-1.0"
+
+# major soname component
+SLOT="0/3"
+
+KEYWORDS="~amd64 ~loong ~riscv ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 doc glpk blas lapack static-libs test zlib"
+RESTRICT="!test? ( test )"
+
+# Fortran is NOT needed, but the ./configure scripts for all of the CoinOR
+# packages contain a check for it. Gentoo bug 601648 and upstream issue,
+#
+# https://github.com/coin-or/CoinUtils/issues/132
+#
+BDEPEND="virtual/fortran
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen[dot] )
+ test? ( sci-libs/coinor-sample )"
+DEPEND="sys-libs/readline:0=
+ blas? ( virtual/blas )
+ bzip2? ( app-arch/bzip2 )
+ glpk? ( sci-mathematics/glpk:= )
+ lapack? ( virtual/lapack )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_PN}-releases-${PV}/${MY_PN}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.11.9-drop-register.patch
+)
+
+src_prepare() {
+ # Needed to make the --with-coin-instdir in src_configure happy.
+ dodir /usr
+
+ # They don't need to guess at this, but they do, and get it wrong...
+ sed -e "s:lib/pkgconfig:$(get_libdir)/pkgconfig:g" \
+ -i configure \
+ || die "failed to fix the pkgconfig path in ${S}/configure"
+
+ default
+}
+
+src_configure() {
+ local myeconfargs=(
+ --enable-dependency-linking
+ --with-coin-instdir="${ED}/usr"
+ $(use_enable zlib)
+ $(use_enable bzip2 bzlib)
+ $(use_with doc dot)
+ )
+ if use blas; then
+ myeconfargs+=( --with-blas-lib="$($(tc-getPKG_CONFIG) --libs blas)" )
+ else
+ myeconfargs+=( --without-blas )
+ fi
+ if use glpk; then
+ myeconfargs+=(
+ --with-glpk-incdir="${EPREFIX}"/usr/include
+ --with-glpk-lib=-lglpk
+ )
+ else
+ myeconfargs+=( --without-glpk )
+ fi
+ if use lapack; then
+ myeconfargs+=( --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)" )
+ else
+ myeconfargs+=( --without-lapack )
+ fi
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake all $(usex doc doxydoc "")
+}
+
+src_test() {
+ # NOT redundant! The build system has a "make check" target that does
+ # nothing, so if you don't specify "test" here, you'll get a no-op.
+ emake test
+}
+
+src_install() {
+ use doc && HTML_DOC=("${BUILD_DIR}/doxydocs/html/")
+
+ emake DESTDIR="${ED}" install
+
+ # Duplicate junk, and in the wrong location.
+ rm -r "${ED}/usr/share/coin/doc/${MY_PN}" || die
+}
diff --git a/sci-libs/coinor-utils/files/coinor-utils-2.11.9-drop-register.patch b/sci-libs/coinor-utils/files/coinor-utils-2.11.9-drop-register.patch
new file mode 100644
index 000000000000..f8ade78207d5
--- /dev/null
+++ b/sci-libs/coinor-utils/files/coinor-utils-2.11.9-drop-register.patch
@@ -0,0 +1,71 @@
+https://github.com/coin-or/CoinUtils/commit/1700ed92c2bc1562aabe65dee3b4885bd5c87fb9
+From: Stefan Vigerske <svigerske@gams.com>
+Date: Wed, 18 Aug 2021 15:09:53 +0200
+Subject: [PATCH] remove use of register storage class specifier
+
+- removed in C++17
+---
+ src/CoinOslC.h | 16 ++++++++--------
+ src/CoinOslFactorization2.cpp | 4 ++--
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/src/CoinOslC.h b/src/CoinOslC.h
+index 2f6d10aae..d8103f86b 100644
+--- a/src/CoinOslC.h
++++ b/src/CoinOslC.h
+@@ -33,30 +33,30 @@
+ extern "C" {
+ #endif
+
+-int c_ekkbtrn(register const EKKfactinfo *fact,
++int c_ekkbtrn(const EKKfactinfo *fact,
+ double *dwork1,
+ int *mpt, int first_nonzero);
+-int c_ekkbtrn_ipivrw(register const EKKfactinfo *fact,
++int c_ekkbtrn_ipivrw(const EKKfactinfo *fact,
+ double *dwork1,
+ int *mpt, int ipivrw, int *spare);
+
+-int c_ekketsj(register /*const*/ EKKfactinfo *fact,
++int c_ekketsj(/*const*/ EKKfactinfo *fact,
+ double *dwork1,
+ int *mpt2, double dalpha, int orig_nincol,
+ int npivot, int *nuspikp,
+ const int ipivrw, int *spare);
+-int c_ekkftrn(register const EKKfactinfo *fact,
++int c_ekkftrn(const EKKfactinfo *fact,
+ double *dwork1,
+ double *dpermu, int *mpt, int numberNonZero);
+
+-int c_ekkftrn_ft(register EKKfactinfo *fact,
++int c_ekkftrn_ft(EKKfactinfo *fact,
+ double *dwork1, int *mpt, int *nincolp);
+-void c_ekkftrn2(register EKKfactinfo *fact, double *dwork1,
++void c_ekkftrn2(EKKfactinfo *fact, double *dwork1,
+ double *dpermu1, int *mpt1, int *nincolp,
+ double *dwork1_ft, int *mpt_ft, int *nincolp_ft);
+
+-int c_ekklfct(register EKKfactinfo *fact);
+-int c_ekkslcf(register const EKKfactinfo *fact);
++int c_ekklfct(EKKfactinfo *fact);
++int c_ekkslcf(const EKKfactinfo *fact);
+ inline void c_ekkscpy(int n, const int *marr1, int *marr2)
+ {
+ CoinMemcpyN(marr1, n, marr2);
+diff --git a/src/CoinOslFactorization2.cpp b/src/CoinOslFactorization2.cpp
+index ab3225923..177ac437b 100644
+--- a/src/CoinOslFactorization2.cpp
++++ b/src/CoinOslFactorization2.cpp
+@@ -19,9 +19,9 @@
+ extern int ets_count;
+ extern int ets_check;
+ #endif
+-#define COIN_REGISTER register
++#define COIN_REGISTER
+ #define COIN_REGISTER2
+-#define COIN_REGISTER3 register
++#define COIN_REGISTER3
+ #ifdef COIN_USE_RESTRICT
+ #define COIN_RESTRICT2 __restrict
+ #else
+