Gentoo Archives: gentoo-commits

From: "Petteri Raty (betelgeuse)" <betelgeuse@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: java-ant-2.eclass java-utils-2.eclass
Date: Wed, 01 Oct 2008 15:23:23
Message-Id: E1Kl3Xp-0008J0-Qa@stork.gentoo.org
1 betelgeuse 08/10/01 15:23:17
2
3 Modified: java-ant-2.eclass java-utils-2.eclass
4 Log:
5 Move build.xml rewriting from eant to java-ant-2_src_configure and bundled jar checking to java-utils-2_src_prepare.
6
7 Revision Changes Path
8 1.40 eclass/java-ant-2.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-ant-2.eclass?rev=1.40&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-ant-2.eclass?rev=1.40&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-ant-2.eclass?r1=1.39&r2=1.40
13
14 Index: java-ant-2.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v
17 retrieving revision 1.39
18 retrieving revision 1.40
19 diff -u -r1.39 -r1.40
20 --- java-ant-2.eclass 28 Sep 2008 15:47:48 -0000 1.39
21 +++ java-ant-2.eclass 1 Oct 2008 15:23:17 -0000 1.40
22 @@ -14,7 +14,7 @@
23 #
24 # Licensed under the GNU General Public License, v2
25 #
26 -# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.39 2008/09/28 15:47:48 caster Exp $
27 +# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.40 2008/10/01 15:23:17 betelgeuse Exp $
28
29 inherit java-utils-2
30
31 @@ -128,6 +128,24 @@
32 # default: off
33 # ------------------------------------------------------------------------------
34
35 +[[ "${EAPI}" == "2" ]] && EXPORT_FUNCTIONS src_configure
36 +
37 +# ------------------------------------------------------------------------------
38 +# @eclass-src_configure
39 +#
40 +# src_configure rewrites the build.xml files
41 +# ------------------------------------------------------------------------------
42 +java-ant-2_src_configure() {
43 + # eant will call us unless called by Portage
44 + [[ -e "${T}/java-ant-2_src_configure-run" ]] && return
45 +
46 + [[ "${JAVA_ANT_IGNORE_SYSTEM_CLASSES}" ]] \
47 + && java-ant_ignore-system-classes "${S}/build.xml"
48 +
49 + java-ant_bsfix
50 + touch "${T}/java-ant-2_src_configure-run"
51 +}
52 +
53 # ------------------------------------------------------------------------------
54 # @private java-ant_bsfix
55 #
56
57
58
59 1.113 eclass/java-utils-2.eclass
60
61 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-utils-2.eclass?rev=1.113&view=markup
62 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-utils-2.eclass?rev=1.113&content-type=text/plain
63 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-utils-2.eclass?r1=1.112&r2=1.113
64
65 Index: java-utils-2.eclass
66 ===================================================================
67 RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v
68 retrieving revision 1.112
69 retrieving revision 1.113
70 diff -u -r1.112 -r1.113
71 --- java-utils-2.eclass 22 Jul 2008 21:27:23 -0000 1.112
72 +++ java-utils-2.eclass 1 Oct 2008 15:23:17 -0000 1.113
73 @@ -6,7 +6,7 @@
74 #
75 # Licensed under the GNU General Public License, v2
76 #
77 -# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.112 2008/07/22 21:27:23 betelgeuse Exp $
78 +# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.113 2008/10/01 15:23:17 betelgeuse Exp $
79
80 # -----------------------------------------------------------------------------
81 # @eclass-begin
82 @@ -1803,6 +1803,24 @@
83 # ------------------------------------------------------------------------------
84
85 # ------------------------------------------------------------------------------
86 +# @eclass-src_prepare
87 +#
88 +# src_prepare Searches for bundled jars
89 +# ------------------------------------------------------------------------------
90 +
91 +java-utils-2_src_prepare() {
92 + # Remember that eant will call this unless called via Portage
93 + if [[ ! -e "${T}/java-utils-2_src_prepare-run" ]] && is-java-strict; then
94 + echo "Searching for bundled jars:"
95 + java-pkg_find-normal-jars || echo "None found."
96 + echo "Searching for bundled classes (no output if none found):"
97 + find "${WORKDIR}" -name "*.class"
98 + echo "Search done."
99 + fi
100 + touch "${T}/java-utils-2_src_prepare-run"
101 +}
102 +
103 +# ------------------------------------------------------------------------------
104 # @section-begin build
105 # @section-summary Build functions
106 #
107 @@ -1826,27 +1844,8 @@
108 debug-print-function ${FUNCNAME} $*
109
110 if [[ ${EBUILD_PHASE} = compile ]]; then
111 - # Used to be done in hooks in java-ant-2.eclass but moved here so that we can
112 - # finally get rid of the hooks without breaking stuff
113 -
114 - [[ "${JAVA_ANT_IGNORE_SYSTEM_CLASSES}" && "${JAVA_PKG_BSFIX}" ]] \
115 - && java-ant_ignore-system-classes "${S}/build.xml"
116 -
117 - if hasq java-ant-2 ${INHERITED}; then
118 - java-ant_bsfix
119 - fi
120 -
121 - # eant can be called multiple times
122 - JAVA_PKG_BSFIX="off"
123 -
124 - if [[ -z ${JAVA_PKG_NO_BUNDLED_SEARCH} ]] && is-java-strict; then
125 - echo "Searching for bundled jars:"
126 - java-pkg_find-normal-jars || echo "None found."
127 - echo "Searching for bundled classes (no output if none found):"
128 - find "${WORKDIR}" -name "*.class"
129 - echo "Search done."
130 - JAVA_PKG_NO_BUNDLED_SEARCH=true # eant can be called many times
131 - fi
132 + java-ant-2_src_configure
133 + java-utils-2_src_prepare
134 fi
135
136 if ! hasq java-ant-2 ${INHERITED}; then
137 @@ -2732,6 +2731,8 @@
138 return $?
139 }
140
141 +[[ "${EAPI}" = "2" ]] && EXPORT_FUNCTIONS src_prepare
142 +
143 # ------------------------------------------------------------------------------
144 # @eclass-end
145 # ------------------------------------------------------------------------------