/[gentoo-x86]/eclass/java-pkg-opt-2.eclass
Gentoo

Diff of /eclass/java-pkg-opt-2.eclass

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

Revision 1.14 Revision 1.16
1# Eclass for optional Java packages 1# Eclass for optional Java packages
2# 2#
3# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org> 3# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org>
4# Copyright (c) 2004-2005, Gentoo Foundation 4# Copyright (c) 2004-2011, Gentoo Foundation
5# 5#
6# Licensed under the GNU General Public License, v2 6# Licensed under the GNU General Public License, v2
7# 7#
8# Major changes: 8# Major changes:
9# 20070805: 9# 20070805:
10# Removed phase hooks because Portage does proper env saving now. 10# Removed phase hooks because Portage does proper env saving now.
11# <betelgeuse@gentoo.org> 11# <betelgeuse@gentoo.org>
12# 12#
13# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-opt-2.eclass,v 1.14 2010/02/01 09:38:44 caster Exp $ 13# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-opt-2.eclass,v 1.16 2012/07/21 12:00:17 sera Exp $
14
15# @ECLASS: java-pkg-opt-2.eclass
16# @MAINTAINER:
17# java@gentoo.org
18# @AUTHOR:
19# Thomas Matthijs <axxo@gentoo.org>
20# @BLURB: Eclass for package with optional Java support
21# @DESCRIPTION:
22# Inherit this eclass instead of java-pkg-2 if you only need optional Java
23# support.
14 24
15inherit java-utils-2 25inherit java-utils-2
16 26
17# ------------------------------------------------------------------------------ 27# @ECLASS-VARIABLE: JAVA_PKG_OPT_USE
18# @eclass-begin 28# @DESCRIPTION:
19# @eclass-summary Eclass for packages with optional Java support
20# ------------------------------------------------------------------------------
21
22# ------------------------------------------------------------------------------
23# @ebuild-variable JAVA_PKG_OPT_USE
24#
25# USE flag to control if optional Java stuff is build. Defaults to 'java'. 29# USE flag to control if optional Java stuff is build. Defaults to 'java'.
26# ------------------------------------------------------------------------------
27JAVA_PKG_OPT_USE=${JAVA_PKG_OPT_USE:-java} 30JAVA_PKG_OPT_USE=${JAVA_PKG_OPT_USE:-java}
28 31
29# ------------------------------------------------------------------------------
30# ------------------------------------------------------------------------------
31DEPEND="${JAVA_PKG_OPT_USE}? ( ${JAVA_PKG_E_DEPEND} )" 32DEPEND="${JAVA_PKG_OPT_USE}? ( ${JAVA_PKG_E_DEPEND} )"
32RDEPEND="${DEPEND}" 33RDEPEND="${DEPEND}"
33 34
34# ------------------------------------------------------------------------------
35# ------------------------------------------------------------------------------
36# See java-pkg-2.eclass for JAVA_PKG_IUSE documentation 35# See java-pkg-2.eclass for JAVA_PKG_IUSE documentation
37IUSE="${JAVA_PKG_IUSE} ${JAVA_PKG_OPT_USE}" 36IUSE="${JAVA_PKG_IUSE} ${JAVA_PKG_OPT_USE}"
38 37
39case "${EAPI:-0}" in 38case "${EAPI:-0}" in
40 0|1) EXPORT_FUNCTIONS pkg_setup pkg_preinst ;; 39 0|1) EXPORT_FUNCTIONS pkg_setup pkg_preinst ;;
41 *) EXPORT_FUNCTIONS pkg_setup src_prepare pkg_preinst ;; 40 *) EXPORT_FUNCTIONS pkg_setup src_prepare pkg_preinst ;;
42esac 41esac
43 42
44# ------------------------------------------------------------------------------ 43# @FUNCTION: java-pkg-opt-2_pkg_setup
45# ------------------------------------------------------------------------------ 44# @DESCRIPTION:
45# default pkg_setup, wrapper for java-utils-2_pkg_init
46
46java-pkg-opt-2_pkg_setup() { 47java-pkg-opt-2_pkg_setup() {
47 use ${JAVA_PKG_OPT_USE} && java-pkg_init 48 use ${JAVA_PKG_OPT_USE} && java-pkg_init
48} 49}
49 50
50# ------------------------------------------------------------------------------ 51
51# @eclass-src_prepare 52# @FUNCTION: java-pkg-opt-2_src_prepare
52# 53# @DESCRIPTION:
53# wrapper for java-utils-2_src_prepare 54# default src_prepare, wrapper for java-utils-2_src_prepare
54# ------------------------------------------------------------------------------ 55
55java-pkg-opt-2_src_prepare() { 56java-pkg-opt-2_src_prepare() {
56 use ${JAVA_PKG_OPT_USE} && java-utils-2_src_prepare 57 use ${JAVA_PKG_OPT_USE} && java-utils-2_src_prepare
57} 58}
58 59
59# ------------------------------------------------------------------------------ 60
60# @eclass-pkg_preinst 61# @FUNCTION: java-pkg-opt-2_pkg_preinst
61# 62# @DESCRIPTION:
62# wrapper for java-utils-2_pkg_preinst 63# default pkg_preinst, wrapper for java-utils-2_pkg_preinst
63# ------------------------------------------------------------------------------ 64
64java-pkg-opt-2_pkg_preinst() { 65java-pkg-opt-2_pkg_preinst() {
65 use ${JAVA_PKG_OPT_USE} && java-utils-2_pkg_preinst 66 use ${JAVA_PKG_OPT_USE} && java-utils-2_pkg_preinst
66} 67}

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.20