diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae5a1c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/freemarker-*.tar.gz +/*.src.rpm diff --git a/dead.package b/dead.package deleted file mode 100644 index 5204a84..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Orphaned for 6+ weeks diff --git a/enable-jdom.patch b/enable-jdom.patch new file mode 100644 index 0000000..1120b25 --- /dev/null +++ b/enable-jdom.patch @@ -0,0 +1,81 @@ +--- src/main/java/freemarker/ext/jdom/NodeListModel.java.orig 2017-10-16 02:17:50.000000000 +0100 ++++ src/main/java/freemarker/ext/jdom/NodeListModel.java 2017-12-06 18:53:07.877967201 +0000 +@@ -661,7 +661,7 @@ + else if ("data".equals(localName)) + attr = new Attribute("data", pi.getData()); + else +- attr = new Attribute(localName, pi.getValue(localName)); ++ attr = new Attribute(localName, pi.getPseudoAttributeValue(localName)); + } else if (node instanceof DocType) { + DocType doctype = (DocType) node; + if ("publicId".equals(localName)) +@@ -762,17 +762,17 @@ + + private static final Element getParent(Object node) { + if (node instanceof Element) +- return((Element) node).getParent(); ++ return((Element) node).getParentElement(); + else if (node instanceof Attribute) + return((Attribute) node).getParent(); + else if (node instanceof Text) +- return((Text) node).getParent(); ++ return((Text) node).getParentElement(); + else if (node instanceof ProcessingInstruction) +- return((ProcessingInstruction) node).getParent(); ++ return((ProcessingInstruction) node).getParentElement(); + else if (node instanceof Comment) +- return((Comment) node).getParent(); ++ return((Comment) node).getParentElement(); + else if (node instanceof EntityRef) +- return((EntityRef) node).getParent(); ++ return((EntityRef) node).getParentElement(); + else + // With 2.1 semantics it makes more sense to just return a null and let the core + // throw an InvalidReferenceException and the template writer can use ?exists etcetera. (JR) +@@ -794,7 +794,7 @@ + LinkedList list = new LinkedList(); + do { + list.addFirst(parent); +- parent = parent.getParent(); ++ parent = parent.getParentElement(); + } while (parent != null); + return list; + } +@@ -808,7 +808,7 @@ + list.addFirst(node); + do { + list.addFirst(parent); +- parent = parent.getParent(); ++ parent = parent.getParentElement(); + } while (parent != null); + return list; + } +@@ -861,7 +861,7 @@ + Element parent = ((Attribute) node).getParent(); + doc = parent == null ? null : parent.getDocument(); + } else if (node instanceof Text) { +- Element parent = ((Text) node).getParent(); ++ Element parent = ((Text) node).getParentElement(); + doc = parent == null ? null : parent.getDocument(); + } else if (node instanceof Document) + doc = (Document) node; +--- src/main/java/freemarker/ext/xml/_JdomNavigator.java.orig 2012-03-01 01:56:25.000000000 +0100 ++++ src/main/java/freemarker/ext/xml/_JdomNavigator.java 2012-05-16 13:32:06.328559677 +0200 +@@ -122,7 +122,7 @@ + } else if ("data".equals(localName)) { + result.add(new Attribute("data", pi.getData())); + } else { +- result.add(new Attribute(localName, pi.getValue(localName))); ++ result.add(new Attribute(localName, pi.getPseudoAttributeValue(localName))); + } + } else if (node instanceof DocType) { + DocType doctype = (DocType) node; +@@ -186,7 +186,7 @@ + Element parent = ((Attribute) node).getParent(); + return parent == null ? null : parent.getDocument(); + } else if (node instanceof Text) { +- Element parent = ((Text) node).getParent(); ++ Element parent = ((Text) node).getParentElement(); + return parent == null ? null : parent.getDocument(); + } else if (node instanceof Document) + return node; diff --git a/fix-javadoc-encoding.patch b/fix-javadoc-encoding.patch new file mode 100644 index 0000000..727ad7c --- /dev/null +++ b/fix-javadoc-encoding.patch @@ -0,0 +1,11 @@ +--- src/main/java/freemarker/template/LocalizedString.java.orig 2017-10-16 02:17:50.000000000 +0100 ++++ src/main/java/freemarker/template/LocalizedString.java 2017-12-06 19:43:10.783714300 +0000 +@@ -33,7 +33,7 @@ + * if "fr".equals(lang) + * return "oui"; + * else if "de".equals(lang) +- * return "sí"; ++ * return "s\u00ED"; + * else + * return "yes"; + * } diff --git a/freemarker.spec b/freemarker.spec new file mode 100644 index 0000000..9778e65 --- /dev/null +++ b/freemarker.spec @@ -0,0 +1,267 @@ +# Conditionally build with a minimal dependency set +%bcond_with jp_minimal + +Name: freemarker +Version: 2.3.28 +Release: 4%{?dist} +Summary: The Apache FreeMarker Template Engine +License: ASL 2.0 +URL: https://freemarker.apache.org/ +Source0: https://github.com/apache/incubator-freemarker/archive/v%{version}/%{name}-%{version}.tar.gz + +# Remove JSP 2.0 API usage +Patch1: jsp-api.patch +# Compile only the classes compatible with the version of jython +Patch2: jython-compatibility.patch +# illegal character in the javadoc comment +Patch3: fix-javadoc-encoding.patch +# Disable JRebel integration, it is not free software and not in Fedora +Patch5: no-javarebel.patch +# enable jdom extension +Patch6: enable-jdom.patch +# Fix compatibility with javacc 7 +Patch7: javacc-7.patch + +BuildArch: noarch + +BuildRequires: ant +BuildRequires: apache-parent +BuildRequires: apache-commons-logging +BuildRequires: aqute-bnd +BuildRequires: hamcrest +BuildRequires: ivy-local +BuildRequires: glassfish-jsp-api +BuildRequires: glassfish-servlet-api +BuildRequires: javacc >= 7.0 +BuildRequires: jaxen >= 1.1 +BuildRequires: jcl-over-slf4j +BuildRequires: jdom >= 1.0 +BuildRequires: junit +BuildRequires: log4j-over-slf4j +BuildRequires: slf4j +BuildRequires: xalan-j2 >= 2.7.0 + +%if %{without jp_minimal} +BuildRequires: dom4j +BuildRequires: saxpath +BuildRequires: jython +BuildRequires: rhino >= 1.6 +%endif + +%description +Apache FreeMarker is a template engine: a Java library to generate text output +(HTML web pages, e-mails, configuration files, source code, etc.) based on +templates and changing data. Templates are written in the FreeMarker Template +Language (FTL), which is a simple, specialized language (not a full-blown +programming language like PHP). + +%package javadoc +Summary: Javadoc for %{name} + +%description javadoc +This package contains the API documentation for %{name}. + +%prep +%setup -q + +find -type f -name "*.jar" -delete +find -type f -name "*.class" -delete + +%patch1 +%patch2 +%patch3 +%patch5 +%patch6 +%patch7 -p1 + +# Use system ivy settings +rm ivysettings.xml + +# Correct classpath for Javadoc generation +sed -i 's/cachepath conf="IDE"/cachepath conf="javadoc"/' build.xml +sed -i '/conf name="IDE"/i' ivy.xml + +# Disable Java 8 javadoc linting +sed -i '/ - 2.3.28-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat May 11 2019 Mat Booth - 2.3.28-3 +- Allow conditionally building with a reduced dependency set + +* Thu Jan 31 2019 Fedora Release Engineering - 2.3.28-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Aug 22 2018 Mat Booth - 2.3.28-1 +- Update to latest upstream release +- Drop unnecessary dep on saxpath and avalon + +* Fri Jul 13 2018 Fedora Release Engineering - 2.3.27-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 2.3.27-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Dec 06 2017 Mat Booth - 2.3.27-1 +- Update to latest release, project moved to the Apache Foundation +- Drop unnecessary dep on findbugs +- Build against glassfish instead of jboss + +* Wed Jul 26 2017 Fedora Release Engineering - 2.3.23-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Apr 04 2017 Michael Simacek - 2.3.23-4 +- Fix compatibility with javacc 7 + +* Fri Feb 10 2017 Fedora Release Engineering - 2.3.23-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Feb 03 2016 Fedora Release Engineering - 2.3.23-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jan 06 2016 Omair Majid - 2.3.23-1 +- Update to 2.3.23 + +* Thu Jul 02 2015 gil cattaneo 2.3.19-11 +- fix FTBFS +- adapt to current guideline +- fix some rpmlint problems +- enable javadoc task +- enable maven-upload task for generate pom file +- Fix paths to jython + +* Wed Jun 17 2015 Fedora Release Engineering - 2.3.19-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Jun 09 2014 Omair Majid - 2.3.19-9 +- Use .mfiles to pick up xmvn metadata +- Don't use obsolete _mavendepmapfragdir macro +- Fix FTBFS issues + +* Sat Jun 07 2014 Fedora Release Engineering - 2.3.19-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Feb 24 2014 Omair Majid - 2.3.19-8 +- Require java-headless + +* Fri Oct 04 2013 Omair Majid - 2.3.19-7 +- Fix upstream Source URL for pom file + +* Mon Aug 05 2013 Omair Majid - 2.3.19-7 +- Fix build dependencies + +* Sat Aug 03 2013 Fedora Release Engineering - 2.3.19-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Feb 13 2013 Fedora Release Engineering - 2.3.19-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Aug 01 2012 Omair Majid - 2.3.19-4 +- Build remaining classes with target 6 too. +- Fixes RHBZ#842594 + +* Thu Jul 19 2012 Fedora Release Engineering - 2.3.19-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Jun 27 2012 Omair Majid - 2.3.19-2 +- Remove obsolete patches + +* Tue Jun 05 2012 gil cattaneo - 2.3.19-1 +- Add dependency on apache-commons-logging + +* Wed May 16 2012 gil cattaneo - 2.3.19-1 +- update to 2.3.19 + +* Wed Feb 01 2012 Marek Goldmann - 2.3.13-14 +- Added Maven POM, RHBZ#786383 + +* Fri Jan 13 2012 Fedora Release Engineering - 2.3.13-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Mar 16 2011 Omair Majid - 2.3.13-12 +- Drop build dependency on struts +- Remove buildroot cleaning and definition +- Remove versioned jars +- Remove dependency of javadoc subpackage on main package + +* Mon Feb 28 2011 Omair Majid - 2.3.13-12 +- Remove dependency on tomcat5 + +* Tue Feb 08 2011 Fedora Release Engineering - 2.3.13-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Sep 13 2010 Alexander Kurtakov 2.3.13-10 +- Adapt to tomcat6-el jar rename. + +* Mon Sep 13 2010 Alexander Kurtakov 2.3.13-9 +- Add tomcat6-libs BR. +- Use global instead of define. + +* Sat Feb 27 2010 Victor G. Vasilyev 2.3.13-8 +- fix build patch for use of the javacc 5.0 +- patch for encoding +- disable brp-java-repack-jars + +* Sat Feb 27 2010 Victor G. Vasilyev 2.3.13-7 +- patch for logging +- remove name from the summary + +* Fri Jul 24 2009 Fedora Release Engineering - 2.3.13-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 2.3.13-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Sep 01 2008 Victor G. Vasilyev 2.3.13-4 +- Redundant dependency upon xerces-j2 is removed (#456276#c6) +- The dos2unix package is added as the build requirements +- The ant-nodeps build-time requirement is added + +* Wed Aug 20 2008 Victor G. Vasilyev 2.3.13-3 +- The downloads.sourceforge.net host is used in the source URL +- %%{__install} and %%{__cp} are used everywhere +- %%defattr(-,root,root,-) is used everywhere + +* Thu Aug 14 2008 Victor G. Vasilyev 2.3.13-2 +- Appropriate values of Group Tags are chosen from the official list +- Versions of java-devel & jpackage-utils are corrected +- Name of dir for javadoc is changed +- Manual is removed due to http://freemarker.org/docs/index.html + +* Fri Jun 06 2008 Victor G. Vasilyev 2.3.13-1 +- Initial version diff --git a/javacc-7.patch b/javacc-7.patch new file mode 100644 index 0000000..1a90aa3 --- /dev/null +++ b/javacc-7.patch @@ -0,0 +1,46 @@ +From c119c7d20b46c91f2c661e4f3789194041c4ba16 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Tue, 4 Apr 2017 16:56:33 +0200 +Subject: [PATCH] Fix compatibility with javacc 7 + +--- + build.xml | 16 +++++++++++++++- + src/main/java/freemarker/core/TokenMgrError.java | 5 +++++ + 2 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/build.xml b/build.xml +index 6542da9..20d1d56 100644 +--- a/build.xml ++++ b/build.xml +@@ -160,13 +160,26 @@ + + + ++ ++ ++ + + +- ++ ++ ++ + + +- ++ + + +- +- +- +- +- + + + +- + +@@ -104,9 +101,7 @@ + + + +- +- +- ++ + + + +@@ -183,7 +178,7 @@ + + + +- ++ + + + diff --git a/jython-compatibility.patch b/jython-compatibility.patch new file mode 100644 index 0000000..bc36e05 --- /dev/null +++ b/jython-compatibility.patch @@ -0,0 +1,72 @@ +--- ivy.xml.orig 2017-12-06 19:20:16.456335648 +0000 ++++ ivy.xml 2017-12-06 19:20:59.320159647 +0000 +@@ -49,12 +49,6 @@ + description="for building FreeMarker with JSP 2.1 support" + /> + +- +- + +@@ -106,9 +100,6 @@ + + + +- +- +- + + + +--- build.xml 2017-12-06 19:19:56.790416398 +0000 ++++ build.xml.orig 2017-12-06 19:25:06.163149500 +0000 +@@ -318,41 +318,21 @@ + freemarker/ext/jsp/FreeMarkerJspFactory2.java" + /> + +- ++ + +- +- +- + +- +- +- + + + +- +- + + + diff --git a/sources b/sources new file mode 100644 index 0000000..805aabf --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (freemarker-2.3.28.tar.gz) = f629f2a8c07f4609ca70644fda59b2608661728f5e6e21b911e7db094e06e978adfb48458cea105d1add1062b97b7cf807036a1e90e375a1e9cb78eebe762ce0