Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/nanoxml/files/, dev-java/nanoxml/
Date: Fri, 04 Mar 2016 10:06:19
Message-Id: 1457085182.839c2e82546e66964624f6a8ffd898f89e433241.monsieurp@gentoo
1 commit: 839c2e82546e66964624f6a8ffd898f89e433241
2 Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 4 09:52:20 2016 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 4 09:53:02 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=839c2e82
7
8 dev-java/nanoxml: Housekeeping. EAPI 5 bump.
9
10 Package-Manager: portage-2.2.26
11
12 dev-java/nanoxml/Manifest | 1 +
13 dev-java/nanoxml/files/nanoxml-2.2.3-enum.patch | 208 +++++++++++++++++++++
14 .../nanoxml/files/nanoxml-2.2.3-lite-enum.patch | 53 ++++++
15 dev-java/nanoxml/nanoxml-2.2.3-r3.ebuild | 47 +++++
16 4 files changed, 309 insertions(+)
17
18 diff --git a/dev-java/nanoxml/Manifest b/dev-java/nanoxml/Manifest
19 index 60f31ee..0bff4d8 100644
20 --- a/dev-java/nanoxml/Manifest
21 +++ b/dev-java/nanoxml/Manifest
22 @@ -1 +1,2 @@
23 DIST NanoXML-2.2.3.tar.gz 426111 SHA256 df3bd3663b766851caffba963853383cff813695dca3e827ce6e00a920d544fa SHA512 6800b86039cb555efc05644db65c516fb242d4d081ea612969d6cc52a12ffd7571e012a7afe7962cd61c28b0ebb3b9d94af76f20013f3b4dd7d2aacdc552c6fc WHIRLPOOL 3164e5c09b2e42058da1c2c3df55512dfc75245dca7857fb46085f1a6b0a8a4360397026825a6e0f3ce66fab9c55774ad65ee9d6daf072ee9f0bae42d6509882
24 +DIST nanoxml-2.2.3.tar.gz 426111 SHA256 df3bd3663b766851caffba963853383cff813695dca3e827ce6e00a920d544fa SHA512 6800b86039cb555efc05644db65c516fb242d4d081ea612969d6cc52a12ffd7571e012a7afe7962cd61c28b0ebb3b9d94af76f20013f3b4dd7d2aacdc552c6fc WHIRLPOOL 3164e5c09b2e42058da1c2c3df55512dfc75245dca7857fb46085f1a6b0a8a4360397026825a6e0f3ce66fab9c55774ad65ee9d6daf072ee9f0bae42d6509882
25
26 diff --git a/dev-java/nanoxml/files/nanoxml-2.2.3-enum.patch b/dev-java/nanoxml/files/nanoxml-2.2.3-enum.patch
27 new file mode 100644
28 index 0000000..61226b4
29 --- /dev/null
30 +++ b/dev-java/nanoxml/files/nanoxml-2.2.3-enum.patch
31 @@ -0,0 +1,208 @@
32 +--- Sources/Java/net/n3/nanoxml/XMLElement.java.orig 2016-03-04 09:21:07.908000000 +0000
33 ++++ Sources/Java/net/n3/nanoxml/XMLElement.java 2016-03-04 09:35:16.283000000 +0000
34 +@@ -484,9 +484,9 @@
35 + * @return the child element, or null if no such child was found.
36 + */
37 + public IXMLElement getFirstChildNamed(String name) {
38 +- Enumeration enum = this.children.elements();
39 +- while (enum.hasMoreElements()) {
40 +- IXMLElement child = (IXMLElement) enum.nextElement();
41 ++ Enumeration myEnum = this.children.elements();
42 ++ while (myEnum.hasMoreElements()) {
43 ++ IXMLElement child = (IXMLElement) myEnum.nextElement();
44 + String childName = child.getFullName();
45 + if ((childName != null) && childName.equals(name)) {
46 + return child;
47 +@@ -506,9 +506,9 @@
48 + */
49 + public IXMLElement getFirstChildNamed(String name,
50 + String namespace) {
51 +- Enumeration enum = this.children.elements();
52 +- while (enum.hasMoreElements()) {
53 +- IXMLElement child = (IXMLElement) enum.nextElement();
54 ++ Enumeration myEnum = this.children.elements();
55 ++ while (myEnum.hasMoreElements()) {
56 ++ IXMLElement child = (IXMLElement) myEnum.nextElement();
57 + String str = child.getName();
58 + boolean found = (str != null) && (str.equals(name));
59 + str = child.getNamespace();
60 +@@ -534,9 +534,9 @@
61 + */
62 + public Vector getChildrenNamed(String name) {
63 + Vector result = new Vector(this.children.size());
64 +- Enumeration enum = this.children.elements();
65 +- while (enum.hasMoreElements()) {
66 +- IXMLElement child = (IXMLElement) enum.nextElement();
67 ++ Enumeration myEnum = this.children.elements();
68 ++ while (myEnum.hasMoreElements()) {
69 ++ IXMLElement child = (IXMLElement) myEnum.nextElement();
70 + String childName = child.getFullName();
71 + if ((childName != null) && childName.equals(name)) {
72 + result.addElement(child);
73 +@@ -557,9 +557,9 @@
74 + public Vector getChildrenNamed(String name,
75 + String namespace) {
76 + Vector result = new Vector(this.children.size());
77 +- Enumeration enum = this.children.elements();
78 +- while (enum.hasMoreElements()) {
79 +- IXMLElement child = (IXMLElement) enum.nextElement();
80 ++ Enumeration myEnum = this.children.elements();
81 ++ while (myEnum.hasMoreElements()) {
82 ++ IXMLElement child = (IXMLElement) myEnum.nextElement();
83 + String str = child.getName();
84 + boolean found = (str != null) && (str.equals(name));
85 + str = child.getNamespace();
86 +@@ -585,9 +585,9 @@
87 + * @return the attribute, or null if the attribute does not exist.
88 + */
89 + private XMLAttribute findAttribute(String fullName) {
90 +- Enumeration enum = this.attributes.elements();
91 +- while (enum.hasMoreElements()) {
92 +- XMLAttribute attr = (XMLAttribute) enum.nextElement();
93 ++ Enumeration myEnum = this.attributes.elements();
94 ++ while (myEnum.hasMoreElements()) {
95 ++ XMLAttribute attr = (XMLAttribute) myEnum.nextElement();
96 + if (attr.getFullName().equals(fullName)) {
97 + return attr;
98 + }
99 +@@ -606,9 +606,9 @@
100 + */
101 + private XMLAttribute findAttribute(String name,
102 + String namespace) {
103 +- Enumeration enum = this.attributes.elements();
104 +- while (enum.hasMoreElements()) {
105 +- XMLAttribute attr = (XMLAttribute) enum.nextElement();
106 ++ Enumeration myEnum = this.attributes.elements();
107 ++ while (myEnum.hasMoreElements()) {
108 ++ XMLAttribute attr = (XMLAttribute) myEnum.nextElement();
109 + boolean found = attr.getName().equals(name);
110 + if (namespace == null) {
111 + found &= (attr.getNamespace() == null);
112 +@@ -860,9 +860,9 @@
113 + */
114 + public Enumeration enumerateAttributeNames() {
115 + Vector result = new Vector();
116 +- Enumeration enum = this.attributes.elements();
117 +- while (enum.hasMoreElements()) {
118 +- XMLAttribute attr = (XMLAttribute) enum.nextElement();
119 ++ Enumeration myEnum = this.attributes.elements();
120 ++ while (myEnum.hasMoreElements()) {
121 ++ XMLAttribute attr = (XMLAttribute) myEnum.nextElement();
122 + result.addElement(attr.getFullName());
123 + }
124 + return result.elements();
125 +@@ -897,9 +897,9 @@
126 + */
127 + public Properties getAttributes() {
128 + Properties result = new Properties();
129 +- Enumeration enum = this.attributes.elements();
130 +- while (enum.hasMoreElements()) {
131 +- XMLAttribute attr = (XMLAttribute) enum.nextElement();
132 ++ Enumeration myEnum = this.attributes.elements();
133 ++ while (myEnum.hasMoreElements()) {
134 ++ XMLAttribute attr = (XMLAttribute) myEnum.nextElement();
135 + result.put(attr.getFullName(), attr.getValue());
136 + }
137 + return result;
138 +@@ -915,9 +915,9 @@
139 + */
140 + public Properties getAttributesInNamespace(String namespace) {
141 + Properties result = new Properties();
142 +- Enumeration enum = this.attributes.elements();
143 +- while (enum.hasMoreElements()) {
144 +- XMLAttribute attr = (XMLAttribute) enum.nextElement();
145 ++ Enumeration myEnum = this.attributes.elements();
146 ++ while (myEnum.hasMoreElements()) {
147 ++ XMLAttribute attr = (XMLAttribute) myEnum.nextElement();
148 + if (namespace == null) {
149 + if (attr.getNamespace() == null) {
150 + result.put(attr.getName(), attr.getValue());
151 +@@ -1007,9 +1007,9 @@
152 + if (this.attributes.size() != elt.getAttributeCount()) {
153 + return false;
154 + }
155 +- Enumeration enum = this.attributes.elements();
156 +- while (enum.hasMoreElements()) {
157 +- XMLAttribute attr = (XMLAttribute) enum.nextElement();
158 ++ Enumeration myEnum = this.attributes.elements();
159 ++ while (myEnum.hasMoreElements()) {
160 ++ XMLAttribute attr = (XMLAttribute) myEnum.nextElement();
161 + if (! elt.hasAttribute(attr.getName(), attr.getNamespace())) {
162 + return false;
163 + }
164 +--- Sources/Java/net/n3/nanoxml/NonValidator.java.orig 2016-03-04 09:36:05.247000000 +0000
165 ++++ Sources/Java/net/n3/nanoxml/NonValidator.java 2016-03-04 09:36:25.195000000 +0000
166 +@@ -587,10 +587,10 @@
167 + int lineNr)
168 + {
169 + Properties props = (Properties) this.currentElements.pop();
170 +- Enumeration enum = props.keys();
171 ++ Enumeration myEnum = props.keys();
172 +
173 +- while (enum.hasMoreElements()) {
174 +- String key = (String) enum.nextElement();
175 ++ while (myEnum.hasMoreElements()) {
176 ++ String key = (String) myEnum.nextElement();
177 + extraAttributes.put(key, props.get(key));
178 + }
179 + }
180 +--- Sources/Java/net/n3/nanoxml/XMLWriter.java.orig 2016-03-04 09:36:53.616000000 +0000
181 ++++ Sources/Java/net/n3/nanoxml/XMLWriter.java 2016-03-04 09:38:11.868000000 +0000
182 +@@ -182,10 +182,10 @@
183 + }
184 + }
185 +
186 +- Enumeration enum = xml.enumerateAttributeNames();
187 ++ Enumeration myEnum = xml.enumerateAttributeNames();
188 +
189 +- while (enum.hasMoreElements()) {
190 +- String key = (String) enum.nextElement();
191 ++ while (myEnum.hasMoreElements()) {
192 ++ String key = (String) myEnum.nextElement();
193 + int index = key.indexOf(':');
194 +
195 + if (index >= 0) {
196 +@@ -203,10 +203,10 @@
197 + }
198 + }
199 +
200 +- enum = xml.enumerateAttributeNames();
201 ++ myEnum = xml.enumerateAttributeNames();
202 +
203 +- while (enum.hasMoreElements()) {
204 +- String key = (String) enum.nextElement();
205 ++ while (myEnum.hasMoreElements()) {
206 ++ String key = (String) myEnum.nextElement();
207 + String value = xml.getAttribute(key, null);
208 + this.writer.print(" " + key + "=\"");
209 + this.writeEncoded(value);
210 +@@ -229,10 +229,10 @@
211 + writer.println();
212 + }
213 +
214 +- enum = xml.enumerateChildren();
215 ++ myEnum = xml.enumerateChildren();
216 +
217 +- while (enum.hasMoreElements()) {
218 +- IXMLElement child = (IXMLElement) enum.nextElement();
219 ++ while (myEnum.hasMoreElements()) {
220 ++ IXMLElement child = (IXMLElement) myEnum.nextElement();
221 + this.write(child, prettyPrint, indent + 4,
222 + collapseEmptyElements);
223 + }
224 +--- Sources/Java/net/n3/nanoxml/StdXMLParser.java.orig 2016-03-04 09:38:44.521000000 +0000
225 ++++ Sources/Java/net/n3/nanoxml/StdXMLParser.java 2016-03-04 09:39:08.028000000 +0000
226 +@@ -492,10 +492,10 @@
227 + extraAttributes,
228 + this.reader.getSystemID(),
229 + this.reader.getLineNr());
230 +- Enumeration enum = extraAttributes.keys();
231 ++ Enumeration myEnum = extraAttributes.keys();
232 +
233 +- while (enum.hasMoreElements()) {
234 +- String key = (String) enum.nextElement();
235 ++ while (myEnum.hasMoreElements()) {
236 ++ String key = (String) myEnum.nextElement();
237 + String value = extraAttributes.getProperty(key);
238 + attrNames.addElement(key);
239 + attrValues.addElement(value);
240
241 diff --git a/dev-java/nanoxml/files/nanoxml-2.2.3-lite-enum.patch b/dev-java/nanoxml/files/nanoxml-2.2.3-lite-enum.patch
242 new file mode 100644
243 index 0000000..f91d14c
244 --- /dev/null
245 +++ b/dev-java/nanoxml/files/nanoxml-2.2.3-lite-enum.patch
246 @@ -0,0 +1,53 @@
247 +--- Sources/Lite/nanoxml/XMLElement.java.orig 2016-03-04 09:16:52.339000000 +0000
248 ++++ Sources/Lite/nanoxml/XMLElement.java 2016-03-04 09:19:03.213000000 +0000
249 +@@ -63,8 +63,8 @@
250 + * The following example shows how to list the attributes of an element:
251 + * <UL><CODE>
252 + * XMLElement element = ...;<BR>
253 +- * Enumeration enum = element.getAttributeNames();<BR>
254 +- * while (enum.hasMoreElements()) {<BR>
255 ++ * Enumeration myEnum = element.getAttributeNames();<BR>
256 ++ * while (myEnum.hasMoreElements()) {<BR>
257 + * &nbsp;&nbsp;&nbsp;&nbsp;String key = (String) enum.nextElement();<BR>
258 + * &nbsp;&nbsp;&nbsp;&nbsp;String value = element.getStringAttribute(key);<BR>
259 + * &nbsp;&nbsp;&nbsp;&nbsp;System.out.println(key + " = " + value);<BR>
260 +@@ -478,9 +478,9 @@
261 + this.children = new Vector();
262 + this.entities = entities;
263 + this.lineNr = 0;
264 +- Enumeration enum = this.entities.keys();
265 +- while (enum.hasMoreElements()) {
266 +- Object key = enum.nextElement();
267 ++ Enumeration myEnum = this.entities.keys();
268 ++ while (myEnum.hasMoreElements()) {
269 ++ Object key = myEnum.nextElement();
270 + Object value = this.entities.get(key);
271 + if (value instanceof String) {
272 + value = ((String) value).toCharArray();
273 +@@ -2168,10 +2168,10 @@
274 + writer.write('<');
275 + writer.write(this.name);
276 + if (! this.attributes.isEmpty()) {
277 +- Enumeration enum = this.attributes.keys();
278 +- while (enum.hasMoreElements()) {
279 ++ Enumeration myEnum = this.attributes.keys();
280 ++ while (myEnum.hasMoreElements()) {
281 + writer.write(' ');
282 +- String key = (String) enum.nextElement();
283 ++ String key = (String) myEnum.nextElement();
284 + String value = (String) this.attributes.get(key);
285 + writer.write(key);
286 + writer.write('='); writer.write('"');
287 +@@ -2189,9 +2189,9 @@
288 + writer.write('/'); writer.write('>');
289 + } else {
290 + writer.write('>');
291 +- Enumeration enum = this.enumerateChildren();
292 +- while (enum.hasMoreElements()) {
293 +- XMLElement child = (XMLElement) enum.nextElement();
294 ++ Enumeration myEnum = this.enumerateChildren();
295 ++ while (myEnum.hasMoreElements()) {
296 ++ XMLElement child = (XMLElement) myEnum.nextElement();
297 + child.write(writer);
298 + }
299 + writer.write('<'); writer.write('/');
300
301 diff --git a/dev-java/nanoxml/nanoxml-2.2.3-r3.ebuild b/dev-java/nanoxml/nanoxml-2.2.3-r3.ebuild
302 new file mode 100644
303 index 0000000..1113986
304 --- /dev/null
305 +++ b/dev-java/nanoxml/nanoxml-2.2.3-r3.ebuild
306 @@ -0,0 +1,47 @@
307 +# Copyright 1999-2016 Gentoo Foundation
308 +# Distributed under the terms of the GNU General Public License v2
309 +# $Id$
310 +
311 +EAPI=5
312 +
313 +JAVA_PKG_IUSE="doc source"
314 +
315 +MY_P="NanoXML-${PV}"
316 +
317 +inherit java-pkg-2 java-pkg-simple
318 +
319 +DESCRIPTION="NanoXML is a small non-validating parser for Java"
320 +HOMEPAGE="http://nanoxml.sourceforge.net/"
321 +SRC_URI="http://pkgs.fedoraproject.org/repo/pkgs/nanoxml/${MY_P}.tar.gz/357c7136417ea996cf714278ea84f2df/${MY_P}.tar.gz -> ${P}.tar.gz"
322 +
323 +LICENSE="ZLIB"
324 +SLOT="0"
325 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
326 +IUSE=""
327 +
328 +CDEPEND="dev-java/sax:0"
329 +
330 +DEPEND="
331 + ${CDEPEND}
332 + >=virtual/jdk-1.6"
333 +
334 +RDEPEND="
335 + ${CDEPEND}
336 + >=virtual/jre-1.6"
337 +
338 +S="${WORKDIR}/${MY_P}"
339 +
340 +JAVA_GENTOO_CLASSPATH="sax"
341 +
342 +JAVA_SRC_DIR="Sources"
343 +
344 +PATCHES=(
345 + "${FILESDIR}"/"${P}-lite-enum.patch"
346 + "${FILESDIR}"/"${P}-enum.patch"
347 +)
348 +
349 +java_prepare() {
350 + java-pkg_clean
351 + rm -rf Test || die
352 + epatch "${PATCHES[@]}"
353 +}