Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/z3/
Date: Fri, 11 Sep 2020 07:17:28
Message-Id: 1599808636.4cd7e8dccd2d3f0121e387ad7994efba645ea463.mgorny@gentoo
1 commit: 4cd7e8dccd2d3f0121e387ad7994efba645ea463
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 11 06:25:35 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 11 07:17:16 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4cd7e8dc
7
8 sci-mathematics/z3: Bump to 4.8.9
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sci-mathematics/z3/Manifest | 1 +
13 sci-mathematics/z3/z3-4.8.9.ebuild | 96 ++++++++++++++++++++++++++++++++++++++
14 2 files changed, 97 insertions(+)
15
16 diff --git a/sci-mathematics/z3/Manifest b/sci-mathematics/z3/Manifest
17 index 402a84ffbbe..418e184a392 100644
18 --- a/sci-mathematics/z3/Manifest
19 +++ b/sci-mathematics/z3/Manifest
20 @@ -1 +1,2 @@
21 DIST z3-4.8.8.tar.gz 4520119 BLAKE2B 8d3d9fac61ac7d5a9d8c44323db9f67a7b24ee510b12e67867b249062cbcfe9a3bd0fa3b24c03c9eccd2aaf90451083ff5e9a9253a87c3e8e943fc5cf08a1893 SHA512 a6823cadb7cdad11b8f0db1530676c0ec4853886dfb3c4dbc5b798c5dbd445afb0c61675f81cb7f99c1b1734d9cd0ec96a07c68a948da3c25801fc6767fea47f
22 +DIST z3-4.8.9.tar.gz 4624159 BLAKE2B ff97a688ef3f977cd1204ddafaf6b4ef5824fc8f9f38f0ce9a31657b99b8cb08ee5834893ac67056eb4d7f7df67585933029292eed41d140a93c10b9daa8e100 SHA512 a50da5c3f9e27d3e804c1b71f648a3dbd5a55223b7344d66f191a1b34a4d787810abd976840d3ab3878aaf5c96d89f5a517cac0781b82aa927a9d8d54836d54f
23
24 diff --git a/sci-mathematics/z3/z3-4.8.9.ebuild b/sci-mathematics/z3/z3-4.8.9.ebuild
25 new file mode 100644
26 index 00000000000..3570ae1f1e4
27 --- /dev/null
28 +++ b/sci-mathematics/z3/z3-4.8.9.ebuild
29 @@ -0,0 +1,96 @@
30 +# Copyright 1999-2020 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +CMAKE_ECLASS=cmake
36 +PYTHON_COMPAT=( python3_{6..9} )
37 +
38 +inherit cmake-multilib python-single-r1 toolchain-funcs
39 +
40 +DESCRIPTION="An efficient theorem prover"
41 +HOMEPAGE="https://github.com/Z3Prover/z3/"
42 +SRC_URI="https://github.com/Z3Prover/z3/archive/${P}.tar.gz"
43 +S=${WORKDIR}/z3-${P}
44 +
45 +SLOT="0/4.8"
46 +LICENSE="MIT"
47 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
48 +IUSE="doc examples gmp isabelle java python"
49 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
50 +
51 +RDEPEND="${PYTHON_DEPS}
52 + gmp? ( dev-libs/gmp:0=[cxx,${MULTILIB_USEDEP}] )"
53 +DEPEND="${RDEPEND}
54 + java? ( >=virtual/jdk-1.8 )"
55 +BDEPEND="
56 + doc? ( app-doc/doxygen )"
57 +
58 +CMAKE_BUILD_TYPE=RelWithDebInfo
59 +
60 +multilib_src_configure() {
61 + local mycmakeargs=(
62 + -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${P}"
63 + -DZ3_USE_LIB_GMP=$(usex gmp)
64 + -DZ3_ENABLE_EXAMPLE_TARGETS=OFF
65 + -DZ3_BUILD_DOCUMENTATION=$(multilib_native_usex doc)
66 + -DZ3_BUILD_PYTHON_BINDINGS=$(multilib_native_usex python)
67 + -DZ3_BUILD_JAVA_BINDINGS=$(multilib_native_usex java)
68 + -DZ3_INCLUDE_GIT_DESCRIBE=OFF
69 + -DZ3_INCLUDE_GIT_HASH=OFF
70 + )
71 +
72 + cmake_src_configure
73 +}
74 +
75 +multilib_src_test() {
76 + cmake_build test-z3
77 + set -- "${BUILD_DIR}"/test-z3 /a
78 + echo "${@}" >&2
79 + "${@}" || die
80 +}
81 +
82 +multilib_src_install_all() {
83 + dodoc README.md RELEASE_NOTES
84 + use examples && dodoc -r examples
85 + use python && python_optimize
86 +
87 + if use isabelle; then
88 + insinto /usr/share/Isabelle/contrib/${P}/etc
89 + newins - settings <<-EOF
90 + Z3_COMPONENT="\$COMPONENT"
91 + Z3_HOME="${EPREFIX}/usr/bin"
92 + Z3_SOLVER="${EPREFIX}/usr/bin/z3"
93 + Z3_REMOTE_SOLVER="z3"
94 + Z3_VERSION="${PV}"
95 + Z3_INSTALLED="yes"
96 + Z3_NON_COMMERCIAL="yes"
97 + EOF
98 + fi
99 +}
100 +
101 +pkg_postinst() {
102 + if use isabelle; then
103 + if [[ -f ${ROOT}/etc/isabelle/components ]]; then
104 + sed -e "/contrib\/${PN}-[0-9.]*/d" \
105 + -i "${ROOT}/etc/isabelle/components" || die
106 + cat <<-EOF >> "${ROOT}/etc/isabelle/components" || die
107 + contrib/${P}
108 + EOF
109 + fi
110 + fi
111 +}
112 +
113 +pkg_postrm() {
114 + if use isabelle; then
115 + if [[ ! ${REPLACING_VERSIONS} ]]; then
116 + if [[ -f "${ROOT}/etc/isabelle/components" ]]; then
117 + # Note: this sed should only match the version of this ebuild
118 + # Which is what we want as we do not want to remove the line
119 + # of a new Isabelle component being installed during an upgrade.
120 + sed -e "/contrib\/${P}/d" \
121 + -i "${ROOT}/etc/isabelle/components" || die
122 + fi
123 + fi
124 + fi
125 +}