diff options
author | Maciej Barć <xgqt@gentoo.org> | 2023-01-11 01:36:04 +0100 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2023-01-11 04:44:07 +0100 |
commit | 4d6547a3ace7ae516f10b4e1b0b25e1ea4144143 (patch) | |
tree | 0c8b2714c5262b63d5ae3e1c41dd64eec392d263 /sci-mathematics/btor2tools | |
parent | sci-mathematics/picosat: also install static libraries (diff) | |
download | gentoo-4d6547a3ace7ae516f10b4e1b0b25e1ea4144143.tar.gz gentoo-4d6547a3ace7ae516f10b4e1b0b25e1ea4144143.tar.bz2 gentoo-4d6547a3ace7ae516f10b4e1b0b25e1ea4144143.zip |
sci-mathematics/btor2tools: new package; add 1.0.0_pre20220518
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'sci-mathematics/btor2tools')
5 files changed, 100 insertions, 0 deletions
diff --git a/sci-mathematics/btor2tools/Manifest b/sci-mathematics/btor2tools/Manifest new file mode 100644 index 000000000000..965d004a13e7 --- /dev/null +++ b/sci-mathematics/btor2tools/Manifest @@ -0,0 +1 @@ +DIST btor2tools-1.0.0_pre20220518.tar.gz 87420 BLAKE2B df8ddc8f286c32c580a8feaf0c7e90dff113d2b0303e3da0a378f2906cd34134ea91707cd40c95c38782990bf4d815416b3a566680f4d6668ddca46321ae530a SHA512 96e17327de311b3d16e086031038a8248431d0dda75b83ce137d6526a096b69fc062290f92ec5b58fffb56aa25437835f97a96bd15f0044d4d52263bf386d928 diff --git a/sci-mathematics/btor2tools/btor2tools-1.0.0_pre20220518.ebuild b/sci-mathematics/btor2tools/btor2tools-1.0.0_pre20220518.ebuild new file mode 100644 index 000000000000..efade1283737 --- /dev/null +++ b/sci-mathematics/btor2tools/btor2tools-1.0.0_pre20220518.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +H=b8456dda4780789e882f5791eb486f295ade4da4 + +inherit cmake + +DESCRIPTION="Generic parser and tools for the BTOR2 format" +HOMEPAGE="https://github.com/Boolector/btor2tools/" + +if [[ "${PV}" == *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/Boolector/${PN}.git" +else + SRC_URI="https://github.com/Boolector/${PN}/archive/${H}.tar.gz + -> ${P}.tar.gz" + S="${WORKDIR}"/${PN}-${H} + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="examples" + +PATCHES=( + "${FILESDIR}"/${P}-cmake-also-static.patch + "${FILESDIR}"/${P}-cmake-clfags.patch +) + +src_install() { + cmake_src_install + + if use examples ; then + insinto /usr/share/${PN} + dodoc -r examples + fi +} diff --git a/sci-mathematics/btor2tools/files/btor2tools-1.0.0_pre20220518-cmake-also-static.patch b/sci-mathematics/btor2tools/files/btor2tools-1.0.0_pre20220518-cmake-also-static.patch new file mode 100644 index 000000000000..061ddac84194 --- /dev/null +++ b/sci-mathematics/btor2tools/files/btor2tools-1.0.0_pre20220518-cmake-also-static.patch @@ -0,0 +1,28 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,4 +1,5 @@ + add_library(btor2parser ++ SHARED + btor2parser/btor2parser.c + ) + target_include_directories(btor2parser PRIVATE .) +@@ -10,6 +11,19 @@ install( + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + ++add_library(btor2parser_static ++ STATIC ++ btor2parser/btor2parser.c ++) ++target_include_directories(btor2parser_static PRIVATE .) ++set_target_properties(btor2parser_static PROPERTIES OUTPUT_NAME btor2parser) ++set_target_properties(btor2parser_static PROPERTIES PUBLIC_HEADER btor2parser/btor2parser.h) ++install( ++ TARGETS btor2parser_static ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ++) ++ + add_executable(btorsim + btorsim/btorsimam.cpp + btorsim/btorsimstate.cpp diff --git a/sci-mathematics/btor2tools/files/btor2tools-1.0.0_pre20220518-cmake-clfags.patch b/sci-mathematics/btor2tools/files/btor2tools-1.0.0_pre20220518-cmake-clfags.patch new file mode 100644 index 000000000000..84c6631c9219 --- /dev/null +++ b/sci-mathematics/btor2tools/files/btor2tools-1.0.0_pre20220518-cmake-clfags.patch @@ -0,0 +1,19 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -91,16 +91,6 @@ add_check_c_cxx_flag("-Wredundant-decls") + add_check_c_flag("-std=gnu99") + add_required_cxx_flag("-std=gnu++11") + +-if(CMAKE_BUILD_TYPE STREQUAL "Debug") +- add_check_c_cxx_flag("-g3") +- add_check_c_cxx_flag("-ggdb") +-else() +- add_check_c_cxx_flag("-O3") +- if(NOT CHECK) +- add_check_c_cxx_flag("-DNDEBUG") +- endif() +-endif() +- + if(ASAN) + # -fsanitize=address requires CMAKE_REQUIRED_FLAGS to be explicitely set, + # otherwise the -fsanitize=address check will fail while linking. diff --git a/sci-mathematics/btor2tools/metadata.xml b/sci-mathematics/btor2tools/metadata.xml new file mode 100644 index 000000000000..237d97fb7791 --- /dev/null +++ b/sci-mathematics/btor2tools/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> + +<pkgmetadata> + <maintainer type="project"> + <email>sci-mathematics@gentoo.org</email> + <name>Gentoo Mathematics Project</name> + </maintainer> + <upstream> + <bugs-to>https://github.com/Boolector/btor2tools/issues/</bugs-to> + <remote-id type="github">Boolector/btor2tools</remote-id> + </upstream> +</pkgmetadata> |