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

Contents of /eclass/findlib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


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

1 mattam 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 betelgeuse 1.7 # $Header: /var/cvsroot/gentoo-x86/eclass/findlib.eclass,v 1.6 2008/02/02 21:05:33 betelgeuse Exp $
4 mattam 1.1 #
5 betelgeuse 1.7 # Original author : Matthieu Sozeau <mattam@gentoo.org> (retired)
6 mattam 1.1 #
7 betelgeuse 1.7 # Changes: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/findlib.eclass?view=log
8     #
9 mattam 1.1 # ocamlfind (a.k.a. findlib) eclass
10 swegener 1.5 #
11 mattam 1.1
12    
13     # From this findlib version there is proper stublibs support.
14     DEPEND=">=dev-ml/findlib-1.0.4-r1"
15 betelgeuse 1.6 [[ ${FINDLIB_USE} ]] && DEPEND="${FINDLIB_USE}? ( ${DEPEND} )"
16 mattam 1.1
17     check_ocamlfind() {
18     if [ ! -x /usr/bin/ocamlfind ]
19     then
20 betelgeuse 1.7 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 mattam 1.1 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 swegener 1.5 dodir ${destdir} || die "dodir failed"
36 mattam 1.1 export OCAMLFIND_DESTDIR=${D}${destdir}
37    
38     # stublibs style
39 mattam 1.2 dodir ${destdir}/stublibs || die "dodir failed"
40 mattam 1.1 export OCAMLFIND_LDCONF=ignore
41     }
42    
43     # Install with a properly setup findlib
44     findlib_src_install() {
45     findlib_src_preinst
46 mattam 1.2 make DESTDIR=${D} "$@" install || die "make failed"
47 mattam 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20