/[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.2 - (show annotations) (download)
Wed Sep 20 22:40:41 2006 UTC (7 years, 10 months ago) by caster
Branch: MAIN
Changes since 1.1: +1 -1 lines
Fixed typo in pre_pkg_setup() function name.

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

  ViewVC Help
Powered by ViewVC 1.1.20