summaryrefslogtreecommitdiff
path: root/sci-mathematics/stp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-01-04 01:27:12 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-01-04 01:27:12 +0000
commit3517852e3b8a68d1e997770fc0650c5053bafc6c (patch)
tree44068672445b1418489aed82de58df3c470289e7 /sci-mathematics/stp
parent0f15659d48c193027158492acb726297501202c5 (diff)
gentoo resync : 04.01.2022
Diffstat (limited to 'sci-mathematics/stp')
-rw-r--r--sci-mathematics/stp/Manifest7
-rw-r--r--sci-mathematics/stp/files/stp-CMakeLists.txt-fix_cflags.patch21
-rw-r--r--sci-mathematics/stp/files/stp-stp.py-library_path.patch15
-rw-r--r--sci-mathematics/stp/metadata.xml33
-rw-r--r--sci-mathematics/stp/stp-2.3.3-r1.ebuild94
5 files changed, 170 insertions, 0 deletions
diff --git a/sci-mathematics/stp/Manifest b/sci-mathematics/stp/Manifest
new file mode 100644
index 000000000000..a3e1e0ee2d0d
--- /dev/null
+++ b/sci-mathematics/stp/Manifest
@@ -0,0 +1,7 @@
+AUX stp-CMakeLists.txt-fix_cflags.patch 721 BLAKE2B 31f116d43270558ee88b3cde1cb6303ee35a0078ca7c1be805260a405d5932068609918d711e3c6f3ec0e01e468c0647e1b2b392311e9408a7959736c86cf720 SHA512 1b5f2e9592f178ba31797da152e960c2a78ecf37dae2737f122f6becf16b0235e515129119b176fb5439e77597ab3d5c5f910bb764e13740922bc395a3fab17b
+AUX stp-stp.py-library_path.patch 372 BLAKE2B 1e36f48d2c403cdea156157826a1b3c3e424dc864bf87b30c66d13deadacc25479aaca2c44f89773c20c7ec48b49ce0c65e642e46a8ea22bd5c4695fe15ae86f SHA512 d5feaf02395d90fdba997aebbf582d764e9c238cce4300caba4316b60a1164cc3ce11e8756dd341dc6e3bc53a153fedac4c322776ca5d5b951eaf3a997456973
+DIST stp-2.3.3.tar.gz 2577550 BLAKE2B 9ebedf3cb8e6b50d037cfacbc14826bd4e6505d29a53b1fcc6580749f0637fe5f96619c166babdb3a52b18fb6337e49c02f5693e233effe84d0131d0e7402381 SHA512 a0b1bf419d8230e40ce0aee90d9c8c9d814aca300831c24b3576c75623362942abf20673c419f9f0ea1e0505bfae000dc65fdd818179f5759879b0b255f1b99a
+DIST stp-2.3.3_OutputCheck.tar.gz 12002 BLAKE2B f8fafba8f7957f3d0ee480b9e1e8c8923c373cf134512d6329adf84a96f3177ad07d00eae4dc6dd8d4b09ca82dfc8b425602f1926e3f88ccb2556b4b7121e5b9 SHA512 36012ae2b2aee1ff3f36ba1678a4bcbfeb590e01c2042ca35eb2f49b6a890b767c1809d1415e7b03f2118204361f834ad9caf70319b59fd14b2c140bf858d16e
+DIST stp-2.3.3_gtest.tar.gz 469100 BLAKE2B 386444657d3f23e54f01dac8e0ac36da4d97c3eebcc8cf79bfc754c474a5ed64765a0ad389fef358667e468469c47d02a407e13e6882d426a4defb0102e4a758 SHA512 2fc79fe9c8a4e0487e7e76db9508fd2207df0cfe3940a51aeac32e4440afab9e265bfe553b1cd66086cd5a574d8bf99dbb9e1d9c4a70fafd7b31f38825914aa1
+EBUILD stp-2.3.3-r1.ebuild 2162 BLAKE2B 349a76a00f6a2e05b5984b87b6fd79b2ee233ec430aa4be21763200900293a578b08b0cd569cb1056c1b327c099b418e11782af0d7c51debd88bf4846965aee4 SHA512 a131a42160283c5d3326a325b8f884d830bbf9f851e4625f751f42362ca40e61e2eaa52147daf3764873ed85977d71bcf84fd52073d52e76bc3a4c55a18c21b9
+MISC metadata.xml 1110 BLAKE2B e13b9420b7f730e6b9e2571e3f4e8a48cf7f54b16fa767fce48099549071c4c819e16a5da25b6779c77a5a7a7f21c3ec61eeb2719867f874a1c4fa21b84e32f2 SHA512 aa3ddfd8d3bf4647f230f0ca55b6f70f9f82f2ae63fe21edad637397fb1bd2779241a2e439a48bed59bd1de11ef3b4e275731c6a90873ec5d86bb5897bf2a9f0
diff --git a/sci-mathematics/stp/files/stp-CMakeLists.txt-fix_cflags.patch b/sci-mathematics/stp/files/stp-CMakeLists.txt-fix_cflags.patch
new file mode 100644
index 000000000000..93817e209376
--- /dev/null
+++ b/sci-mathematics/stp/files/stp-CMakeLists.txt-fix_cflags.patch
@@ -0,0 +1,21 @@
+index f6224a6..8c7c45e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -203,17 +203,9 @@ if (NOT MSVC)
+ add_compile_options( -g)
+ add_compile_options( -pthread )
+
+- add_compile_options("$<$<CONFIG:RELWITHDEBINFO>:-O2>")
+-
+- add_compile_options("$<$<CONFIG:RELEASE>:-O2>")
+ add_compile_options("$<$<CONFIG:RELEASE>:-g0>")
+
+ add_compile_options("$<$<CONFIG:DEBUG>:-O0>")
+-
+- if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
+- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -O2")
+- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2")
+- endif()
+ else()
+ # see https://msdn.microsoft.com/en-us/library/fwkeyyhe.aspx for details
+ # /ZI = include debug info
diff --git a/sci-mathematics/stp/files/stp-stp.py-library_path.patch b/sci-mathematics/stp/files/stp-stp.py-library_path.patch
new file mode 100644
index 000000000000..60b54aa2c1da
--- /dev/null
+++ b/sci-mathematics/stp/files/stp-stp.py-library_path.patch
@@ -0,0 +1,15 @@
+index 61aef6d..16633e8 100644
+--- a/bindings/python/stp/stp.py.in
++++ b/bindings/python/stp/stp.py.in
+@@ -42,7 +42,10 @@ Py3 = sys.version_info >= (3, 0, 0)
+ if Py3:
+ long = int
+
+-from library_path import PATHS
++try:
++ from .library_path import PATHS
++except ImportError:
++ from library_path import PATHS
+
+ for path in PATHS:
+ if not os.path.exists(path):
diff --git a/sci-mathematics/stp/metadata.xml b/sci-mathematics/stp/metadata.xml
new file mode 100644
index 000000000000..5054ed8fec27
--- /dev/null
+++ b/sci-mathematics/stp/metadata.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>jeffrey@icurse.nl</email>
+ <name>Jeffrey Lin</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription>
+ STP is a constraint solver (or SMT solver) aimed at solving
+ constraints of bitvectors and arrays. These types of
+ constraints can be generated by program analysis tools, theorem
+ provers, automated bug finders, cryptographic attack tools,
+ intelligent fuzzers, model checkers, and by many other
+ applications.
+ </longdescription>
+ <upstream>
+ <bugs-to>https://github.com/stp/stp/issues/</bugs-to>
+ <remote-id type="github">stp/stp</remote-id>
+ </upstream>
+ <use>
+ <flag name="cryptominisat">
+ Enable <pkg>sci-mathematics/cryptominisat</pkg> support
+ </flag>
+ <flag name="python">
+ Enable building the Python interface
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/stp/stp-2.3.3-r1.ebuild b/sci-mathematics/stp/stp-2.3.3-r1.ebuild
new file mode 100644
index 000000000000..367251ea5f8f
--- /dev/null
+++ b/sci-mathematics/stp/stp-2.3.3-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+OC_H=119fe41a83bc455a24a11ecc9b78e7b13fcfcc45
+GT_H=2ad076167a676e3ed62f90b754b30fac5caa1f88
+
+PYTHON_COMPAT=( python3_{8,9,10} )
+
+inherit python-single-r1 cmake
+
+DESCRIPTION="Simple Theorem Prover, an efficient SMT solver for bitvectors"
+HOMEPAGE="https://stp.github.io/"
+SRC_URI="https://github.com/stp/stp/archive/${PV}.tar.gz -> ${P}.tar.gz
+ test? (
+ https://github.com/stp/OutputCheck/archive/${OC_H}.tar.gz -> ${P}_OutputCheck.tar.gz
+ https://github.com/stp/googletest/archive/${GT_H}.tar.gz -> ${P}_gtest.tar.gz
+ )"
+
+LICENSE="GPL-2+ MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="cryptominisat debug +python test"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/boost:=
+ sci-mathematics/minisat:=
+ sys-libs/zlib:=
+ cryptominisat? (
+ dev-db/sqlite:3
+ dev-libs/icu:=
+ sci-mathematics/cryptominisat:=
+ )
+ python? ( ${PYTHON_DEPS} )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="test? ( dev-python/lit )"
+
+PATCHES=(
+ "${FILESDIR}"/stp-CMakeLists.txt-fix_cflags.patch
+ "${FILESDIR}"/stp-stp.py-library_path.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_unpack() {
+ unpack ${P}.tar.gz
+
+ if use test ; then
+ local i
+ for i in OutputCheck gtest ; do
+ tar xf "${DISTDIR}"/${P}_${i}.tar.gz --strip-components=1 \
+ -C "${S}"/utils/${i} || die "failed to unpack ${i}"
+ done
+ fi
+}
+
+src_prepare() {
+ # Replace static lib with get_libdir
+ sed -i "s/set(LIBDIR lib/set(LIBDIR $(get_libdir)/" CMakeLists.txt || die
+
+ # Remove problematic test
+ rm "${S}"/tests/query-files/misc-tests/no-query.cvc || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local CMAKE_BUILD_TYPE
+ if use debug ; then
+ CMAKE_BUILD_TYPE=Debug
+ else
+ CMAKE_BUILD_TYPE=Release
+ fi
+ local mycmakeargs=(
+ -DNOCRYPTOMINISAT=$(usex cryptominisat 'OFF' 'ON') # double negation
+ -DENABLE_PYTHON_INTERFACE=$(usex python)
+ -DENABLE_ASSERTIONS=$(usex test)
+ -DENABLE_TESTING=$(usex test)
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ mv "${D}"/usr/man "${D}"/usr/share/man || die
+
+ dodoc -r papers
+}