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

Contents of /eclass/findlib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Sat Feb 2 21:05:33 2008 UTC (6 years, 7 months ago) by betelgeuse
Branch: MAIN
Changes since 1.5: +3 -2 lines
Make it possible to have the depend conditional via a use flag.

1 mattam 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 betelgeuse 1.6 # $Header: /var/cvsroot/gentoo-x86/eclass/findlib.eclass,v 1.5 2005/07/11 15:08:06 swegener Exp $
4 mattam 1.1 #
5 betelgeuse 1.6 # Origianl author : Matthieu Sozeau <mattam@gentoo.org> (retired)
6 mattam 1.1 #
7     # ocamlfind (a.k.a. findlib) eclass
8 swegener 1.5 #
9 mattam 1.1
10    
11     # From this findlib version there is proper stublibs support.
12     DEPEND=">=dev-ml/findlib-1.0.4-r1"
13 betelgeuse 1.6 [[ ${FINDLIB_USE} ]] && DEPEND="${FINDLIB_USE}? ( ${DEPEND} )"
14 mattam 1.1
15     check_ocamlfind() {
16     if [ ! -x /usr/bin/ocamlfind ]
17     then
18     ewarn "In findlib.eclass: could not find the ocamlfind executable"
19     ewarn "Please report this bug on gentoo's bugzilla, assigning to ml@gentoo.org"
20     exit 1
21     fi
22     }
23    
24     # Prepare the image for a findlib installation.
25     # We use the stublibs style, so no ld.conf needs to be
26     # updated when a package installs C shared libraries.
27     findlib_src_preinst() {
28     check_ocamlfind
29    
30     # destdir is the ocaml sitelib
31     local destdir=`ocamlfind printconf destdir`
32    
33 swegener 1.5 dodir ${destdir} || die "dodir failed"
34 mattam 1.1 export OCAMLFIND_DESTDIR=${D}${destdir}
35    
36     # stublibs style
37 mattam 1.2 dodir ${destdir}/stublibs || die "dodir failed"
38 mattam 1.1 export OCAMLFIND_LDCONF=ignore
39     }
40    
41     # Install with a properly setup findlib
42     findlib_src_install() {
43     findlib_src_preinst
44 mattam 1.2 make DESTDIR=${D} "$@" install || die "make failed"
45 mattam 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20