commit:     77ad3c36ac36c41ac46f1d85ae0fa1964f514270
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  9 01:26:30 2023 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Mon Jan  9 01:54:39 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77ad3c36

sci-mathematics/opensmt: new package; add 2.4.3

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

 sci-mathematics/opensmt/Manifest             |  1 +
 sci-mathematics/opensmt/metadata.xml         | 19 +++++++++
 sci-mathematics/opensmt/opensmt-2.4.3.ebuild | 62 ++++++++++++++++++++++++++++
 3 files changed, 82 insertions(+)

diff --git a/sci-mathematics/opensmt/Manifest b/sci-mathematics/opensmt/Manifest
new file mode 100644
index 000000000000..cfff6834edf3
--- /dev/null
+++ b/sci-mathematics/opensmt/Manifest
@@ -0,0 +1 @@
+DIST opensmt-2.4.3.tar.gz 1912077 BLAKE2B 
d945d5b85d81b9b991f2f881f2d8f160dbefad8ce6484cf0d28c9a35c0fa64d18f45442a59cdd45bd29fcf526a09717d902d30376dfe2784de2d4df9627f803b
 SHA512 
a2adbbdebb133d7e97428c0ac9bf4c2413c95bca61567c5475f889f550904fc33a385712536c9026b38a1645b73c943876fa36724b634db061cb7cc0932543f2

diff --git a/sci-mathematics/opensmt/metadata.xml 
b/sci-mathematics/opensmt/metadata.xml
new file mode 100644
index 000000000000..e1c63fbdaeca
--- /dev/null
+++ b/sci-mathematics/opensmt/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+
+<pkgmetadata>
+  <maintainer type="project">
+    <email>[email protected]</email>
+    <name>Gentoo Mathematics Project</name>
+  </maintainer>
+  <longdescription>
+    OpenSMT2 is an SMT solver written in C++. It supports reading files in
+    SMT-LIB2 format and the theories QF_UF, QF_RDL, QF_IDL, QF_LRA, QF_LIA,
+    QF_UFLRA, QF_UFLIA and QF_AX. The system also provides an API; the
+    distribution includes a minimal example how to use the API.
+  </longdescription>
+  <upstream>
+    
<bugs-to>https://github.com/usi-verification-and-security/opensmt/issues/</bugs-to>
+    <remote-id type="github">usi-verification-and-security/opensmt</remote-id>
+  </upstream>
+</pkgmetadata>

diff --git a/sci-mathematics/opensmt/opensmt-2.4.3.ebuild 
b/sci-mathematics/opensmt/opensmt-2.4.3.ebuild
new file mode 100644
index 000000000000..6e169efbf9ca
--- /dev/null
+++ b/sci-mathematics/opensmt/opensmt-2.4.3.ebuild
@@ -0,0 +1,62 @@
+# 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_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
+
+       mkdir -p "${ED}"/usr/$(get_libdir) || die
+       mv "${ED}"/usr/lib/libopensmt.* "${ED}"/usr/$(get_libdir)/ || die
+}

Reply via email to