/[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.1 - (show annotations) (download)
Sat Jun 24 18:36:59 2006 UTC (8 years, 5 months ago) by nichoj
Branch: MAIN
Adding new Java eclasses, and updating old ones.

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_pkg_setup
51 }
52
53 pre_src_unpack() {
54 java-pkg-opt_pkg_setup
55 }
56
57 pre_src_compile() {
58 java-pkg-opt_pkg_setup
59 }
60
61 pre_src_install() {
62 java-pkg-opt_pkg_setup
63 }
64
65 pre_src_test() {
66 java-pkg-opt_pkg_setup
67 }
68
69 pre_pkg_preinst() {
70 java-pkg-opt_pkg_setup
71 }
72
73 pre_pkg_postinst() {
74 java-pkg-opt_pkg_setup
75 }

  ViewVC Help
Powered by ViewVC 1.1.20