commit: 34c7618e76a7aa90a3f00a1311d105964bf281b9 Author: Maciej Barć <xgqt <AT> gentoo <DOT> org> AuthorDate: Sun Mar 16 20:43:13 2025 +0000 Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org> CommitDate: Sun Mar 16 21:11:49 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34c7618e
sci-mathematics/coq: bump to 9.0.0 Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org> sci-mathematics/coq/Manifest | 1 + sci-mathematics/coq/coq-9.0.0.ebuild | 143 +++++++++++++++++++++++++++++++++++ sci-mathematics/coq/metadata.xml | 5 ++ 3 files changed, 149 insertions(+) diff --git a/sci-mathematics/coq/Manifest b/sci-mathematics/coq/Manifest index bb1e12a99dfd..aceccdbdf532 100644 --- a/sci-mathematics/coq/Manifest +++ b/sci-mathematics/coq/Manifest @@ -1,3 +1,4 @@ DIST coq-8.17.1.tar.gz 7506035 BLAKE2B 29b5b11666185ec293f50264f5a8ad66433c3ce05d74128b524f6fc3c6810551fe76d11d6f9db7d3741b829ac8bacb66948aad522d0cd2c487692c3df8b563ff SHA512 9a35311acec2a806730b94ac7dceabc88837f235c52a14c026827d9b89433bd7fa9555a9fc6829aa49edfedb24c8bbaf1411ebf463b74a50aeb17cba47745b6b DIST coq-8.19.2.tar.gz 7678311 BLAKE2B 5f9617fbe0127b0c8357c63f331ba3e9fb5a931be9a4a8e8de2e27820a0d986bf99ed9a512740a0f721c742504225ae56e240af893510aa0e449931499d10aab SHA512 91bc81530fa4f6498961583ad51eac5001f139881788b88e360a866ad8e2a6e2c5bce86d1a580ab4cd4782bf49d48318767df82471ce33ba3ac143e5569ad33c DIST coq-8.20.0.tar.gz 7839432 BLAKE2B 9b489db0cc6874b0a629f3bdb4b503201005ec95a3375441538cd7e51d371a39561b9d0ab23ac485652782fdc7ae8d90c97ca1ff4d9a85fb8727a39ed4a6f48c SHA512 1a7eac6e2f58724a3f9d68bbb321e4cfe963ba1a5551b9b011db4b3f559c79be433d810ff262593d753770ee41ea68fbd6a60daa1e2319ea00dff64c8851d70b +DIST coq-9.0.0.tar.gz 6305764 BLAKE2B 01e84c75f55f1dc6ff7706bc3e9454da268bcee88b0123334644aefcfa102b349d5196d0b215d6acae65e5066d187e17d74d6768d3790c78f1534972cebf06fb SHA512 f4f76a6a178e421c99ee7a331a2fd97a06e9c5d0168d7e60c44e3820d8e1a124370ea104ad90c7f87a9a1e9d87b2d0d7d2d387c998feeaed4a75ed04e176a4be diff --git a/sci-mathematics/coq/coq-9.0.0.ebuild b/sci-mathematics/coq/coq-9.0.0.ebuild new file mode 100644 index 000000000000..44f4f9f8cea1 --- /dev/null +++ b/sci-mathematics/coq/coq-9.0.0.ebuild @@ -0,0 +1,143 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit check-reqs desktop dune edo + +DESCRIPTION="Coq/Rocq is a proof assistant written in O'Caml" +HOMEPAGE="https://coq.inria.fr/ + https://github.com/coq/coq/" + +if [[ "${PV}" == *9999* ]] ; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/coq/coq" +else + SRC_URI="https://github.com/coq/coq/archive/V${PV}.tar.gz + -> ${P}.tar.gz" + + KEYWORDS="~amd64" +fi + +LICENSE="LGPL-2.1" +SLOT="0/${PV}" +IUSE="debug gui native-compiler +ocamlopt test" + +# TODO: Lots of failing tests. +# RESTRICT="!test? ( test )" +RESTRICT="test" + +RDEPEND=" + dev-ml/camlzip:= + dev-ml/num:= + dev-ml/zarith:= + gui? ( + >=dev-ml/lablgtk-3.1.2:3=[sourceview,ocamlopt?] + >=dev-ml/lablgtk-sourceview-3.1.2:3=[ocamlopt?] + ) + native-compiler? ( + <dev-lang/ocaml-5:= + ) +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + dev-ml/findlib + test? ( + dev-ml/ounit2 + ) +" +PDEPEND=" + sci-mathematics/coq-stdlib +" + +CHECKREQS_DISK_BUILD="2G" + +DOCS=( CODE_OF_CONDUCT.md CONTRIBUTING.md CREDITS INSTALL.md README.md ) +DUNE_PACKAGES=() + +src_prepare() { + # Remove bad tests (recursive). + local -a bad_tests=( + coq-makefile/timing-aggregate + coq-makefile/timing-error + coq-makefile/timing-per-file + coq-makefile/timing-per-line + coq-makefile/timing-template + ) + local bad_test="" + for bad_test in "${bad_tests[@]}" ; do + if [[ -e "test-suite/${bad_test}" ]] ; then + rm -r "test-suite/${bad_test}" || die "failed to remove test ${bad_test}" + else + ewarn "Test file ${bad_test} does not exist" + fi + done + + default +} + +src_configure() { + export -x CAML_LD_LIBRARY_PATH="${S}/kernel/byterun/" + + DUNE_PACKAGES=( + coq + coq-core + rocq-core + rocq-prover + rocq-runtime + ) + + if use gui ; then + DUNE_PACKAGES+=( + coqide-server + rocqide + ) + fi + + local -a myconf=( + -prefix /usr + -libdir "/usr/$(get_libdir)/coq" + -mandir /usr/share/man + -docdir "/usr/share/doc/${PF}" + -datadir /usr/share/coq + -configdir "/etc/xdg/${PN}" + -native-compiler "$(usex native-compiler yes no)" + ) + + if use debug ; then + myconf+=( + -debug + ) + fi + + emake clean + edo sh ./configure "${myconf[@]}" +} + +src_compile() { + emake DUNEOPT="--display=short --profile release" VERBOSE="1" dunestrap + + dune-compile "${DUNE_PACKAGES[@]}" +} + +src_install() { + dune-install "${DUNE_PACKAGES[@]}" + + if use gui ; then + make_desktop_entry rocqide "Coq IDE" "${EPREFIX}/usr/share/coq/coq.png" + fi + + local ocamlc_where="$(ocamlc -where)" + + # Dune installs into /usr/<libdir>/ocaml/<coq> but + # Coq wants /usr/<libdir>/<coq> ; symlink those directories + local sym="" + for sym in "${DUNE_PACKAGES[@]}" ; do + dosym "${ocamlc_where}/${sym}" "/usr/$(get_libdir)/${sym}" + done + + einstalldocs +} diff --git a/sci-mathematics/coq/metadata.xml b/sci-mathematics/coq/metadata.xml index bb29aa903edb..3e812d4a672d 100644 --- a/sci-mathematics/coq/metadata.xml +++ b/sci-mathematics/coq/metadata.xml @@ -25,4 +25,9 @@ <bugs-to>https://github.com/coq/coq/issues/</bugs-to> <remote-id type="github">coq/coq</remote-id> </upstream> + <use> + <flag name="native-compiler"> + Enable "native_compute" and compile the Coq Standard Library + </flag> + </use> </pkgmetadata>
