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

Contents of /eclass/findlib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sat Feb 2 21:10:16 2008 UTC (6 years, 10 months ago) by betelgeuse
Branch: MAIN
Changes since 1.6: +7 -5 lines
Use die instead of exit.

1 # Copyright 1999-2004 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.6 2008/02/02 21:05:33 betelgeuse Exp $
4 #
5 # Original author : Matthieu Sozeau <mattam@gentoo.org> (retired)
6 #
7 # Changes: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/findlib.eclass?view=log
8 #
9 # ocamlfind (a.k.a. findlib) eclass
10 #
11
12
13 # From this findlib version there is proper stublibs support.
14 DEPEND=">=dev-ml/findlib-1.0.4-r1"
15 [[ ${FINDLIB_USE} ]] && DEPEND="${FINDLIB_USE}? ( ${DEPEND} )"
16
17 check_ocamlfind() {
18 if [ ! -x /usr/bin/ocamlfind ]
19 then
20 eerror "In findlib.eclass: could not find the ocamlfind executable"
21 eerror "Please report this bug on gentoo's bugzilla, assigning to ml@gentoo.org"
22 die "ocamlfind executabled not found"
23 fi
24 }
25
26 # Prepare the image for a findlib installation.
27 # We use the stublibs style, so no ld.conf needs to be
28 # updated when a package installs C shared libraries.
29 findlib_src_preinst() {
30 check_ocamlfind
31
32 # destdir is the ocaml sitelib
33 local destdir=`ocamlfind printconf destdir`
34
35 dodir ${destdir} || die "dodir failed"
36 export OCAMLFIND_DESTDIR=${D}${destdir}
37
38 # stublibs style
39 dodir ${destdir}/stublibs || die "dodir failed"
40 export OCAMLFIND_LDCONF=ignore
41 }
42
43 # Install with a properly setup findlib
44 findlib_src_install() {
45 findlib_src_preinst
46 make DESTDIR=${D} "$@" install || die "make failed"
47 }

  ViewVC Help
Powered by ViewVC 1.1.20