diff --git a/velocity-enum.patch b/velocity-enum.patch
new file mode 100644
index 0000000..b384e9e
--- /dev/null
+++ b/velocity-enum.patch
@@ -0,0 +1,150 @@
+diff -Naur velocity-1.4-orig/docs/api/index-all.html velocity-1.4/docs/api/index-all.html
+--- velocity-1.4-orig/docs/api/index-all.html 2009-04-24 20:09:34.000000000 +0200
++++ velocity-1.4/docs/api/index-all.html 2009-04-24 20:12:12.000000000 +0200
+@@ -1476,7 +1476,7 @@
+
Maps entries to the parent JAR File
+ Key = the entry *excluding* plain directories
+ Value = the JAR URL
+-enum -
++enumer -
+ Variable in class org.apache.velocity.util.EnumerationIterator
+ The enumeration to iterate.
+ enumerateKeys() -
+diff -Naur velocity-1.4-orig/docs/api/org/apache/velocity/util/EnumerationIterator.html velocity-1.4/docs/api/org/apache/velocity/util/EnumerationIterator.html
+--- velocity-1.4-orig/docs/api/org/apache/velocity/util/EnumerationIterator.html 2009-04-24 20:09:31.000000000 +0200
++++ velocity-1.4/docs/api/org/apache/velocity/util/EnumerationIterator.html 2009-04-24 20:11:56.000000000 +0200
+@@ -94,7 +94,7 @@
+
+
+ private java.util.Enumeration |
+-enum
++ | enumer
+
+
+ The enumeration to iterate. |
+@@ -110,7 +110,7 @@
+ Constructor Summary
+
+
+-EnumerationIterator(java.util.Enumeration enum)
++ | EnumerationIterator(java.util.Enumeration enumer)
+
+
+ Creates a new iteratorwrapper instance for the specified
+@@ -173,10 +173,10 @@
+ |
+
+
+-
+-enum
++
++enumer
+
+-private java.util.Enumeration enum
++private java.util.Enumeration enumer
+
+ - The enumeration to iterate.
+
+@@ -193,11 +193,11 @@
+
+ EnumerationIterator
+
+-public EnumerationIterator(java.util.Enumeration enum)
++public EnumerationIterator(java.util.Enumeration enumer)
+
+ - Creates a new iteratorwrapper instance for the specified
+ Enumeration.
+-- Parameters:
enum
- The Enumeration to wrap.
++ - Parameters:
enumer
- The Enumeration to wrap.
+
+
+
+diff -Naur velocity-1.4-orig/src/java/org/apache/velocity/runtime/parser/Parser.java velocity-1.4/src/java/org/apache/velocity/runtime/parser/Parser.java
+--- velocity-1.4-orig/src/java/org/apache/velocity/runtime/parser/Parser.java 2009-04-24 20:09:31.000000000 +0200
++++ velocity-1.4/src/java/org/apache/velocity/runtime/parser/Parser.java 2009-04-24 20:12:51.000000000 +0200
+@@ -3214,8 +3214,8 @@
+ jj_expentry[i] = jj_lasttokens[i];
+ }
+ boolean exists = false;
+- for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
+- int[] oldentry = (int[])(enum.nextElement());
++ for (java.util.Enumeration enumer = jj_expentries.elements(); enumer.hasMoreElements();) {
++ int[] oldentry = (int[])(enumer.nextElement());
+ if (oldentry.length == jj_expentry.length) {
+ exists = true;
+ for (int i = 0; i < jj_expentry.length; i++) {
+diff -Naur velocity-1.4-orig/src/java/org/apache/velocity/texen/Generator.java velocity-1.4/src/java/org/apache/velocity/texen/Generator.java
+--- velocity-1.4-orig/src/java/org/apache/velocity/texen/Generator.java 2009-04-24 20:09:31.000000000 +0200
++++ velocity-1.4/src/java/org/apache/velocity/texen/Generator.java 2009-04-24 20:12:36.000000000 +0200
+@@ -451,10 +451,10 @@
+ */
+ protected void fillContextHash (Context context, Hashtable objs)
+ {
+- Enumeration enum = objs.keys();
+- while (enum.hasMoreElements())
++ Enumeration enumer = objs.keys();
++ while (enumer.hasMoreElements())
+ {
+- String key = enum.nextElement().toString();
++ String key = enumer.nextElement().toString();
+ context.put (key, objs.get(key));
+ }
+ }
+@@ -479,11 +479,11 @@
+ */
+ protected void fillContextProperties (Context context)
+ {
+- Enumeration enum = props.propertyNames();
++ Enumeration enumer = props.propertyNames();
+
+- while (enum.hasMoreElements())
++ while (enumer.hasMoreElements())
+ {
+- String nm = (String)enum.nextElement();
++ String nm = (String)enumer.nextElement();
+ if (nm.startsWith ("context.objects."))
+ {
+
+diff -Naur velocity-1.4-orig/src/java/org/apache/velocity/util/EnumerationIterator.java velocity-1.4/src/java/org/apache/velocity/util/EnumerationIterator.java
+--- velocity-1.4-orig/src/java/org/apache/velocity/util/EnumerationIterator.java 2009-04-24 20:09:31.000000000 +0200
++++ velocity-1.4/src/java/org/apache/velocity/util/EnumerationIterator.java 2009-04-24 20:12:26.000000000 +0200
+@@ -30,17 +30,17 @@
+ /**
+ * The enumeration to iterate.
+ */
+- private Enumeration enum = null;
++ private Enumeration enumer = null;
+
+ /**
+ * Creates a new iteratorwrapper instance for the specified
+ * Enumeration.
+ *
+- * @param enum The Enumeration to wrap.
++ * @param enumer The Enumeration to wrap.
+ */
+- public EnumerationIterator( Enumeration enum)
++ public EnumerationIterator( Enumeration enumer)
+ {
+- this.enum = enum;
++ this.enumer = enumer;
+ }
+
+ /**
+@@ -50,7 +50,7 @@
+ */
+ public Object next()
+ {
+- return enum.nextElement();
++ return enumer.nextElement();
+ }
+
+ /**
+@@ -60,7 +60,7 @@
+ */
+ public boolean hasNext()
+ {
+- return enum.hasMoreElements();
++ return enumer.hasMoreElements();
+ }
+
+ /**
diff --git a/velocity.spec b/velocity.spec
index 44f0225..593967f 100644
--- a/velocity.spec
+++ b/velocity.spec
@@ -37,24 +37,27 @@
Name: velocity
Version: 1.4
-Release: 8.3%{?dist}
+Release: 8.4%{?dist}
Epoch: 0
Summary: Java-based template engine
License: ASL 2.0
Source: velocity-1.4-RHCLEAN.tar.bz2
-Patch0: velocity-AnakiaJDOMFactory-jdom-DefaultJDOMFactory.patch
-Patch1: velocity-AnakiaTask-jdom-XMLOutputter.patch
-Patch2: velocity-servletapi5.patch
+Patch0: velocity-AnakiaJDOMFactory-jdom-DefaultJDOMFactory.patch
+Patch1: velocity-AnakiaTask-jdom-XMLOutputter.patch
+Patch2: velocity-servletapi5.patch
#Disable failure-on-tests rather than not running tests.
-Patch3: velocity-build-testcases.patch
+Patch3: velocity-build-testcases.patch
#Patch3: velocity-notexentests.patch
+# Renames all "enum" variables to "enumer" because "enum" is a reserved word in java >= 1.5
+# Not upstreamed, package outdated.
+Patch4: velocity-enum.patch
URL: http://jakarta.apache.org/velocity/
Group: Development/Libraries/Java
Requires: jakarta-commons-collections
# Use servletapi5 instead of servletapi3
Requires: servletapi5
Requires: oro
-Requires: werken.xpath
+Requires: werken.xpath
Requires: jdom >= 0:1.0-1
Requires: bcel
Requires: log4j >= 0:1.1
@@ -151,6 +154,7 @@ find build -name '*.jar' -exec rm -f \{\} \;
#Apply patch to remove explicit dependency on servletapi3
%patch2 -p1
%patch3 -p1
+%patch4 -p1
# -----------------------------------------------------------------------------
%build
@@ -283,6 +287,9 @@ fi
#%endif
%changelog
+* Fri Apr 24 2009 Milos Jakubicek - 0:1.4-8.4
+- Fix FTBFS: added velocity-enum.patch (enum is a reserved keyword in java >= 1.5)
+
* Wed Feb 25 2009 Fedora Release Engineering - 0:1.4-8.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild