diff options
-rw-r--r-- | dev-ml/uutf/Manifest | 1 | ||||
-rw-r--r-- | dev-ml/uutf/uutf-1.0.1.ebuild | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/dev-ml/uutf/Manifest b/dev-ml/uutf/Manifest index d555c3e0162f..522ca90b8556 100644 --- a/dev-ml/uutf/Manifest +++ b/dev-ml/uutf/Manifest @@ -1 +1,2 @@ DIST uutf-1.0.0.tbz 22182 SHA256 67dc4bd7ef6c8ab23ca62d34eb8c861a1f30624f3b009d45ac84772600672022 SHA512 ca033175aeaf2dafac9a7d2ad846f128d728bfbd7688c2c95d0db1d2a9b92a781d82c37d7bbfbede8934bbb6fa59a2df7530db0f0006032994971a7e4570999c WHIRLPOOL ad6e86cb3bc30cb4a139f6bfd081a256ea5a7054bd4fa06f2a8017b26a77265c352389961deb19f5affc3e6c6a72f5ad6cbfe9435b0a4d0b1adb9aba53a82ee4 +DIST uutf-1.0.1.tbz 22215 SHA256 123b26e7a471f2c5bd0fce454ccf515d299610ec356e321241fae0f75833e9be SHA512 35cbee8c82a566f2fe4fcd549936d4c4dc67f5b71bfd3ea97ff25d7cf21cfb77cb5ee313c95ad26a2a61bb84aa48c300bbb79a1a7128c6161e9abe9c390a7d18 WHIRLPOOL 31fe4dd2e7b9011e1788559d1e366c216921a5c65ec8f4b42788a2d3e65c8cf4b7870861f917932937dc132be75ef15fc4ecdd69791dbf651ff7c8585e133581 diff --git a/dev-ml/uutf/uutf-1.0.1.ebuild b/dev-ml/uutf/uutf-1.0.1.ebuild new file mode 100644 index 000000000000..e8b1a1e0b2d9 --- /dev/null +++ b/dev-ml/uutf/uutf-1.0.1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit findlib + +DESCRIPTION="Non-blocking streaming Unicode codec for OCaml" +HOMEPAGE="http://erratique.ch/software/uutf" +SRC_URI="http://erratique.ch/software/uutf/releases/${P}.tbz" + +LICENSE="ISC" +SLOT="0/${PV}" +KEYWORDS="~amd64" +IUSE="doc utftrip +ocamlopt test" + +RDEPEND=">=dev-lang/ocaml-3.12:=[ocamlopt?] + dev-ml/uchar:= + utftrip? ( dev-ml/cmdliner:= )" +DEPEND="${RDEPEND} + dev-ml/ocamlbuild + dev-ml/topkg + test? ( dev-ml/cmdliner )" + +src_compile() { + ocaml pkg/pkg.ml build \ + --with-cmdliner "$(usex utftrip true false)" \ + || die +} + +src_test() { + if use ocamlopt ; then + ocamlbuild -use-ocamlfind tests.otarget || die + pushd _build/test || die + ./test.native || die + #Rebuild to avoid mismatches between installed files, bug #604674 + popd || die + ocaml pkg/pkg.ml build \ + --with-cmdliner "$(usex utftrip true false)" \ + || die + else + ewarn "Sorry, ${PN} tests require native support (ocamlopt)" + fi +} + +src_install() { + # Can't use opam-installer here as it is an opam dep... + findlib_src_preinst + local nativelibs="" + use ocamlopt && nativelibs="$(echo _build/src/uutf.cm{x,xa,xs} _build/src/uutf.a)" + ocamlfind install uutf _build/pkg/META _build/src/uutf.mli _build/src/uutf.cm{a,i} ${nativelibs} || die + use utftrip && newbin utftrip.$(usex ocamlopt native byte) utftrip + dodoc CHANGES.md README.md + use doc && dohtml -r doc/* +} |