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

Contents of /eclass/findlib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Wed Nov 30 09:59:34 2005 UTC (8 years, 7 months ago) by chriswhite
Changes since 1.1: +5 -7 lines
*** empty log message ***

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

  ViewVC Help
Powered by ViewVC 1.1.20