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

Contents of /eclass/findlib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Tue Aug 9 19:06:37 2011 UTC (3 years, 1 month ago) by darkside
Branch: MAIN
Changes since 1.9: +8 -3 lines
migrate Gentoo Prefix changes

1 # Copyright 1999-2008 Gentoo Foundation
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 $
4
5 # @ECLASS: findlib.eclass
6 # @MAINTAINER:
7 # ml@gentoo.org
8 #
9 # Original author : Matthieu Sozeau <mattam@gentoo.org> (retired)
10 #
11 # Changes: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/findlib.eclass?view=log
12 # @BLURB: ocamlfind (a.k.a. findlib) eclass
13 # @DESCRIPTION:
14 # ocamlfind (a.k.a. findlib) eclass
15
16
17
18 # From this findlib version there is proper stublibs support.
19 DEPEND=">=dev-ml/findlib-1.0.4-r1"
20 [[ ${FINDLIB_USE} ]] && DEPEND="${FINDLIB_USE}? ( ${DEPEND} )"
21
22 check_ocamlfind() {
23 if [ ! -x "${EPREFIX}"/usr/bin/ocamlfind ]
24 then
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"
27 die "ocamlfind executabled not found"
28 fi
29 }
30
31 # @FUNCTION: findlib_src_preinst
32 # @DESCRIPTION:
33 # Prepare the image for a findlib installation.
34 # We use the stublibs style, so no ld.conf needs to be
35 # updated when a package installs C shared libraries.
36 findlib_src_preinst() {
37 has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
38 has "${EAPI:-0}" 0 1 2 && use !prefix && ED="${D}"
39 check_ocamlfind
40
41 # destdir is the ocaml sitelib
42 local destdir=`ocamlfind printconf destdir`
43
44 # strip off prefix
45 destdir=${destdir#${EPREFIX}}
46
47 dodir ${destdir} || die "dodir failed"
48 export OCAMLFIND_DESTDIR=${ED}${destdir}
49
50 # stublibs style
51 dodir ${destdir}/stublibs || die "dodir failed"
52 export OCAMLFIND_LDCONF=ignore
53 }
54
55 # @FUNCTION: findlib_src_install
56 # @DESCRIPTION:
57 # Install with a properly setup findlib
58 findlib_src_install() {
59 findlib_src_preinst
60 make DESTDIR="${D}" "$@" install || die "make failed"
61 }

  ViewVC Help
Powered by ViewVC 1.1.20