/[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.2 - (hide annotations) (download)
Tue Jul 4 14:05:56 2006 UTC (8 years, 5 months ago) by nichoj
Branch: MAIN
Changes since 1.1: +7 -7 lines
Fixed hook methods to call real pkg_setup, to address bug #139112

1 nichoj 1.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    
9     inherit java-utils-2
10    
11     # ------------------------------------------------------------------------------
12     # @eclass-begin
13     # @eclass-summary Eclass for packages with optional Java support
14     # ------------------------------------------------------------------------------
15    
16     # ------------------------------------------------------------------------------
17     # @ebuild-variable JAVA_PKG_OPT_USE
18     #
19     # USE flag to control if optional Java stuff is build. Defaults to 'java'.
20     # ------------------------------------------------------------------------------
21     JAVA_PKG_OPT_USE=${JAVA_PKG_OPT_USE:-java}
22    
23     # ------------------------------------------------------------------------------
24     # ------------------------------------------------------------------------------
25     DEPEND="${JAVA_PKG_OPT_USE}? ( ${JAVA_PKG_E_DEPEND} )"
26     RDEPEND="${DEPEND}"
27    
28     # ------------------------------------------------------------------------------
29     # ------------------------------------------------------------------------------
30     IUSE="${JAVA_PKG_OPT_USE}"
31    
32     EXPORT_FUNCTIONS pkg_setup
33    
34     # ------------------------------------------------------------------------------
35     # ------------------------------------------------------------------------------
36     java-pkg-opt-2_pkg_setup() {
37     use ${JAVA_PKG_OPT_USE} && java-pkg_init
38     }
39    
40     # ------------------------------------------------------------------------------
41     # @note
42     #
43     # We need to initialize the environment in every function because Portage
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     # ------------------------------------------------------------------------------
48    
49     pre_pkg_setup() {
50 nichoj 1.2 java-pkg-opt-2_pkg_setup
51 nichoj 1.1 }
52    
53     pre_src_unpack() {
54 nichoj 1.2 java-pkg-opt-2_pkg_setup
55 nichoj 1.1 }
56    
57     pre_src_compile() {
58 nichoj 1.2 java-pkg-opt-2_pkg_setup
59 nichoj 1.1 }
60    
61     pre_src_install() {
62 nichoj 1.2 java-pkg-opt-2_pkg_setup
63 nichoj 1.1 }
64    
65     pre_src_test() {
66 nichoj 1.2 java-pkg-opt-2_pkg_setup
67 nichoj 1.1 }
68    
69     pre_pkg_preinst() {
70 nichoj 1.2 java-pkg-opt-2_pkg_setup
71 nichoj 1.1 }
72    
73     pre_pkg_postinst() {
74 nichoj 1.2 java-pkg-opt-2_pkg_setup
75 nichoj 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20