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

Diff of /eclass/oasis.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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/oasis.eclass,v 1.1 2012/03/27 21:01:15 aballier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/oasis.eclass,v 1.2 2012/03/27 21:24:42 aballier Exp $
4 4
5# @ECLASS: oasis.eclass 5# @ECLASS: oasis.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# ml@gentoo.org 7# ml@gentoo.org
8# @AUTHOR: 8# @AUTHOR:
22# defined and the doc useflag is enabled. 22# defined and the doc useflag is enabled.
23# The eclass takes care of setting doc in IUSE but the ebuild should take care 23# The eclass takes care of setting doc in IUSE but the ebuild should take care
24# of the extra dependencies it may need. 24# of the extra dependencies it may need.
25# Set before inheriting the eclass. 25# Set before inheriting the eclass.
26 26
27# @ECLASS-VARIABLE: OASIS_BUILD_TESTS
28# @DESCRIPTION:
29# Will make oasis_src_configure enable building the tests if the test useflag is
30# enabled. oasis_src_test will then run them.
31# Note that you sometimes need to enable this for src_test to be useful,
32# sometimes not. It has to be enabled on a per-case basis.
33# The eclass takes care of setting test in IUSE but the ebuild should take care
34# of the extra dependencies it may need.
35# Set before inheriting the eclass.
36
27inherit multilib findlib eutils base 37inherit multilib findlib eutils base
28 38
29case ${EAPI:-0} in 39case ${EAPI:-0} in
30 0|1|2) die "You need at least EAPI-3 to use oasis.eclass";; 40 0|1|2) die "You need at least EAPI-3 to use oasis.eclass";;
31esac 41esac
32 42
33IUSE="debug +ocamlopt" 43IUSE="debug +ocamlopt"
34[ -n "${OASIS_BUILD_DOCS}" ] && IUSE="${IUSE} doc" 44[ -n "${OASIS_BUILD_DOCS}" ] && IUSE="${IUSE} doc"
45[ -n "${OASIS_BUILD_TESTS}" ] && IUSE="${IUSE} test"
35 46
36RDEPEND=">=dev-lang/ocaml-3.12[ocamlopt?]" 47RDEPEND=">=dev-lang/ocaml-3.12[ocamlopt?]"
37DEPEND="${RDEPEND}" 48DEPEND="${RDEPEND}"
38 49
39# @FUNCTION: oasis_use_enable 50# @FUNCTION: oasis_use_enable
51# @FUNCTION: oasis_src_configure 62# @FUNCTION: oasis_src_configure
52# @DESCRIPTION: 63# @DESCRIPTION:
53# src_configure phase shared by oasis-based packages. 64# src_configure phase shared by oasis-based packages.
54# Extra arguments may be passed via oasis_configure_opts. 65# Extra arguments may be passed via oasis_configure_opts.
55oasis_src_configure() { 66oasis_src_configure() {
67 local testargs=""
68 [ -n "${OASIS_BUILD_TESTS}" ] && testargs="$(use_enable test tests)"
56 ocaml setup.ml -configure \ 69 ocaml setup.ml -configure \
57 --prefix "${EPREFIX}/usr" \ 70 --prefix "${EPREFIX}/usr" \
58 --libdir "${EPREFIX}/usr/$(get_libdir)" \ 71 --libdir "${EPREFIX}/usr/$(get_libdir)" \
59 --docdir "${EPREFIX}/usr/share/doc/${PF}/html" \ 72 --docdir "${EPREFIX}/usr/share/doc/${PF}/html" \
60 --destdir "${D}" \ 73 --destdir "${D}" \
61 $(oasis_use_enable debug debug) \ 74 $(oasis_use_enable debug debug) \
62 $(oasis_use_enable ocamlopt is_native) \ 75 $(oasis_use_enable ocamlopt is_native) \
76 ${testargs} \
63 ${oasis_configure_opts} \ 77 ${oasis_configure_opts} \
64 || die 78 || die
65} 79}
66 80
67# @FUNCTION: oasis_src_compile 81# @FUNCTION: oasis_src_compile

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20