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

Contents of /eclass/findlib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20