summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ml/uutf')
-rw-r--r--dev-ml/uutf/Manifest1
-rw-r--r--dev-ml/uutf/metadata.xml8
-rw-r--r--dev-ml/uutf/uutf-0.9.4.ebuild50
3 files changed, 59 insertions, 0 deletions
diff --git a/dev-ml/uutf/Manifest b/dev-ml/uutf/Manifest
new file mode 100644
index 00000000000..98c993d99f2
--- /dev/null
+++ b/dev-ml/uutf/Manifest
@@ -0,0 +1 @@
+DIST uutf-0.9.4.tbz 36987 SHA256 13706722a0037b167eef359bac68d5426d05f64aa308f44c1784aace9577e1b8 SHA512 95203b06e7506f33822f10607315920b849efde3ed2e032bf8dd805f99ce4851b375bc92a1f95403673c97c6176c5a6974af2be611f530db0a7f36296948edf4 WHIRLPOOL a3446da14f665c06dbc9b245baf530c4650fb657baec02de7773cbb5addb2fdb5ddf9a98822a3af3b72b4800affcf2af39e44a6f37f17d221c55bd02b39c4cce
diff --git a/dev-ml/uutf/metadata.xml b/dev-ml/uutf/metadata.xml
new file mode 100644
index 00000000000..959de7257d5
--- /dev/null
+++ b/dev-ml/uutf/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>ml</herd>
+<use>
+<flag name="utftrip">Builds and install the utftrip executable: Among other things, reads unicode on stdin and rewrites it on stdout.</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-ml/uutf/uutf-0.9.4.ebuild b/dev-ml/uutf/uutf-0.9.4.ebuild
new file mode 100644
index 00000000000..1fab6e59f9e
--- /dev/null
+++ b/dev-ml/uutf/uutf-0.9.4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE="doc utftrip +ocamlopt test"
+
+RDEPEND=">=dev-lang/ocaml-3.12:=[ocamlopt?]
+ utftrip? ( dev-ml/cmdliner:= )"
+DEPEND="${RDEPEND}
+ test? ( dev-ml/cmdliner )"
+
+src_compile() {
+ ocaml pkg/build.ml \
+ native=$(usex ocamlopt true false) \
+ native-dynlink=$(usex ocamlopt true false) \
+ cmdliner=$(usex utftrip true false) \
+ || die
+}
+
+src_test() {
+ if use ocamlopt ; then
+ ocamlbuild -use-ocamlfind tests.otarget || die
+ cd _build/test || die
+ ./test.native || 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/*
+}