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

Contents of /eclass/findlib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Mon Aug 22 04:46:31 2011 UTC (3 years, 3 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +4 -6 lines
fix random bugs in eclass documentation, and convert to new @AUTHOR tag

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

  ViewVC Help
Powered by ViewVC 1.1.20