/[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.14 - (show annotations) (download)
Mon Feb 1 09:38:44 2010 UTC (4 years, 10 months ago) by caster
Branch: MAIN
Changes since 1.13: +5 -3 lines
Add EAPI=3 support for java eclasses. Bug #303061 and patch thanks to Ulrich Müller <ulm@gentoo.org>.

1 # Eclass for optional Java packages
2 #
3 # Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org>
4 # Copyright (c) 2004-2005, 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.13 2009/02/25 17:41:16 serkan Exp $
14
15 inherit java-utils-2
16
17 # ------------------------------------------------------------------------------
18 # @eclass-begin
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'.
26 # ------------------------------------------------------------------------------
27 JAVA_PKG_OPT_USE=${JAVA_PKG_OPT_USE:-java}
28
29 # ------------------------------------------------------------------------------
30 # ------------------------------------------------------------------------------
31 DEPEND="${JAVA_PKG_OPT_USE}? ( ${JAVA_PKG_E_DEPEND} )"
32 RDEPEND="${DEPEND}"
33
34 # ------------------------------------------------------------------------------
35 # ------------------------------------------------------------------------------
36 # See java-pkg-2.eclass for JAVA_PKG_IUSE documentation
37 IUSE="${JAVA_PKG_IUSE} ${JAVA_PKG_OPT_USE}"
38
39 case "${EAPI:-0}" in
40 0|1) EXPORT_FUNCTIONS pkg_setup pkg_preinst ;;
41 *) EXPORT_FUNCTIONS pkg_setup src_prepare pkg_preinst ;;
42 esac
43
44 # ------------------------------------------------------------------------------
45 # ------------------------------------------------------------------------------
46 java-pkg-opt-2_pkg_setup() {
47 use ${JAVA_PKG_OPT_USE} && java-pkg_init
48 }
49
50 # ------------------------------------------------------------------------------
51 # @eclass-src_prepare
52 #
53 # wrapper for java-utils-2_src_prepare
54 # ------------------------------------------------------------------------------
55 java-pkg-opt-2_src_prepare() {
56 use ${JAVA_PKG_OPT_USE} && java-utils-2_src_prepare
57 }
58
59 # ------------------------------------------------------------------------------
60 # @eclass-pkg_preinst
61 #
62 # wrapper for java-utils-2_pkg_preinst
63 # ------------------------------------------------------------------------------
64 java-pkg-opt-2_pkg_preinst() {
65 use ${JAVA_PKG_OPT_USE} && java-utils-2_pkg_preinst
66 }

  ViewVC Help
Powered by ViewVC 1.1.20