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

Contents of /eclass/findlib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sat Aug 21 18:09:03 2004 UTC (10 years, 1 month ago) by mattam
Branch: MAIN
Initial import

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

  ViewVC Help
Powered by ViewVC 1.1.20