diff --git a/freemarker.spec b/freemarker.spec index 1841aa6..78ee84d 100644 --- a/freemarker.spec +++ b/freemarker.spec @@ -9,7 +9,7 @@ echo "ERROR: Sources should not contain JAR files:" && echo "$F" && exit 1 Name: freemarker Version: %{fm_ver} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A template engine License: BSD URL: http://freemarker.sourceforge.net/ @@ -29,6 +29,8 @@ Patch5: no-javarebel.patch Patch6: enable-jdom.patch # use system javacc and fix Token.java Patch7: javacc.patch +# Fix compatibility with javacc 7 +Patch8: javacc-7.patch BuildArch: noarch @@ -93,6 +95,10 @@ rm -rf documentation/_html/api/ %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 + +# javacc generated sources are not Java 4 compatible, set source and target levels to Java 8 +sed -i 's/"1\.4"/"1.8"/g' source/build.xml %{__rm} -rf source/ivysettings.xml @@ -124,6 +130,9 @@ ant -Divy.mode=local javacc jar javadoc maven-pom %license LICENSE.txt NOTICE.txt %changelog +* 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 diff --git a/javacc-7.patch b/javacc-7.patch new file mode 100644 index 0000000..3d891cc --- /dev/null +++ b/javacc-7.patch @@ -0,0 +1,62 @@ +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/source/build.xml b/source/build.xml +index 6542da9..20d1d56 100644 +--- a/source/build.xml ++++ b/source/build.xml +@@ -131,13 +131,27 @@ + + + ++ ++ ++ + + + ++ ++ ++ +