commit:     4185a1778aea506b43f6e96a8327e1ce42e09e1a
Author:     Dima Pasechnik <dima <AT> pasechnik <DOT> info>
AuthorDate: Thu Nov  6 20:59:34 2025 +0000
Commit:     Nowa Ammerlaan <nowa <AT> gentoo <DOT> org>
CommitDate: Wed Dec 17 21:02:46 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4185a177

sci-libs/coinor-cbc: add 2.10.12

latest version, drops dependency on broken sci-libs/coinor-dylp

Signed-off-by: Dima Pasechnik <dima <AT> pasechnik.info>
Part-of: https://github.com/gentoo/gentoo/pull/44519
Closes: https://github.com/gentoo/gentoo/pull/44519
Signed-off-by: Nowa Ammerlaan <nowa <AT> gentoo.org>

 sci-libs/coinor-cbc/Manifest                  |  1 +
 sci-libs/coinor-cbc/coinor-cbc-2.10.12.ebuild | 80 +++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)

diff --git a/sci-libs/coinor-cbc/Manifest b/sci-libs/coinor-cbc/Manifest
index 6e22f002f646..ff79ae7271dc 100644
--- a/sci-libs/coinor-cbc/Manifest
+++ b/sci-libs/coinor-cbc/Manifest
@@ -1 +1,2 @@
+DIST coinor-cbc-2.10.12.tar.gz 1687304 BLAKE2B 
3521dc8811de0b092657434c526a31f9be6837531dadb3266ef2c9e1a0a862e320f39a78a9b8d3155955220dd77f6ea22fb6007059083e49f3ef7e5795deda5b
 SHA512 
05ebe6c0eadeaef60ae785a0fcd614a4b9fc147dfda32a7ebf1ff5b30375da2bcc09e9cc84aad91df8ca3391de7df474c013dbf2862a0e177104389289fbe86c
 DIST coinor-cbc-2.10.5.tar.gz 1639188 BLAKE2B 
92321f0fc0b6eedbb5ebd37cc44d7f10d91d272109474f5ec343e1648b2684dd5cf7002c05d0f72cada1636f9642503ac85165b23ba68caae906fdcad8bcd8f2
 SHA512 
114ee23ee6e53c337d17bc0930f62d4438e761115e0bf48a04b67732cd82f63dbcc51c3e5b8069bc99bd2e1197b5116ec0be0c2a0a897619c5b79bc1d1751a4e

diff --git a/sci-libs/coinor-cbc/coinor-cbc-2.10.12.ebuild 
b/sci-libs/coinor-cbc/coinor-cbc-2.10.12.ebuild
new file mode 100644
index 000000000000..2ecd3acc5a88
--- /dev/null
+++ b/sci-libs/coinor-cbc/coinor-cbc-2.10.12.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PN=Cbc
+
+DESCRIPTION="COIN-OR branch-and-cut mixed integer program solver"
+HOMEPAGE="https://github.com/coin-or/Cbc/";
+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="doc examples static-libs test"
+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-text/doxygen[dot] )
+       test? ( sci-libs/coinor-sample )"
+DEPEND="sci-libs/coinor-clp:=
+       sci-libs/coinor-cgl:=
+       sci-libs/coinor-osi:=
+       sci-libs/coinor-utils:=
+       sci-libs/coinor-vol:="
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_PN}-releases-${PV}/${MY_PN}"
+
+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_with doc dot)
+       )
+
+       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="${D}" install
+
+       # Duplicate junk, and in the wrong location.
+       rm -r "${ED}/usr/share/coin/doc/${MY_PN}" || die
+
+       use examples && dodoc -r examples
+}

Reply via email to