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

Diff of /eclass/oasis.eclass

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

Revision 1.2 Revision 1.3
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.2 2012/03/27 21:24:42 aballier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/oasis.eclass,v 1.3 2012/03/27 22:44:41 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:
32# sometimes not. It has to be enabled on a per-case basis. 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 33# The eclass takes care of setting test in IUSE but the ebuild should take care
34# of the extra dependencies it may need. 34# of the extra dependencies it may need.
35# Set before inheriting the eclass. 35# Set before inheriting the eclass.
36 36
37
38# @ECLASS-VARIABLE: OASIS_NO_DEBUG
39# @DESCRIPTION:
40# Disable debug useflag usage. Old oasis versions did not support it so we allow
41# disabling it in those cases.
42# The eclass takes care of setting debug in IUSE.
43# Set before inheriting the eclass.
44
37inherit multilib findlib eutils base 45inherit multilib findlib eutils base
38 46
39case ${EAPI:-0} in 47case ${EAPI:-0} in
40 0|1|2) die "You need at least EAPI-3 to use oasis.eclass";; 48 0|1|2) die "You need at least EAPI-3 to use oasis.eclass";;
41esac 49esac
42 50
43IUSE="debug +ocamlopt" 51IUSE="+ocamlopt"
52[ -n "${OASIS_NO_DEBUG}" ] || IUSE="${IUSE} debug"
44[ -n "${OASIS_BUILD_DOCS}" ] && IUSE="${IUSE} doc" 53[ -n "${OASIS_BUILD_DOCS}" ] && IUSE="${IUSE} doc"
45[ -n "${OASIS_BUILD_TESTS}" ] && IUSE="${IUSE} test" 54[ -n "${OASIS_BUILD_TESTS}" ] && IUSE="${IUSE} test"
46 55
47RDEPEND=">=dev-lang/ocaml-3.12[ocamlopt?]" 56RDEPEND=">=dev-lang/ocaml-3.12[ocamlopt?]"
48DEPEND="${RDEPEND}" 57DEPEND="${RDEPEND}"
62# @FUNCTION: oasis_src_configure 71# @FUNCTION: oasis_src_configure
63# @DESCRIPTION: 72# @DESCRIPTION:
64# src_configure phase shared by oasis-based packages. 73# src_configure phase shared by oasis-based packages.
65# Extra arguments may be passed via oasis_configure_opts. 74# Extra arguments may be passed via oasis_configure_opts.
66oasis_src_configure() { 75oasis_src_configure() {
67 local testargs="" 76 local confargs=""
68 [ -n "${OASIS_BUILD_TESTS}" ] && testargs="$(use_enable test tests)" 77 [ -n "${OASIS_BUILD_TESTS}" ] && confargs="${confargs} $(use_enable test tests)"
78 [ -n "${OASIS_NO_DEBUG}" ] || confargs="${confargs} $(oasis_use_enable debug debug)"
69 ocaml setup.ml -configure \ 79 ocaml setup.ml -configure \
70 --prefix "${EPREFIX}/usr" \ 80 --prefix "${EPREFIX}/usr" \
71 --libdir "${EPREFIX}/usr/$(get_libdir)" \ 81 --libdir "${EPREFIX}/usr/$(get_libdir)" \
72 --docdir "${EPREFIX}/usr/share/doc/${PF}/html" \ 82 --docdir "${EPREFIX}/usr/share/doc/${PF}/html" \
73 --destdir "${D}" \ 83 --destdir "${D}" \
74 $(oasis_use_enable debug debug) \
75 $(oasis_use_enable ocamlopt is_native) \ 84 $(oasis_use_enable ocamlopt is_native) \
76 ${testargs} \ 85 ${confargs} \
77 ${oasis_configure_opts} \ 86 ${oasis_configure_opts} \
78 || die 87 || die
79} 88}
80 89
81# @FUNCTION: oasis_src_compile 90# @FUNCTION: oasis_src_compile

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

  ViewVC Help
Powered by ViewVC 1.1.20