coq-8.5_p3.ebuild 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils multilib
  5. MY_PV=${PV/_p/pl}
  6. MY_P=${PN}-${MY_PV}
  7. DESCRIPTION="Proof assistant written in O'Caml"
  8. HOMEPAGE="http://coq.inria.fr/"
  9. SRC_URI="http://${PN}.inria.fr/distrib/V${MY_PV}/files/${MY_P}.tar.gz"
  10. LICENSE="LGPL-2.1"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~ppc ~x86"
  13. IUSE="gtk debug +ocamlopt doc camlp5"
  14. RDEPEND="
  15. >=dev-lang/ocaml-3.11.2:=[ocamlopt?]
  16. camlp5? ( >=dev-ml/camlp5-6.02.3:=[ocamlopt?] )
  17. !camlp5? ( dev-ml/camlp4:= )
  18. gtk? ( >=dev-ml/lablgtk-2.10.1:=[sourceview,ocamlopt?] )"
  19. DEPEND="${RDEPEND}
  20. doc? (
  21. media-libs/netpbm[png,zlib]
  22. virtual/latex-base
  23. dev-tex/hevea
  24. dev-tex/xcolor
  25. dev-texlive/texlive-pictures
  26. || ( dev-texlive/texlive-mathscience dev-texlive/texlive-mathextra )
  27. dev-texlive/texlive-latexextra
  28. )"
  29. S=${WORKDIR}/${MY_P}
  30. src_prepare() {
  31. epatch "${FILESDIR}/${PN}-8.5-do-not-install-revision.patch"
  32. epatch "${FILESDIR}/${PN}-8.4_p5-no-clean-before-test.patch"
  33. }
  34. src_configure() {
  35. ocaml_lib=$(ocamlc -where)
  36. local myconf=(
  37. -prefix /usr
  38. -bindir /usr/bin
  39. -libdir /usr/$(get_libdir)/coq
  40. -mandir /usr/share/man
  41. -emacslib /usr/share/emacs/site-lisp
  42. -coqdocdir /usr/$(get_libdir)/coq/coqdoc
  43. -docdir /usr/share/doc/${PF}
  44. -configdir /etc/xdg/${PN}
  45. -lablgtkdir ${ocaml_lib}/lablgtk2
  46. )
  47. use debug && myconf+=( -debug )
  48. use doc || myconf+=( -with-doc no )
  49. if use gtk; then
  50. if use ocamlopt; then
  51. myconf+=( -coqide opt )
  52. else
  53. myconf+=( -coqide byte )
  54. fi
  55. else
  56. myconf+=( -coqide no )
  57. fi
  58. use ocamlopt || myconf+=( -byte-only )
  59. if use camlp5; then
  60. myconf+=( -usecamlp5 -camlp5dir ${ocaml_lib}/camlp5 )
  61. else
  62. myconf+=( -usecamlp4 )
  63. fi
  64. export CAML_LD_LIBRARY_PATH="${S}/kernel/byterun/"
  65. ./configure ${myconf[@]} || die "configure failed"
  66. }
  67. src_compile() {
  68. emake STRIP="true" -j1 world VERBOSE=1
  69. }
  70. src_test() {
  71. emake STRIP="true" check VERBOSE=1
  72. }
  73. src_install() {
  74. emake STRIP="true" COQINSTALLPREFIX="${D}" install VERBOSE=1
  75. dodoc README CREDITS CHANGES
  76. use gtk && make_desktop_entry "coqide" "Coq IDE" "${EPREFIX}/usr/share/coq/coq.png"
  77. }