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