/[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.4 - (hide annotations) (download)
Sat Dec 2 21:11:50 2006 UTC (8 years ago) by betelgeuse
Branch: MAIN
Changes since 1.3: +1 -0 lines
Do not rewrite build.xml files in java-ant-2.eclass if the use flag controlling this eclass is not turned on.

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 swegener 1.3 # @note
42 nichoj 1.1 #
43 swegener 1.3 # We need to initialize the environment in every function because Portage
44 nichoj 1.1 # 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 betelgeuse 1.4 use "${JAVA_PKG_OPT_USE}" || JAVA_PKG_BSFIX="off"
56 nichoj 1.1 }
57    
58     pre_src_compile() {
59 nichoj 1.2 java-pkg-opt-2_pkg_setup
60 nichoj 1.1 }
61    
62     pre_src_install() {
63 nichoj 1.2 java-pkg-opt-2_pkg_setup
64 nichoj 1.1 }
65    
66     pre_src_test() {
67 nichoj 1.2 java-pkg-opt-2_pkg_setup
68 nichoj 1.1 }
69    
70     pre_pkg_preinst() {
71 nichoj 1.2 java-pkg-opt-2_pkg_setup
72 nichoj 1.1 }
73    
74     pre_pkg_postinst() {
75 nichoj 1.2 java-pkg-opt-2_pkg_setup
76 nichoj 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20