From 046c3c0984fd20387a9f86cdd0842fd81e70d94f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 15 Jan 2023 11:54:41 +0000 Subject: gentoo auto-resync : 15:01:2023 - 11:54:40 --- sci-mathematics/z3/Manifest | 2 + sci-mathematics/z3/z3-4.12.0.ebuild | 107 ++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 sci-mathematics/z3/z3-4.12.0.ebuild (limited to 'sci-mathematics/z3') diff --git a/sci-mathematics/z3/Manifest b/sci-mathematics/z3/Manifest index 9aed3e426a33..ee4e7853a70e 100644 --- a/sci-mathematics/z3/Manifest +++ b/sci-mathematics/z3/Manifest @@ -1,3 +1,5 @@ DIST z3-4.11.2.tar.gz 5428273 BLAKE2B 85fe5b94c5bfaeaca5b1dfe42fe9763a278c414955a9aed45abbb3e60c366a86bcdcd7c3bdcf27cc67bc10c76700069d548cb1e27ccf3286c8c6eccfa9d492d1 SHA512 be2573d38c0e50b46fcb025d50335e016769fdeab3c26f5dc2a13102fae889d23039258ea8d38de3f53daa4cf073704d8639ac291e781a74633194adedaae21a +DIST z3-4.12.0.tar.gz 5468532 BLAKE2B 229e8fb19cfb377f3ec9a728254c913a582ee16cfafaa8eb66683df01fc8320b527e493fe692fa85029360f6065d5a068ccbf337cdaf4b8f492ac8a2c3674063 SHA512 53a51c8304fa4356d13293f68b14d9d9eef57a0771c6698d38aea5fac62c4e52c41ff003cb6d771a32645d2aa4ef59be5f792f2efbee927d06ac8280094976e5 EBUILD z3-4.11.2.ebuild 2598 BLAKE2B 11ed8b0481fd1b020907a8dfa31b23210a292d5f9fda1c472709138686f9c072b7ad3392849d7e4b18e3ea69b778c97579099cb738ca0e7dcece73a0ecaed94a SHA512 fd0e47c7015b77c7fe8d9256b94ef5508e97e3d0d4f8eb20ad4932614829b73221af30841d521a32d50ab341c39dcdec07a27ebe3c968c227d75a4769b254a24 +EBUILD z3-4.12.0.ebuild 2604 BLAKE2B b19844adc8eb2155fe1b203a3bcae36b339033a9771b0685f709d0e1695e2a537adb54dcdc3afaa03259c9dfb91b20fd4511a957dea9a46d6c1ebf20e939dd84 SHA512 de65594b85e908e228a8f3f69d1da65201e8509623d93597516593b8bd5ffd70948af3245bbe0ace3c7516c861f7676efce0dff97c19839e9df0180f5da2af7a MISC metadata.xml 1800 BLAKE2B 26b4fd829e8daf66cfb19f61afffe9535099260732b3856c400881e68dbc4c2ffe88ff57f3a23449a2259696f23969c6502d4f3432b9cafc2e89e99167c94b90 SHA512 92f05bb1617630c16801ae5ea4215436c4d5dde6890d1a9e90c81f8ce1cddf101b73e016d1ec67eb41ccb4b59753547e6d08ac6a70a5b2d3dc792dc9fba13166 diff --git a/sci-mathematics/z3/z3-4.12.0.ebuild b/sci-mathematics/z3/z3-4.12.0.ebuild new file mode 100644 index 000000000000..56bcff6924d7 --- /dev/null +++ b/sci-mathematics/z3/z3-4.12.0.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) + +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-doc/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