summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2023-01-13 19:49:50 +0100
committerMaciej Barć <xgqt@gentoo.org>2023-01-13 19:58:39 +0100
commit07c1e07de1d95f15bcbf554e8648686e62a00098 (patch)
tree0e1453735af59e1d1fd11b95d442038377c94ee2
parentsci-mathematics/opensmt: do not install static libs (diff)
downloadgentoo-07c1e07de1d95f15bcbf554e8648686e62a00098.tar.gz
gentoo-07c1e07de1d95f15bcbf554e8648686e62a00098.tar.bz2
gentoo-07c1e07de1d95f15bcbf554e8648686e62a00098.zip
sci-mathematics/opensmt: prevent fetching googletest
Closes: https://bugs.gentoo.org/890722 Signed-off-by: Maciej Barć <xgqt@gentoo.org>
-rw-r--r--sci-mathematics/opensmt/opensmt-2.4.3-r1.ebuild69
-rw-r--r--sci-mathematics/opensmt/opensmt-2.4.3.ebuild7
2 files changed, 76 insertions, 0 deletions
diff --git a/sci-mathematics/opensmt/opensmt-2.4.3-r1.ebuild b/sci-mathematics/opensmt/opensmt-2.4.3-r1.ebuild
new file mode 100644
index 000000000000..b1e67e45cbad
--- /dev/null
+++ b/sci-mathematics/opensmt/opensmt-2.4.3-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2023 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}.git"
+else
+ SRC_URI="https://github.com/usi-verification-and-security/${PN}/archive/v${PV}.tar.gz
+ -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+IUSE="debug libedit +readline test"
+REQUIRED_USE="?? ( libedit readline )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/gmp:=
+ readline? ( sys-libs/readline:= )
+ libedit? ( dev-libs/libedit:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ test? ( dev-cpp/gtest )
+"
+
+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=(
+ -DPACKAGE_TESTS=$(usex test)
+ -DUSE_READLINE=$(usex readline)
+ )
+ if use readline || use libedit ; then
+ mycmakeargs+=( -DENABLE_LINE_EDITING=ON )
+ fi
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ rm "${ED}"/usr/lib/libopensmt.a || die
+ dodir /usr/$(get_libdir)
+ mv "${ED}"/usr/lib/libopensmt.* "${ED}"/usr/$(get_libdir)/ || die
+}
diff --git a/sci-mathematics/opensmt/opensmt-2.4.3.ebuild b/sci-mathematics/opensmt/opensmt-2.4.3.ebuild
index 6fa8666a57f1..089f834988bc 100644
--- a/sci-mathematics/opensmt/opensmt-2.4.3.ebuild
+++ b/sci-mathematics/opensmt/opensmt-2.4.3.ebuild
@@ -36,6 +36,13 @@ BDEPEND="
test? ( dev-cpp/gtest )
"
+src_prepare() {
+ cmake_src_prepare
+
+ echo "add_subdirectory(unit)" > "${S}"/test/CMakeLists.txt || die
+ echo "add_subdirectory(unit)" > "${S}"/parallel-test/CMakeLists.txt || die
+}
+
src_configure() {
local CMAKE_BUILD_TYPE
if use debug ; then