ppx_import-1.1.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. DESCRIPTION="A syntax extension for importing declarations from interface files"
  5. HOMEPAGE="https://github.com/whitequark/ppx_impor://github.com/whitequark/ppx_import"
  6. SRC_URI="https://github.com/whitequark/ppx_import/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  7. LICENSE="MIT"
  8. SLOT="0/${PV}"
  9. KEYWORDS="~amd64"
  10. IUSE="+ocamlopt test"
  11. DEPEND="
  12. dev-lang/ocaml:=[ocamlopt?]
  13. dev-ml/ppx_tools:=
  14. dev-ml/cppo:=
  15. "
  16. RDEPEND="${DEPEND}"
  17. DEPEND="${DEPEND}
  18. test? ( dev-ml/ounit dev-ml/ppx_deriving )
  19. dev-ml/opam
  20. dev-ml/ocamlbuild
  21. dev-ml/findlib
  22. "
  23. src_compile() {
  24. cp pkg/META.in pkg/META
  25. ocaml pkg/build.ml \
  26. native=$(usex ocamlopt true false) \
  27. native-dynlink=$(usex ocamlopt true false) \
  28. || die
  29. }
  30. src_test() {
  31. ocamlbuild -classic-display -use-ocamlfind src_test/test_ppx_import.byte -- || die
  32. }
  33. src_install() {
  34. opam-installer -i \
  35. --prefix="${ED}/usr" \
  36. --libdir="${D}/$(ocamlc -where)" \
  37. --docdir="${T}/dontinstallit" \
  38. ${PN}.install || die
  39. dodoc CHANGELOG.md README.md
  40. }