diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-02-26 23:40:45 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-02-26 23:40:45 +0000 |
commit | e53a98716127eb7be20f46713a7442d5b8820633 (patch) | |
tree | 65a649f66422bc6677cae851cf42a166e45d2ced /sci-mathematics/z3 | |
parent | fab95e98818bada1626a7723a1348f4e920d25e0 (diff) |
gentoo auto-resync : 26:02:2024 - 23:40:45
Diffstat (limited to 'sci-mathematics/z3')
-rw-r--r-- | sci-mathematics/z3/Manifest | 2 | ||||
-rw-r--r-- | sci-mathematics/z3/z3-4.12.6.ebuild | 107 |
2 files changed, 109 insertions, 0 deletions
diff --git a/sci-mathematics/z3/Manifest b/sci-mathematics/z3/Manifest index fa666b3e203c..5a22ee24b873 100644 --- a/sci-mathematics/z3/Manifest +++ b/sci-mathematics/z3/Manifest @@ -1,3 +1,5 @@ DIST z3-4.12.5.tar.gz 5491803 BLAKE2B 9ad626386c73dea23b4a304312d5381be76b4c6b9aab4850568e4badd2a404cc7bf3f379490577b3acf8935f5bf8b39e241a8f85ed02819eb6d43785a9286e4a SHA512 b5055468d1380c54b959f826e10846c323c0ef73cf6bba0970e187c38cabd5869786261cd9b89a89d8369144417180870627782bf705e5494286dfe75053c9a7 +DIST z3-4.12.6.tar.gz 5492517 BLAKE2B 721db0881ec77112ca0461897fa01f2b7e9f8748976f54d1b0c36acc583f74c175d0002cf46261f87c15b2614832700c1e5f94a199767a945041950cc3d9048d SHA512 10883877d20adbd229ad4bf65a9b50660d93d85514f933865f06920efd697f51ce34e502fbe451d4c1b2251f13d597050b8277036d4011d9c0f196111d681f8f EBUILD z3-4.12.5.ebuild 2600 BLAKE2B 6789454b941cdac35fc4dcccd28c96ec037f43b336dae6c1c186215bc6de573c26de842aa850e65504b74ca0ac02c58e848d1cf6223bff444c83a7c57090d255 SHA512 ead39d1799eb3c9651635ec2d3395f7a7ce018206c4491b7979a1e05fda7c2f5d95ed4712988ac087948c7cbfe370919c90ed1a60a9d6a7dae7e21b0de565a10 +EBUILD z3-4.12.6.ebuild 2606 BLAKE2B 1484e377a7a23f6908e0465d37f7810580c53967bddd74ba071eeedd55b3e1e2886e3b98b4355578e94dbb1a8842b9ffce8a1a14de859d1c59cd5f73e7ab2c7e SHA512 db51171a5a58292df83096141de46a329a7638dff4b7d19c1e2118be824593515776291828cd5ef824a0d712ed317d399a0a1318266540dac112410ae61855ec MISC metadata.xml 1718 BLAKE2B a94783909c12aa7dd2d5fd1f9d2fc75e20ca91b6abffd6dc020f602e57ef698f7184acaf14def4b6e21bb659e595abd44956ba37a679134d11b523103b0461df SHA512 ed375986a8010a7ae1eadab3107342126194a5513cbb22ce2064ffeff42c7184ea94f4f69017204c73bd61236847475cd1f0d8b3ba369236b26630dc8b2f46a2 diff --git a/sci-mathematics/z3/z3-4.12.6.ebuild b/sci-mathematics/z3/z3-4.12.6.ebuild new file mode 100644 index 000000000000..951e88b0875b --- /dev/null +++ b/sci-mathematics/z3/z3-4.12.6.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake-multilib java-pkg-opt-2 python-single-r1 + +DESCRIPTION="An efficient theorem prover" +HOMEPAGE="https://github.com/Z3Prover/z3/" +SRC_URI="https://github.com/Z3Prover/z3/archive/${P}.tar.gz" +S=${WORKDIR}/z3-${P} + +SLOT="0/$(ver_cut 1-2)" +LICENSE="MIT" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="doc examples gmp isabelle java python" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + gmp? ( dev-libs/gmp:0=[cxx(+),${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + java? ( >=virtual/jdk-1.8 ) +" +BDEPEND=" + doc? ( app-text/doxygen[dot] ) +" + +CMAKE_BUILD_TYPE=RelWithDebInfo + +src_prepare() { + cmake_src_prepare + java-pkg-opt-2_src_prepare +} + +multilib_src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" + -DZ3_USE_LIB_GMP=$(usex gmp) + -DZ3_ENABLE_EXAMPLE_TARGETS=OFF + -DZ3_BUILD_DOCUMENTATION=$(multilib_native_usex doc) + -DZ3_BUILD_PYTHON_BINDINGS=$(multilib_native_usex python) + -DZ3_BUILD_JAVA_BINDINGS=$(multilib_native_usex java) + -DZ3_INCLUDE_GIT_DESCRIBE=OFF + -DZ3_INCLUDE_GIT_HASH=OFF + ) + + multilib_is_native_abi && use java && mycmakeargs+=( -DJAVA_HOME="$(java-config -g JAVA_HOME )" ) + + cmake_src_configure +} + +multilib_src_test() { + cmake_build test-z3 + set -- "${BUILD_DIR}"/test-z3 /a + echo "${@}" >&2 + "${@}" || die +} + +multilib_src_install_all() { + dodoc README.md + use examples && dodoc -r examples + use python && python_optimize + + if use isabelle; then + insinto /usr/share/Isabelle/contrib/${P}/etc + newins - settings <<-EOF + Z3_COMPONENT="\$COMPONENT" + Z3_HOME="${EPREFIX}/usr/bin" + Z3_SOLVER="${EPREFIX}/usr/bin/z3" + Z3_REMOTE_SOLVER="z3" + Z3_VERSION="${PV}" + Z3_INSTALLED="yes" + Z3_NON_COMMERCIAL="yes" + EOF + fi +} + +pkg_postinst() { + if use isabelle; then + if [[ -f ${ROOT}/etc/isabelle/components ]]; then + sed -e "/contrib\/${PN}-[0-9.]*/d" \ + -i "${ROOT}/etc/isabelle/components" || die + cat <<-EOF >> "${ROOT}/etc/isabelle/components" || die + contrib/${P} + EOF + fi + fi +} + +pkg_postrm() { + if use isabelle; then + if [[ ! ${REPLACING_VERSIONS} ]]; then + if [[ -f "${ROOT}/etc/isabelle/components" ]]; then + # Note: this sed should only match the version of this ebuild + # Which is what we want as we do not want to remove the line + # of a new Isabelle component being installed during an upgrade. + sed -e "/contrib\/${P}/d" \ + -i "${ROOT}/etc/isabelle/components" || die + fi + fi + fi +} |