/[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.5 - (show annotations) (download)
Sun Dec 3 13:05:06 2006 UTC (8 years, 8 months ago) by betelgeuse
Branch: MAIN
Changes since 1.4: +1 -0 lines
Added CVS Headers after a request from grobian.

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 # $Header: $
9
10 inherit java-utils-2
11
12 # ------------------------------------------------------------------------------
13 # @eclass-begin
14 # @eclass-summary Eclass for packages with optional Java support
15 # ------------------------------------------------------------------------------
16
17 # ------------------------------------------------------------------------------
18 # @ebuild-variable JAVA_PKG_OPT_USE
19 #
20 # USE flag to control if optional Java stuff is build. Defaults to 'java'.
21 # ------------------------------------------------------------------------------
22 JAVA_PKG_OPT_USE=${JAVA_PKG_OPT_USE:-java}
23
24 # ------------------------------------------------------------------------------
25 # ------------------------------------------------------------------------------
26 DEPEND="${JAVA_PKG_OPT_USE}? ( ${JAVA_PKG_E_DEPEND} )"
27 RDEPEND="${DEPEND}"
28
29 # ------------------------------------------------------------------------------
30 # ------------------------------------------------------------------------------
31 IUSE="${JAVA_PKG_OPT_USE}"
32
33 EXPORT_FUNCTIONS pkg_setup
34
35 # ------------------------------------------------------------------------------
36 # ------------------------------------------------------------------------------
37 java-pkg-opt-2_pkg_setup() {
38 use ${JAVA_PKG_OPT_USE} && java-pkg_init
39 }
40
41 # ------------------------------------------------------------------------------
42 # @note
43 #
44 # We need to initialize the environment in every function because Portage
45 # will source /etc/profile between phases and trample all over the env.
46 # This is accomplished by phase hooks, which is available with newer versions of
47 # portage.
48 # ------------------------------------------------------------------------------
49
50 pre_pkg_setup() {
51 java-pkg-opt-2_pkg_setup
52 }
53
54 pre_src_unpack() {
55 java-pkg-opt-2_pkg_setup
56 use "${JAVA_PKG_OPT_USE}" || JAVA_PKG_BSFIX="off"
57 }
58
59 pre_src_compile() {
60 java-pkg-opt-2_pkg_setup
61 }
62
63 pre_src_install() {
64 java-pkg-opt-2_pkg_setup
65 }
66
67 pre_src_test() {
68 java-pkg-opt-2_pkg_setup
69 }
70
71 pre_pkg_preinst() {
72 java-pkg-opt-2_pkg_setup
73 }
74
75 pre_pkg_postinst() {
76 java-pkg-opt-2_pkg_setup
77 }

  ViewVC Help
Powered by ViewVC 1.1.20