/[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 - (show annotations) (download)
Sat Dec 2 21:11:50 2006 UTC (7 years, 7 months 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 # 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 java-pkg-opt-2_pkg_setup
51 }
52
53 pre_src_unpack() {
54 java-pkg-opt-2_pkg_setup
55 use "${JAVA_PKG_OPT_USE}" || JAVA_PKG_BSFIX="off"
56 }
57
58 pre_src_compile() {
59 java-pkg-opt-2_pkg_setup
60 }
61
62 pre_src_install() {
63 java-pkg-opt-2_pkg_setup
64 }
65
66 pre_src_test() {
67 java-pkg-opt-2_pkg_setup
68 }
69
70 pre_pkg_preinst() {
71 java-pkg-opt-2_pkg_setup
72 }
73
74 pre_pkg_postinst() {
75 java-pkg-opt-2_pkg_setup
76 }

  ViewVC Help
Powered by ViewVC 1.1.20