diff options
author | Jeremy Olexa <darkside@gentoo.org> | 2011-08-09 19:06:37 +0000 |
---|---|---|
committer | Jeremy Olexa <darkside@gentoo.org> | 2011-08-09 19:06:37 +0000 |
commit | fa3bb1cc6d8f64d67598d6bba62a960ded8948f2 (patch) | |
tree | 817025da81b7e93a18da76e65b1dd7e88a1646e6 /eclass/findlib.eclass | |
parent | [bump] perl-core/bignum-0.290.0 (diff) | |
download | gentoo-2-fa3bb1cc6d8f64d67598d6bba62a960ded8948f2.tar.gz gentoo-2-fa3bb1cc6d8f64d67598d6bba62a960ded8948f2.tar.bz2 gentoo-2-fa3bb1cc6d8f64d67598d6bba62a960ded8948f2.zip |
migrate Gentoo Prefix changes
Diffstat (limited to 'eclass/findlib.eclass')
-rw-r--r-- | eclass/findlib.eclass | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/eclass/findlib.eclass b/eclass/findlib.eclass index a824627a8104..4a1e2e5f8eed 100644 --- a/eclass/findlib.eclass +++ b/eclass/findlib.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/findlib.eclass,v 1.9 2009/02/08 21:30:12 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/findlib.eclass,v 1.10 2011/08/09 19:06:37 darkside Exp $ # @ECLASS: findlib.eclass # @MAINTAINER: @@ -20,7 +20,7 @@ DEPEND=">=dev-ml/findlib-1.0.4-r1" [[ ${FINDLIB_USE} ]] && DEPEND="${FINDLIB_USE}? ( ${DEPEND} )" check_ocamlfind() { - if [ ! -x /usr/bin/ocamlfind ] + if [ ! -x "${EPREFIX}"/usr/bin/ocamlfind ] then eerror "In findlib.eclass: could not find the ocamlfind executable" eerror "Please report this bug on gentoo's bugzilla, assigning to ml@gentoo.org" @@ -34,13 +34,18 @@ check_ocamlfind() { # We use the stublibs style, so no ld.conf needs to be # updated when a package installs C shared libraries. findlib_src_preinst() { + has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= + has "${EAPI:-0}" 0 1 2 && use !prefix && ED="${D}" check_ocamlfind # destdir is the ocaml sitelib local destdir=`ocamlfind printconf destdir` + # strip off prefix + destdir=${destdir#${EPREFIX}} + dodir ${destdir} || die "dodir failed" - export OCAMLFIND_DESTDIR=${D}${destdir} + export OCAMLFIND_DESTDIR=${ED}${destdir} # stublibs style dodir ${destdir}/stublibs || die "dodir failed" |