/[gentoo-x86]/eclass/findlib.eclass
Gentoo

Diff of /eclass/findlib.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.9 Revision 1.10
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/findlib.eclass,v 1.9 2009/02/08 21:30:12 maekke Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/findlib.eclass,v 1.10 2011/08/09 19:06:37 darkside Exp $
4 4
5# @ECLASS: findlib.eclass 5# @ECLASS: findlib.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# ml@gentoo.org 7# ml@gentoo.org
8# 8#
18# From this findlib version there is proper stublibs support. 18# From this findlib version there is proper stublibs support.
19DEPEND=">=dev-ml/findlib-1.0.4-r1" 19DEPEND=">=dev-ml/findlib-1.0.4-r1"
20[[ ${FINDLIB_USE} ]] && DEPEND="${FINDLIB_USE}? ( ${DEPEND} )" 20[[ ${FINDLIB_USE} ]] && DEPEND="${FINDLIB_USE}? ( ${DEPEND} )"
21 21
22check_ocamlfind() { 22check_ocamlfind() {
23 if [ ! -x /usr/bin/ocamlfind ] 23 if [ ! -x "${EPREFIX}"/usr/bin/ocamlfind ]
24 then 24 then
25 eerror "In findlib.eclass: could not find the ocamlfind executable" 25 eerror "In findlib.eclass: could not find the ocamlfind executable"
26 eerror "Please report this bug on gentoo's bugzilla, assigning to ml@gentoo.org" 26 eerror "Please report this bug on gentoo's bugzilla, assigning to ml@gentoo.org"
27 die "ocamlfind executabled not found" 27 die "ocamlfind executabled not found"
28 fi 28 fi
32# @DESCRIPTION: 32# @DESCRIPTION:
33# Prepare the image for a findlib installation. 33# Prepare the image for a findlib installation.
34# We use the stublibs style, so no ld.conf needs to be 34# We use the stublibs style, so no ld.conf needs to be
35# updated when a package installs C shared libraries. 35# updated when a package installs C shared libraries.
36findlib_src_preinst() { 36findlib_src_preinst() {
37 has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
38 has "${EAPI:-0}" 0 1 2 && use !prefix && ED="${D}"
37 check_ocamlfind 39 check_ocamlfind
38 40
39 # destdir is the ocaml sitelib 41 # destdir is the ocaml sitelib
40 local destdir=`ocamlfind printconf destdir` 42 local destdir=`ocamlfind printconf destdir`
41 43
44 # strip off prefix
45 destdir=${destdir#${EPREFIX}}
46
42 dodir ${destdir} || die "dodir failed" 47 dodir ${destdir} || die "dodir failed"
43 export OCAMLFIND_DESTDIR=${D}${destdir} 48 export OCAMLFIND_DESTDIR=${ED}${destdir}
44 49
45 # stublibs style 50 # stublibs style
46 dodir ${destdir}/stublibs || die "dodir failed" 51 dodir ${destdir}/stublibs || die "dodir failed"
47 export OCAMLFIND_LDCONF=ignore 52 export OCAMLFIND_LDCONF=ignore
48} 53}

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20