You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
123 lines
2.4 KiB
123 lines
2.4 KiB
4 months ago
|
# Copyright 1999-2024 Gentoo Authors
|
||
1 year ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=8
|
||
|
|
||
3 months ago
|
MY_PV="${PV/_p/pl}"
|
||
|
MY_P="${PN}-${MY_PV}"
|
||
1 year ago
|
|
||
3 months ago
|
inherit check-reqs desktop dune edo
|
||
1 year ago
|
|
||
|
DESCRIPTION="Proof assistant written in O'Caml"
|
||
|
HOMEPAGE="http://coq.inria.fr/
|
||
|
https://github.com/coq/coq/"
|
||
|
SRC_URI="https://github.com/coq/coq/archive/V${MY_PV}.tar.gz
|
||
|
-> ${P}.tar.gz"
|
||
3 months ago
|
S="${WORKDIR}/${MY_P}"
|
||
1 year ago
|
|
||
|
LICENSE="LGPL-2.1"
|
||
|
SLOT="0/${PV}"
|
||
3 months ago
|
KEYWORDS="~amd64 ~x86"
|
||
1 year ago
|
IUSE="debug doc gui +ocamlopt test"
|
||
3 months ago
|
|
||
|
# TODO: Lots of failing tests. Maybe investigate later.
|
||
|
# RESTRICT="!test? ( test )"
|
||
|
RESTRICT="test"
|
||
1 year ago
|
|
||
|
RDEPEND="
|
||
3 months ago
|
dev-ml/num:=
|
||
1 year ago
|
dev-ml/zarith:=
|
||
|
gui? (
|
||
|
>=dev-ml/lablgtk-3.1.2:3=[sourceview,ocamlopt?]
|
||
|
>=dev-ml/lablgtk-sourceview-3.1.2:3=[ocamlopt?]
|
||
|
)
|
||
|
"
|
||
3 months ago
|
DEPEND="
|
||
|
${RDEPEND}
|
||
|
"
|
||
1 year ago
|
BDEPEND="
|
||
|
dev-ml/findlib
|
||
|
doc? (
|
||
|
>=dev-java/antlr-4.7:4
|
||
|
dev-python/antlr4-python3-runtime
|
||
|
dev-python/beautifulsoup4
|
||
|
dev-python/pexpect
|
||
|
dev-python/sphinx-rtd-theme
|
||
|
dev-python/sphinxcontrib-bibtex
|
||
|
dev-tex/latexmk
|
||
|
dev-texlive/texlive-fontsextra
|
||
|
dev-texlive/texlive-latexextra
|
||
|
dev-texlive/texlive-xetex
|
||
|
media-fonts/freefont
|
||
|
)
|
||
3 months ago
|
test? (
|
||
|
dev-ml/ounit2
|
||
|
)
|
||
1 year ago
|
"
|
||
|
|
||
3 months ago
|
CHECKREQS_DISK_BUILD="2G"
|
||
|
|
||
1 year ago
|
DOCS=( CODE_OF_CONDUCT.md CONTRIBUTING.md CREDITS INSTALL.md README.md )
|
||
3 months ago
|
declare -a DUNE_PACKAGES
|
||
1 year ago
|
|
||
1 year ago
|
src_prepare() {
|
||
1 year ago
|
# Remove failing tests. bug #904186
|
||
1 year ago
|
rm -r test-suite/coq-makefile/timing || die
|
||
|
|
||
|
default
|
||
|
}
|
||
|
|
||
1 year ago
|
src_configure() {
|
||
|
export CAML_LD_LIBRARY_PATH="${S}/kernel/byterun/"
|
||
|
|
||
3 months ago
|
DUNE_PACKAGES=(
|
||
1 year ago
|
coq-core
|
||
|
coq-stdlib
|
||
|
coqide-server
|
||
|
coq
|
||
|
)
|
||
3 months ago
|
use gui && DUNE_PACKAGES+=( coqide )
|
||
1 year ago
|
|
||
|
emake clean
|
||
|
|
||
|
local -a myconf=(
|
||
|
-prefix /usr
|
||
3 months ago
|
-libdir "/usr/$(get_libdir)/coq"
|
||
1 year ago
|
-mandir /usr/share/man
|
||
3 months ago
|
-docdir "/usr/share/doc/${PF}"
|
||
1 year ago
|
-datadir /usr/share/coq
|
||
3 months ago
|
-configdir "/etc/xdg/${PN}"
|
||
|
-native-compiler "$(usex ocamlopt yes no)"
|
||
1 year ago
|
)
|
||
|
use debug && myconf+=( -debug )
|
||
|
edob sh ./configure "${myconf[@]}"
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
emake DUNEOPT="--display=short --profile release" VERBOSE=1 dunestrap
|
||
|
|
||
3 months ago
|
dune-compile "${DUNE_PACKAGES[@]}"
|
||
1 year ago
|
|
||
|
use doc && emake refman-html
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
3 months ago
|
dune-install "${DUNE_PACKAGES[@]}"
|
||
1 year ago
|
|
||
|
if use gui ; then
|
||
|
make_desktop_entry coqide "Coq IDE" "${EPREFIX}/usr/share/coq/coq.png"
|
||
|
fi
|
||
|
|
||
3 months ago
|
local ocamlc_where
|
||
|
ocamlc_where="$(ocamlc -where)"
|
||
|
|
||
1 year ago
|
# Dune installs into /usr/<libdir>/ocaml/<coq> but
|
||
|
# Coq wants /usr/<libdir>/<coq> ; symlink those directories
|
||
|
local sym
|
||
3 months ago
|
for sym in "${DUNE_PACKAGES[@]}" ; do
|
||
|
dosym "${ocamlc_where}/${sym}" "/usr/$(get_libdir)/${sym}"
|
||
1 year ago
|
done
|
||
|
|
||
|
einstalldocs
|
||
|
}
|