/[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.12
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#
13# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-opt-2.eclass,v 1.12 2009/02/19 05:22:47 serkan 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 39EXPORT_FUNCTIONS pkg_setup pkg_preinst
40[[ "${EAPI:-0}" == "2" ]] && EXPORT_FUNCTIONS src_prepare
33 41
34# ------------------------------------------------------------------------------ 42# ------------------------------------------------------------------------------
35# ------------------------------------------------------------------------------ 43# ------------------------------------------------------------------------------
36java-pkg-opt-2_pkg_setup() { 44java-pkg-opt-2_pkg_setup() {
37 use ${JAVA_PKG_OPT_USE} && java-pkg_init 45 use ${JAVA_PKG_OPT_USE} && java-pkg_init
38} 46}
39 47
40# ------------------------------------------------------------------------------ 48# ------------------------------------------------------------------------------
41# @note 49# @eclass-src_prepare
42# 50#
43# We need to initialize the environment in every function because Portage 51# 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# ------------------------------------------------------------------------------ 52# ------------------------------------------------------------------------------
48 53java-pkg-opt-2_src_prepare() {
49pre_pkg_setup() { 54 use ${JAVA_PKG_OPT_USE} && java-utils-2_src_prepare
50 java-pkg-opt-2_pkg_setup
51} 55}
52 56
53pre_src_unpack() { 57# ------------------------------------------------------------------------------
54 java-pkg-opt-2_pkg_setup 58# @eclass-pkg_preinst
59#
60# wrapper for java-utils-2_pkg_preinst
61# ------------------------------------------------------------------------------
62java-pkg-2_pkg_preinst() {
63 use ${JAVA_PKG_OPT_USE} && java-utils-2_pkg_preinst
55} 64}
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.12

  ViewVC Help
Powered by ViewVC 1.1.20