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

Contents of /eclass/findlib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sun Feb 24 15:46:09 2008 UTC (6 years, 9 months ago) by aballier
Branch: MAIN
Changes since 1.7: +13 -4 lines
make findlib eclass ready for eclass manpages, thanks to mren <bugs@rennings.net> in bug #210638

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 # @ECLASS: findlib.eclass
6 # @MAINTAINER:
7 # ml@gentoo.org
8 #
9 # Original author : Matthieu Sozeau <mattam@gentoo.org> (retired)
10 #
11 # Changes: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/findlib.eclass?view=log
12 # @BLURB: ocamlfind (a.k.a. findlib) eclass
13 # @DESCRIPTION:
14 # ocamlfind (a.k.a. findlib) eclass
15
16
17
18 # From this findlib version there is proper stublibs support.
19 DEPEND=">=dev-ml/findlib-1.0.4-r1"
20 [[ ${FINDLIB_USE} ]] && DEPEND="${FINDLIB_USE}? ( ${DEPEND} )"
21
22 check_ocamlfind() {
23 if [ ! -x /usr/bin/ocamlfind ]
24 then
25 eerror "In findlib.eclass: could not find the ocamlfind executable"
26 eerror "Please report this bug on gentoo's bugzilla, assigning to ml@gentoo.org"
27 die "ocamlfind executabled not found"
28 fi
29 }
30
31 # @FUNCTION: findlib_src_preinst
32 # @DESCRIPTION:
33 # Prepare the image for a findlib installation.
34 # We use the stublibs style, so no ld.conf needs to be
35 # updated when a package installs C shared libraries.
36 findlib_src_preinst() {
37 check_ocamlfind
38
39 # destdir is the ocaml sitelib
40 local destdir=`ocamlfind printconf destdir`
41
42 dodir ${destdir} || die "dodir failed"
43 export OCAMLFIND_DESTDIR=${D}${destdir}
44
45 # stublibs style
46 dodir ${destdir}/stublibs || die "dodir failed"
47 export OCAMLFIND_LDCONF=ignore
48 }
49
50 # @FUNCTION: findlib_src_install
51 # @DESCRIPTION:
52 # Install with a properly setup findlib
53 findlib_src_install() {
54 findlib_src_preinst
55 make DESTDIR=${D} "$@" install || die "make failed"
56 }

  ViewVC Help
Powered by ViewVC 1.1.20