/[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.2 Revision 1.15
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:
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 $
8 14
9inherit java-utils-2 15inherit java-utils-2
10 16
11# ------------------------------------------------------------------------------ 17# ------------------------------------------------------------------------------
12# @eclass-begin 18# @eclass-begin
25DEPEND="${JAVA_PKG_OPT_USE}? ( ${JAVA_PKG_E_DEPEND} )" 31DEPEND="${JAVA_PKG_OPT_USE}? ( ${JAVA_PKG_E_DEPEND} )"
26RDEPEND="${DEPEND}" 32RDEPEND="${DEPEND}"
27 33
28# ------------------------------------------------------------------------------ 34# ------------------------------------------------------------------------------
29# ------------------------------------------------------------------------------ 35# ------------------------------------------------------------------------------
36# See java-pkg-2.eclass for JAVA_PKG_IUSE documentation
30IUSE="${JAVA_PKG_OPT_USE}" 37IUSE="${JAVA_PKG_IUSE} ${JAVA_PKG_OPT_USE}"
31 38
32EXPORT_FUNCTIONS pkg_setup 39case "${EAPI:-0}" in
40 0|1) EXPORT_FUNCTIONS pkg_setup pkg_preinst ;;
41 *) EXPORT_FUNCTIONS pkg_setup src_prepare pkg_preinst ;;
42esac
33 43
34# ------------------------------------------------------------------------------ 44# ------------------------------------------------------------------------------
35# ------------------------------------------------------------------------------ 45# ------------------------------------------------------------------------------
36java-pkg-opt-2_pkg_setup() { 46java-pkg-opt-2_pkg_setup() {
37 use ${JAVA_PKG_OPT_USE} && java-pkg_init 47 use ${JAVA_PKG_OPT_USE} && java-pkg_init
38} 48}
39 49
40# ------------------------------------------------------------------------------ 50# ------------------------------------------------------------------------------
41# @note 51# @eclass-src_prepare
42# 52#
43# We need to initialize the environment in every function because Portage 53# wrapper for java-utils-2_src_prepare
44# will source /etc/profile between phases and trample all over the env.
45# This is accomplished by phase hooks, which is available with newer versions of
46# portage.
47# ------------------------------------------------------------------------------ 54# ------------------------------------------------------------------------------
48 55java-pkg-opt-2_src_prepare() {
49pre_pkg_setup() { 56 use ${JAVA_PKG_OPT_USE} && java-utils-2_src_prepare
50 java-pkg-opt-2_pkg_setup
51} 57}
52 58
53pre_src_unpack() { 59# ------------------------------------------------------------------------------
60# @eclass-pkg_preinst
61#
62# wrapper for java-utils-2_pkg_preinst
63# ------------------------------------------------------------------------------
54 java-pkg-opt-2_pkg_setup 64java-pkg-opt-2_pkg_preinst() {
65 use ${JAVA_PKG_OPT_USE} && java-utils-2_pkg_preinst
55} 66}
56
57pre_src_compile() {
58 java-pkg-opt-2_pkg_setup
59}
60
61pre_src_install() {
62 java-pkg-opt-2_pkg_setup
63}
64
65pre_src_test() {
66 java-pkg-opt-2_pkg_setup
67}
68
69pre_pkg_preinst() {
70 java-pkg-opt-2_pkg_setup
71}
72
73pre_pkg_postinst() {
74 java-pkg-opt-2_pkg_setup
75}

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

  ViewVC Help
Powered by ViewVC 1.1.20