commit:     1e49df1dc49770a133e40c216f532d04d80b6fa6
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  5 02:03:02 2026 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Feb  7 01:42:55 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e49df1d

sci-mathematics/highs: add 1.13.0

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

 sci-mathematics/highs/Manifest                     |   1 +
 .../highs/files/highs-1.13.0-docs.patch            |  35 +++++++
 sci-mathematics/highs/highs-1.13.0.ebuild          | 104 +++++++++++++++++++++
 3 files changed, 140 insertions(+)

diff --git a/sci-mathematics/highs/Manifest b/sci-mathematics/highs/Manifest
index 94adef4c31df..a807f9c5cfc8 100644
--- a/sci-mathematics/highs/Manifest
+++ b/sci-mathematics/highs/Manifest
@@ -1 +1,2 @@
 DIST highs-1.12.0.tar.gz 5458281 BLAKE2B 
96c041567f349bea450890402baf5daa2a97f62ed628a5f228c33bee5344a4b56c59c5ad7a71aad96d4fc2ca90f1b79b987cea443ca53c65c1d1fdd722ac9a83
 SHA512 
901ef60e99bb0f193408082fc64769775958b31d721b06852d59c8535a54c97a6e14d82943bed5e4c60943aac683a80b265a1a8e5406efb3c2d20a62c1c901df
+DIST highs-1.13.0.tar.gz 5768186 BLAKE2B 
5c03eb2d393157930a2654ccda0587ecb0622aa246cd908437569fc1b9299e82e58edbc2fb9e6d3444470cd6321be8e7abef39f571fd57bc40a3951a6144880f
 SHA512 
77cdac6fc491ec16c68d7280ee209d83db60719bf1b647cdb453261a931ad0556228c126488d456b82942d98272e3a37c2c753efffc540e5b29c1f4371bb8a42

diff --git a/sci-mathematics/highs/files/highs-1.13.0-docs.patch 
b/sci-mathematics/highs/files/highs-1.13.0-docs.patch
new file mode 100644
index 000000000000..d7c00d4f1049
--- /dev/null
+++ b/sci-mathematics/highs/files/highs-1.13.0-docs.patch
@@ -0,0 +1,35 @@
+From 572a5b92079b563e08b488b22bffb24cd8e91f46 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <[email protected]>
+Date: Thu, 5 Feb 2026 18:10:54 -0500
+Subject: [PATCH] CMakeLists.txt: don't install docs to the wrong location
+
+We have these in DOCS anyway.
+
+Upstream-bug: https://github.com/ERGO-Code/HiGHS/issues/2811
+---
+ CMakeLists.txt | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a8545ec..c3d3956 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -562,8 +562,6 @@ if(ZLIB AND NOT TARGET ZLIB::ZLIB)
+   find_package(ZLIB 1.2.3)
+ endif()
+ 
+-install(FILES README.md LICENSE.txt THIRD_PARTY_NOTICES.md DESTINATION .)
+-
+ # Set default generator based on platform
+ if(WIN32)
+     set(CPACK_GENERATOR "ZIP")
+@@ -954,4 +952,4 @@ set(CPACK_COMPONENT_LIBS_DISPLAY_NAME "HiGHS Libraries")
+ 
+ if(NOT CPack_CMake_INCLUDED)
+   include(CPack)
+-endif()
+\ No newline at end of file
++endif()
+-- 
+2.52.0
+

diff --git a/sci-mathematics/highs/highs-1.13.0.ebuild 
b/sci-mathematics/highs/highs-1.13.0.ebuild
new file mode 100644
index 000000000000..3f84d0017500
--- /dev/null
+++ b/sci-mathematics/highs/highs-1.13.0.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Modern solver for linear, quadratic, and mixed-integer programs"
+HOMEPAGE="https://highs.dev/
+       https://github.com/ERGO-Code/HiGHS";
+SRC_URI="https://github.com/ERGO-Code/HiGHS/releases/download/v${PV}/source-archive.tar.gz
+       -> ${P}.tar.gz"
+S="${WORKDIR}/HiGHS"
+LICENSE="MIT"
+SLOT="0/1"  # soname major
+KEYWORDS="~amd64 ~riscv"
+
+# USE=hipo was dropped in 1.13.0 because upstream began bundling
+# sci-libs/{amd,metis} and has no plans to unbundle them.
+IUSE="examples index64 test +threads zlib"
+
+# The tests fail for me due to precision issues (gcc) and something
+# worse (clang): https://github.com/ERGO-Code/HiGHS/issues/2690
+RESTRICT="test"
+
+# There are no external dependencies for a non-HiPO build. An old
+# version of dev-cpp/catch (header only) is bundled for tests under
+# extern/catch.hpp, but we don't use the tests.
+
+PATCHES=( "${FILESDIR}/highs-1.13.0-docs.patch" )
+
+DOCS=(
+       AUTHORS
+       CITATION.cff
+       CODE_OF_CONDUCT.md
+       CONTRIBUTING.md
+       FEATURES.md
+       README.md
+)
+
+src_prepare() {
+       # Sometimes the .git directory makes it into the release tarballs
+       # and cmake will waste time computing the latest commit.
+       rm -rf .git || die
+
+       # Just a precaution. These should only be used by the HiPO build,
+       # and we disable it.
+       rm -r extern/{amd,metis,rcm} || die
+
+       # Remove docs for stuff we don't install
+       rm -r docs/src/assets || die
+       rm docs/src/interfaces/{csharp,fortran}.md || die
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       # Without FAST_BUILD=ON, some options aren't even available.
+       #
+       # It would be easy to support USE=fortran with virtual/fortran, but
+       # unless someone needs it, it's simpler to leave the fortran
+       # interface disabled.
+       #
+       # The python interface can't be built at the same time as the C/C++
+       # bits. In any case, we should probably package dev-python/highspy
+       # separately since that's how people will look for it.
+       local mycmakeargs=(
+               -DALL_TESTS=$(usex test)
+               -DBLA_PKGCONFIG_BLAS=cblas
+               -DBUILD_CSHARP_EXAMPLE=OFF
+               -DBUILD_CXX_EXAMPLE=$(usex examples)
+               -DBUILD_CXX=ON
+               -DBUILD_CXX_EXE=ON
+               -DBUILD_EXAMPLES=$(usex examples)
+               -DBUILD_DOTNET=OFF
+               -DBUILD_TESTING=$(usex test)
+               -DCSHARP=OFF
+               -DCUPDLP_GPU=OFF
+               -DCUPDLP_FIND_CUDA=OFF
+               -DEMSCRIPTEN_HTML=OFF
+               -DFAST_BUILD=ON
+               -DFORTRAN=OFF
+               -DHIGHS_COVERAGE=OFF
+               -DHIGHS_NO_DEFAULT_THREADS=$(usex threads OFF ON)
+               -DHIGHSINT64=$(usex index64)
+               -DHIPO=OFF
+               -DPYTHON_BUILD_SETUP=OFF
+               -DUSE_DOTNET_STD_21=OFF
+               -DZLIB=$(usex zlib)
+       )
+       cmake_src_configure
+}
+
+src_install() {
+       cmake_src_install
+
+       docinto manual
+       dodoc -r docs/src/*
+
+       if use examples; then
+               docinto examples
+               dodoc examples/*.{c,cpp,py}
+       fi
+}

Reply via email to