summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Junghans <ottxor@gentoo.org>2012-11-01 00:14:13 +0000
committerChristoph Junghans <ottxor@gentoo.org>2012-11-01 00:14:13 +0000
commitb6d0fd6f539f5815cbfacfe35c6bddf407622c11 (patch)
treef385d2c7867d465222e31641a00a442104d69007 /dev-ml/findlib
parentVersion bump. (diff)
downloadgentoo-2-b6d0fd6f539f5815cbfacfe35c6bddf407622c11.tar.gz
gentoo-2-b6d0fd6f539f5815cbfacfe35c6bddf407622c11.tar.bz2
gentoo-2-b6d0fd6f539f5815cbfacfe35c6bddf407622c11.zip
added prefix support (bug #440352)
(Portage version: 2.2.0_alpha142/cvs/Linux i686, signed Manifest commit with key C2000586)
Diffstat (limited to 'dev-ml/findlib')
-rw-r--r--dev-ml/findlib/ChangeLog7
-rw-r--r--dev-ml/findlib/findlib-1.3.3-r1.ebuild75
2 files changed, 81 insertions, 1 deletions
diff --git a/dev-ml/findlib/ChangeLog b/dev-ml/findlib/ChangeLog
index 5bf25463c088..f65de65fe933 100644
--- a/dev-ml/findlib/ChangeLog
+++ b/dev-ml/findlib/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-ml/findlib
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ml/findlib/ChangeLog,v 1.94 2012/10/08 12:18:54 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/findlib/ChangeLog,v 1.95 2012/11/01 00:14:13 ottxor Exp $
+
+*findlib-1.3.3-r1 (01 Nov 2012)
+
+ 01 Nov 2012; Christoph Junghans <ottxor@gentoo.org> +findlib-1.3.3-r1.ebuild:
+ added prefix support (bug #440352)
08 Oct 2012; Alexis Ballier <aballier@gentoo.org> -findlib-1.2.7.ebuild,
-findlib-1.3.1.ebuild:
diff --git a/dev-ml/findlib/findlib-1.3.3-r1.ebuild b/dev-ml/findlib/findlib-1.3.3-r1.ebuild
new file mode 100644
index 000000000000..8fcce8558ed5
--- /dev/null
+++ b/dev-ml/findlib/findlib-1.3.3-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/findlib/findlib-1.3.3-r1.ebuild,v 1.1 2012/11/01 00:14:13 ottxor Exp $
+
+EAPI=4
+
+inherit multilib
+
+RESTRICT="installsources"
+
+DESCRIPTION="OCaml tool to find/use non-standard packages."
+HOMEPAGE="http://projects.camlcity.org/projects/findlib.html"
+SRC_URI="http://download.camlcity.org/download/${P}.tar.gz"
+IUSE="doc +ocamlopt tk"
+
+LICENSE="MIT"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+
+DEPEND=">=dev-lang/ocaml-3.10[ocamlopt?,tk?]"
+RDEPEND="${DEPEND}"
+
+ocamlfind_destdir="${EPREFIX}/usr/$(get_libdir)/ocaml"
+stublibs="${ocamlfind_destdir}/stublibs"
+
+src_configure() {
+ local myconf
+ use tk && myconf="-with-toolbox"
+ ./configure -bindir "${EPREFIX}"/usr/bin -mandir "${EPREFIX}"/usr/share/man \
+ -sitelib ${ocamlfind_destdir} \
+ -config ${ocamlfind_destdir}/findlib/findlib.conf \
+ ${myconf} || die "configure failed"
+}
+
+src_compile() {
+ emake all
+ if use ocamlopt; then
+ emake opt # optimized code
+ else
+ # If using bytecode we dont want to strip the binary as it would remove the
+ # bytecode and only leave ocamlrun...
+ export STRIP_MASK="*/bin/*"
+ fi
+}
+
+src_install() {
+ emake prefix="${D}" install
+
+ dodir "${stublibs#${EPREFIX}}"
+
+ cd "${S}/doc"
+ dodoc QUICKSTART README DOCINFO
+ use doc && dohtml -r ref-html guide-html
+}
+
+check_stublibs() {
+ local ocaml_stdlib=`ocamlc -where`
+ local ldconf="${ocaml_stdlib}/ld.conf"
+
+ if [ ! -e ${ldconf} ]
+ then
+ echo "${ocaml_stdlib}" > ${ldconf}
+ echo "${ocaml_stdlib}/stublibs" >> ${ldconf}
+ fi
+
+ if [ -z `grep -e ${stublibs} ${ldconf}` ]
+ then
+ echo ${stublibs} >> ${ldconf}
+ fi
+}
+
+pkg_postinst() {
+ check_stublibs
+}