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

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

  ViewVC Help
Powered by ViewVC 1.1.20