dev-ml/ocamlbuild: initial import; split out of dev-lang/ocaml.
authorAlexis Ballier <aballier@gentoo.org>
Tue, 1 Mar 2016 17:50:34 +0000 (18:50 +0100)
committerAlexis Ballier <aballier@gentoo.org>
Tue, 1 Mar 2016 18:47:37 +0000 (19:47 +0100)
Package-Manager: portage-2.2.27
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
dev-ml/ocamlbuild/Manifest [new file with mode: 0644]
dev-ml/ocamlbuild/files/installbin.patch [new file with mode: 0644]
dev-ml/ocamlbuild/metadata.xml [new file with mode: 0644]
dev-ml/ocamlbuild/ocamlbuild-0.9.1.ebuild [new file with mode: 0644]

diff --git a/dev-ml/ocamlbuild/Manifest b/dev-ml/ocamlbuild/Manifest
new file mode 100644 (file)
index 0000000..5384654
--- /dev/null
@@ -0,0 +1 @@
+DIST ocamlbuild-0.9.1.tar.gz 160896 SHA256 7a31fde2d863768372851665e3ce64064c35e38d2b2f3cbd060a6df426f16ee8 SHA512 07da313f896fd31fab42881515f33544a587f831aa0928540af2351bf8d59b14115a144b17d156cb2599ce5d568684192a922f9f85f86ddd7299b8e194fd85c6 WHIRLPOOL f28e3ce19371dc26d6992035e47a72cb82adde2869dd5188a8ea0ed6aee481633e0ada4ec28428a2f58e51582f60c3a486066d0f7e09dda4e8c374f977f420a8
diff --git a/dev-ml/ocamlbuild/files/installbin.patch b/dev-ml/ocamlbuild/files/installbin.patch
new file mode 100644 (file)
index 0000000..e7bd2cf
--- /dev/null
@@ -0,0 +1,13 @@
+Index: ocamlbuild-0.9.1/Makefile
+===================================================================
+--- ocamlbuild-0.9.1.orig/Makefile
++++ ocamlbuild-0.9.1/Makefile
+@@ -202,7 +202,7 @@ beforedepend:: src/ocamlbuild_config.ml
+ install-bin-byte:
+       mkdir -p $(INSTALL_BINDIR)
+       $(CP) ocamlbuild.byte $(INSTALL_BINDIR)/ocamlbuild.byte$(EXE)
+-ifeq ($(OCAML_NATIVE), true)
++ifneq ($(OCAML_NATIVE), true)
+       $(CP) ocamlbuild.byte $(INSTALL_BINDIR)/ocamlbuild$(EXE)
+ endif
diff --git a/dev-ml/ocamlbuild/metadata.xml b/dev-ml/ocamlbuild/metadata.xml
new file mode 100644 (file)
index 0000000..ffac4d7
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+       <email>ml@gentoo.org</email>
+       <name>Gentoo ML Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-ml/ocamlbuild/ocamlbuild-0.9.1.ebuild b/dev-ml/ocamlbuild/ocamlbuild-0.9.1.ebuild
new file mode 100644 (file)
index 0000000..526a153
--- /dev/null
@@ -0,0 +1,38 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="OCamlbuild"
+HOMEPAGE="https://github.com/ocaml/ocamlbuild"
+SRC_URI="https://github.com/ocaml/ocamlbuild/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1-with-linking-exception"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="+ocamlopt"
+
+DEPEND=">=dev-lang/ocaml-4.02.3-r1:=[ocamlopt?]"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+       epatch "${FILESDIR}/installbin.patch"
+}
+
+src_configure() {
+       emake -f configure.make Makefile.config \
+               PREFIX="${EPREFIX}/usr" \
+               BINDIR="${EPREFIX}/usr/bin" \
+               LIBDIR="$(ocamlc -where)" \
+               OCAML_NATIVE=$(usex ocamlopt true false) \
+               OCAML_NATIVE_TOOLS=$(usex ocamlopt true false) \
+               NATDYNLINK=$(usex ocamlopt true false)
+}
+
+src_install() {
+       emake CHECK_IF_PREINSTALLED=false DESTDIR="${D}" install
+       dodoc Changes
+}