From 43d149cba3ac08d5111255f8cf374bbe7ec343c0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 22 Jan 2024 04:49:56 +0000 Subject: gentoo auto-resync : 22:01:2024 - 04:49:56 --- sci-mathematics/z3/Manifest | 2 + sci-mathematics/z3/z3-4.12.5.ebuild | 107 ++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 sci-mathematics/z3/z3-4.12.5.ebuild (limited to 'sci-mathematics/z3') diff --git a/sci-mathematics/z3/Manifest b/sci-mathematics/z3/Manifest index f2ac093df247..9b47456ecd26 100644 --- a/sci-mathematics/z3/Manifest +++ b/sci-mathematics/z3/Manifest @@ -1,3 +1,5 @@ DIST z3-4.12.4.tar.gz 5471960 BLAKE2B 9c8a65a6632e673e9c7da2ee0e8c8f7d145b906a1c6bdd6df9826fabc31e1c773d3512317ae6278b8a5cb40c580eaff98c37512fb2a2ad17c1c5ada90e0f8026 SHA512 fcb778d2e3e0d13fc68afcd8724548279f9edbbb4aac1bbb93e00959c33330ab2fd84f2c2e4b0b78f767819725a90b845fc606a9adc931ae1f0a11f4deae433b +DIST z3-4.12.5.tar.gz 5491803 BLAKE2B 9ad626386c73dea23b4a304312d5381be76b4c6b9aab4850568e4badd2a404cc7bf3f379490577b3acf8935f5bf8b39e241a8f85ed02819eb6d43785a9286e4a SHA512 b5055468d1380c54b959f826e10846c323c0ef73cf6bba0970e187c38cabd5869786261cd9b89a89d8369144417180870627782bf705e5494286dfe75053c9a7 EBUILD z3-4.12.4.ebuild 2600 BLAKE2B 6789454b941cdac35fc4dcccd28c96ec037f43b336dae6c1c186215bc6de573c26de842aa850e65504b74ca0ac02c58e848d1cf6223bff444c83a7c57090d255 SHA512 ead39d1799eb3c9651635ec2d3395f7a7ce018206c4491b7979a1e05fda7c2f5d95ed4712988ac087948c7cbfe370919c90ed1a60a9d6a7dae7e21b0de565a10 +EBUILD z3-4.12.5.ebuild 2606 BLAKE2B 1484e377a7a23f6908e0465d37f7810580c53967bddd74ba071eeedd55b3e1e2886e3b98b4355578e94dbb1a8842b9ffce8a1a14de859d1c59cd5f73e7ab2c7e SHA512 db51171a5a58292df83096141de46a329a7638dff4b7d19c1e2118be824593515776291828cd5ef824a0d712ed317d399a0a1318266540dac112410ae61855ec MISC metadata.xml 1800 BLAKE2B 26b4fd829e8daf66cfb19f61afffe9535099260732b3856c400881e68dbc4c2ffe88ff57f3a23449a2259696f23969c6502d4f3432b9cafc2e89e99167c94b90 SHA512 92f05bb1617630c16801ae5ea4215436c4d5dde6890d1a9e90c81f8ce1cddf101b73e016d1ec67eb41ccb4b59753547e6d08ac6a70a5b2d3dc792dc9fba13166 diff --git a/sci-mathematics/z3/z3-4.12.5.ebuild b/sci-mathematics/z3/z3-4.12.5.ebuild new file mode 100644 index 000000000000..951e88b0875b --- /dev/null +++ b/sci-mathematics/z3/z3-4.12.5.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 +} -- cgit v1.2.3