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

Contents of /eclass/findlib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (hide annotations) (download)
Tue Aug 9 19:06:37 2011 UTC (3 years, 3 months ago) by darkside
Branch: MAIN
Changes since 1.9: +8 -3 lines
migrate Gentoo Prefix changes

1 aballier 1.8 # Copyright 1999-2008 Gentoo Foundation
2 mattam 1.1 # Distributed under the terms of the GNU General Public License v2
3 darkside 1.10 # $Header: /var/cvsroot/gentoo-x86/eclass/findlib.eclass,v 1.9 2009/02/08 21:30:12 maekke Exp $
4 aballier 1.8
5     # @ECLASS: findlib.eclass
6     # @MAINTAINER:
7     # ml@gentoo.org
8 mattam 1.1 #
9 betelgeuse 1.7 # Original author : Matthieu Sozeau <mattam@gentoo.org> (retired)
10 mattam 1.1 #
11 betelgeuse 1.7 # Changes: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/findlib.eclass?view=log
12 aballier 1.8 # @BLURB: ocamlfind (a.k.a. findlib) eclass
13     # @DESCRIPTION:
14 mattam 1.1 # ocamlfind (a.k.a. findlib) eclass
15 aballier 1.8
16 mattam 1.1
17    
18     # From this findlib version there is proper stublibs support.
19     DEPEND=">=dev-ml/findlib-1.0.4-r1"
20 betelgeuse 1.6 [[ ${FINDLIB_USE} ]] && DEPEND="${FINDLIB_USE}? ( ${DEPEND} )"
21 mattam 1.1
22     check_ocamlfind() {
23 darkside 1.10 if [ ! -x "${EPREFIX}"/usr/bin/ocamlfind ]
24 mattam 1.1 then
25 betelgeuse 1.7 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 mattam 1.1 fi
29     }
30    
31 aballier 1.8 # @FUNCTION: findlib_src_preinst
32     # @DESCRIPTION:
33 mattam 1.1 # 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 darkside 1.10 has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
38     has "${EAPI:-0}" 0 1 2 && use !prefix && ED="${D}"
39 mattam 1.1 check_ocamlfind
40    
41     # destdir is the ocaml sitelib
42     local destdir=`ocamlfind printconf destdir`
43    
44 darkside 1.10 # strip off prefix
45     destdir=${destdir#${EPREFIX}}
46    
47 swegener 1.5 dodir ${destdir} || die "dodir failed"
48 darkside 1.10 export OCAMLFIND_DESTDIR=${ED}${destdir}
49 mattam 1.1
50     # stublibs style
51 mattam 1.2 dodir ${destdir}/stublibs || die "dodir failed"
52 mattam 1.1 export OCAMLFIND_LDCONF=ignore
53     }
54    
55 aballier 1.8 # @FUNCTION: findlib_src_install
56     # @DESCRIPTION:
57 mattam 1.1 # Install with a properly setup findlib
58     findlib_src_install() {
59     findlib_src_preinst
60 maekke 1.9 make DESTDIR="${D}" "$@" install || die "make failed"
61 mattam 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20