/[gentoo-x86]/eclass/java-pkg-2.eclass
Gentoo

Contents of /eclass/java-pkg-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Fri Dec 8 12:12:04 2006 UTC (8 years ago) by betelgeuse
Branch: MAIN
Changes since 1.4: +2 -1 lines
Make java-pkg-2.eclass die on pkg_setup if FEATURES has test, IUSE has test and use test is true.

1 nichoj 1.1 # Eclass for 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 betelgeuse 1.5 # $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.4 2006/12/03 13:05:06 betelgeuse Exp $
9 nichoj 1.1
10     inherit java-utils-2
11    
12     # -----------------------------------------------------------------------------
13     # @eclass-begin
14     # @eclass-summary Eclass for Java Packages
15     #
16     # This eclass should be inherited for pure Java packages, or by packages which
17     # need to use Java.
18     # -----------------------------------------------------------------------------
19    
20     # ------------------------------------------------------------------------------
21     # @depend
22     #
23     # Java packages need java-config, and a fairly new release of Portage.
24     #
25     # JAVA_PKG_E_DEPEND is defined in java-utils.eclass.
26     # ------------------------------------------------------------------------------
27     DEPEND="${JAVA_PKG_E_DEPEND}"
28    
29     # ------------------------------------------------------------------------------
30     # @rdepend
31     #
32     # Nothing special for RDEPEND... just the same as DEPEND.
33     # ------------------------------------------------------------------------------
34     RDEPEND="${DEPEND}"
35    
36     EXPORT_FUNCTIONS pkg_setup
37    
38     # ------------------------------------------------------------------------------
39     # @eclass-pkg_setup
40     #
41     # pkg_setup initializes the Java environment
42     # ------------------------------------------------------------------------------
43     java-pkg-2_pkg_setup() {
44     java-pkg_init
45 betelgeuse 1.5 java-pkg_ensure-test
46 nichoj 1.1 }
47    
48     # ------------------------------------------------------------------------------
49 swegener 1.3 # @note
50 nichoj 1.1 #
51 swegener 1.3 # We need to initialize the environment in every function because Portage
52 nichoj 1.1 # will source /etc/profile between phases and trample all over the env.
53     # This is accomplished by phase hooks, which is available with newer versions of
54     # portage.
55     # ------------------------------------------------------------------------------
56    
57 caster 1.2 pre_pkg_setup() {
58 nichoj 1.1 java-pkg-2_pkg_setup
59     }
60    
61     pre_src_unpack() {
62     java-pkg-2_pkg_setup
63     }
64    
65     pre_src_compile() {
66     java-pkg-2_pkg_setup
67     }
68    
69     pre_src_install() {
70     java-pkg-2_pkg_setup
71     }
72    
73     pre_src_test() {
74     java-pkg-2_pkg_setup
75     }
76    
77     pre_pkg_preinst() {
78     java-pkg-2_pkg_setup
79     }
80    
81     pre_pkg_postinst() {
82     java-pkg-2_pkg_setup
83     }
84    
85     # ------------------------------------------------------------------------------
86     # @eclass-end
87     # ------------------------------------------------------------------------------

  ViewVC Help
Powered by ViewVC 1.1.20