commit:     47f39ac2a783cae50a7c4c50487024a6f763ebef
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  6 18:40:51 2025 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Fri Jun  6 21:18:53 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47f39ac2

sci-mathematics/opensmt: bump to 2.7.0

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 sci-mathematics/opensmt/Manifest                   |  1 +
 .../files/opensmt-2.7.0-cmake_minimum.patch        | 16 +++++
 sci-mathematics/opensmt/opensmt-2.7.0.ebuild       | 75 ++++++++++++++++++++++
 3 files changed, 92 insertions(+)

diff --git a/sci-mathematics/opensmt/Manifest b/sci-mathematics/opensmt/Manifest
index efc73de20ff3..4b5c80f55b0c 100644
--- a/sci-mathematics/opensmt/Manifest
+++ b/sci-mathematics/opensmt/Manifest
@@ -1 +1,2 @@
 DIST opensmt-2.5.2.tar.gz 1935650 BLAKE2B 
85cd171d56591d2f1162a41ff8a425fc818238a2820aab0f75cc75ece8898c5e7de1478aeab93e8905a1aedad85a6df03062fefaad69bea043dce1f3f3d531f5
 SHA512 
c22d17d3aee33a3360f8ea552c82151eafdef7cc89e6750d34b4ff2a011675a5a5f04a7cb68ff984dd6a5332b2f180fb8abc529e64c3970aba6b7eb60408f198
+DIST opensmt-2.7.0.gh.tar.gz 1532323 BLAKE2B 
5d51d4919adbdd6be38348524820a05804ccd05f2caf637cc238fd220f88fec6926098d7905ddf3e00c6874286cee788301b98b9b71bf9c7e3ae5d80d4e1dd2d
 SHA512 
15b87a9a9a9b55f63086ea10f6da75d8f8e86e71b46aff36efb28a49abb293a28e5e71a8d0e52d347112b8d4b3c045c884dbb1179f148e4da9a72e25f445001f

diff --git a/sci-mathematics/opensmt/files/opensmt-2.7.0-cmake_minimum.patch 
b/sci-mathematics/opensmt/files/opensmt-2.7.0-cmake_minimum.patch
new file mode 100644
index 000000000000..9a8a34ccd8b8
--- /dev/null
+++ b/sci-mathematics/opensmt/files/opensmt-2.7.0-cmake_minimum.patch
@@ -0,0 +1,16 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.3)
++cmake_minimum_required(VERSION 3.20)
+ 
+ if (POLICY CMP0074) # Policy 0074 has been introduced in CMake 3.12, so we 
need a check, otherwise older version would give an error
+ cmake_policy(SET CMP0074 NEW)
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.3)
++cmake_minimum_required(VERSION 3.20)
+ project(opensmt-examples)
+ 
+ set(CMAKE_CXX_STANDARD 17)

diff --git a/sci-mathematics/opensmt/opensmt-2.7.0.ebuild 
b/sci-mathematics/opensmt/opensmt-2.7.0.ebuild
new file mode 100644
index 000000000000..e2afb24639b5
--- /dev/null
+++ b/sci-mathematics/opensmt/opensmt-2.7.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Compact and open-source SMT-solver written in C++"
+HOMEPAGE="http://verify.inf.usi.ch/opensmt/
+       https://github.com/usi-verification-and-security/opensmt/";
+
+if [[ "${PV}" == *9999* ]] ; then
+       inherit git-r3
+
+       EGIT_REPO_URI="https://github.com/usi-verification-and-security/${PN}";
+else
+       
SRC_URI="https://github.com/usi-verification-and-security/${PN}/archive/v${PV}.tar.gz
+               -> ${P}.gh.tar.gz"
+
+       KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+IUSE="debug libedit test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       dev-libs/gmp:=[cxx]
+       libedit? ( dev-libs/libedit:= )
+"
+DEPEND="
+       ${RDEPEND}
+"
+BDEPEND="
+       app-alternatives/yacc
+       app-alternatives/lex
+       test? ( dev-cpp/gtest )
+"
+
+PATCHES=(
+       "${FILESDIR}/opensmt-2.7.0-cmake_minimum.patch"
+)
+
+src_prepare() {
+       cmake_src_prepare
+
+       echo "add_subdirectory(unit)" > "${S}/test/CMakeLists.txt" || die
+}
+
+src_configure() {
+       local CMAKE_BUILD_TYPE=""
+       if use debug ; then
+               CMAKE_BUILD_TYPE="Debug"
+       else
+               CMAKE_BUILD_TYPE="Release"
+       fi
+
+       local -a mycmakeargs=(
+               -DENABLE_LINE_EDITING="$(usex libedit)"
+               -DPACKAGE_TESTS="$(usex test)"
+       )
+       cmake_src_configure
+}
+
+src_install() {
+       cmake_src_install
+
+       if use elibc_glibc ; then
+               dolib.so "${ED}/usr/lib/libopensmt.so"*
+               rm "${ED}/usr/lib/libopensmt.so"* || die
+       fi
+
+       rm "${ED}/usr/lib/libopensmt.a" || die
+}

Reply via email to