| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2004 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.2 2004/08/24 14:32:56 mattam Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/findlib.eclass,v 1.6 2008/02/02 21:05:33 betelgeuse Exp $ |
| 4 | # |
4 | # |
| 5 | # Author : Matthieu Sozeau <mattam@gentoo.org> |
5 | # Origianl author : Matthieu Sozeau <mattam@gentoo.org> (retired) |
| 6 | # |
6 | # |
| 7 | # ocamlfind (a.k.a. findlib) eclass |
7 | # ocamlfind (a.k.a. findlib) eclass |
| 8 | # |
8 | # |
| 9 | |
9 | |
| 10 | ECLASS="findlib" |
|
|
| 11 | INHERITED="$INHERITED $ECLASS" |
|
|
| 12 | |
10 | |
| 13 | # From this findlib version there is proper stublibs support. |
11 | # From this findlib version there is proper stublibs support. |
| 14 | DEPEND=">=dev-ml/findlib-1.0.4-r1" |
12 | DEPEND=">=dev-ml/findlib-1.0.4-r1" |
|
|
13 | [[ ${FINDLIB_USE} ]] && DEPEND="${FINDLIB_USE}? ( ${DEPEND} )" |
| 15 | |
14 | |
| 16 | check_ocamlfind() { |
15 | check_ocamlfind() { |
| 17 | if [ ! -x /usr/bin/ocamlfind ] |
16 | if [ ! -x /usr/bin/ocamlfind ] |
| 18 | then |
17 | then |
| 19 | ewarn "In findlib.eclass: could not find the ocamlfind executable" |
18 | ewarn "In findlib.eclass: could not find the ocamlfind executable" |
| … | |
… | |
| 29 | check_ocamlfind |
28 | check_ocamlfind |
| 30 | |
29 | |
| 31 | # destdir is the ocaml sitelib |
30 | # destdir is the ocaml sitelib |
| 32 | local destdir=`ocamlfind printconf destdir` |
31 | local destdir=`ocamlfind printconf destdir` |
| 33 | |
32 | |
| 34 | dodir ${destdir} || die "dodir failed" |
33 | dodir ${destdir} || die "dodir failed" |
| 35 | export OCAMLFIND_DESTDIR=${D}${destdir} |
34 | export OCAMLFIND_DESTDIR=${D}${destdir} |
| 36 | |
35 | |
| 37 | # stublibs style |
36 | # stublibs style |
| 38 | dodir ${destdir}/stublibs || die "dodir failed" |
37 | dodir ${destdir}/stublibs || die "dodir failed" |
| 39 | export OCAMLFIND_LDCONF=ignore |
38 | export OCAMLFIND_LDCONF=ignore |