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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.16 - (show annotations) (download)
Sat Jul 21 12:00:17 2012 UTC (20 months, 4 weeks ago) by sera
Branch: MAIN
CVS Tags: HEAD
Changes since 1.15: +27 -26 lines
Convert documentation to eclass-manpages.

1 # Eclass for optional Java packages
2 #
3 # Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org>
4 # Copyright (c) 2004-2011, Gentoo Foundation
5 #
6 # Licensed under the GNU General Public License, v2
7 #
8 # Major changes:
9 # 20070805:
10 # Removed phase hooks because Portage does proper env saving now.
11 # <betelgeuse@gentoo.org>
12 #
13 # $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-opt-2.eclass,v 1.15 2011/12/27 17:55:12 fauli 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.
24
25 inherit java-utils-2
26
27 # @ECLASS-VARIABLE: JAVA_PKG_OPT_USE
28 # @DESCRIPTION:
29 # USE flag to control if optional Java stuff is build. Defaults to 'java'.
30 JAVA_PKG_OPT_USE=${JAVA_PKG_OPT_USE:-java}
31
32 DEPEND="${JAVA_PKG_OPT_USE}? ( ${JAVA_PKG_E_DEPEND} )"
33 RDEPEND="${DEPEND}"
34
35 # See java-pkg-2.eclass for JAVA_PKG_IUSE documentation
36 IUSE="${JAVA_PKG_IUSE} ${JAVA_PKG_OPT_USE}"
37
38 case "${EAPI:-0}" in
39 0|1) EXPORT_FUNCTIONS pkg_setup pkg_preinst ;;
40 *) EXPORT_FUNCTIONS pkg_setup src_prepare pkg_preinst ;;
41 esac
42
43 # @FUNCTION: java-pkg-opt-2_pkg_setup
44 # @DESCRIPTION:
45 # default pkg_setup, wrapper for java-utils-2_pkg_init
46
47 java-pkg-opt-2_pkg_setup() {
48 use ${JAVA_PKG_OPT_USE} && java-pkg_init
49 }
50
51
52 # @FUNCTION: java-pkg-opt-2_src_prepare
53 # @DESCRIPTION:
54 # default src_prepare, wrapper for java-utils-2_src_prepare
55
56 java-pkg-opt-2_src_prepare() {
57 use ${JAVA_PKG_OPT_USE} && java-utils-2_src_prepare
58 }
59
60
61 # @FUNCTION: java-pkg-opt-2_pkg_preinst
62 # @DESCRIPTION:
63 # default pkg_preinst, wrapper for java-utils-2_pkg_preinst
64
65 java-pkg-opt-2_pkg_preinst() {
66 use ${JAVA_PKG_OPT_USE} && java-utils-2_pkg_preinst
67 }

  ViewVC Help
Powered by ViewVC 1.1.20