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

Contents of /eclass/findlib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Tue Aug 24 14:32:56 2004 UTC (10 years, 1 month ago) by mattam
Branch: MAIN
Changes since 1.1: +4 -4 lines
Add '|| die' where needed

1 mattam 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 mattam 1.2 # $Header: /var/cvsroot/gentoo-x86/eclass/findlib.eclass,v 1.1 2004/08/21 18:09:03 mattam Exp $
4 mattam 1.1 #
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 mattam 1.2 dodir ${destdir} || die "dodir failed"
35 mattam 1.1 export OCAMLFIND_DESTDIR=${D}${destdir}
36    
37     # stublibs style
38 mattam 1.2 dodir ${destdir}/stublibs || die "dodir failed"
39 mattam 1.1 export OCAMLFIND_LDCONF=ignore
40     }
41    
42     # Install with a properly setup findlib
43     findlib_src_install() {
44     findlib_src_preinst
45 mattam 1.2 make DESTDIR=${D} "$@" install || die "make failed"
46 mattam 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20