diff --git a/fix-javadoc-java8.patch b/fix-javadoc-java8.patch
new file mode 100644
index 0000000..999cfe1
--- /dev/null
+++ b/fix-javadoc-java8.patch
@@ -0,0 +1,12 @@
+Index: fop-2.1/build.xml
+===================================================================
+--- fop-2.1.orig/build.xml
++++ fop-2.1/build.xml
+@@ -963,6 +963,7 @@ NOTE:
+ doctitle="Apache Formatting Objects Processor (FOP)"
+ bottom="Copyright ${year} The Apache Software Foundation. All Rights Reserved."
+ overview="${src.dir}/java/org/apache/fop/overview.html"
++ additionalparam="--allow-script-in-comments"
+ maxmemory="256M">
+
+
diff --git a/xmlgraphics-fop.changes b/xmlgraphics-fop.changes
index a96f905..5933431 100644
--- a/xmlgraphics-fop.changes
+++ b/xmlgraphics-fop.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Thu Mar 2 08:45:45 UTC 2017 - fvogt@suse.com
+
+- Add patch to fix build with stricter javadoc in version 8:
+ * fix-javadoc-java8.patch (boo#1027467)
+- Fix file list on SLE
+
-------------------------------------------------------------------
Tue Mar 8 08:52:41 UTC 2016 - fvogt@suse.com
diff --git a/xmlgraphics-fop.spec b/xmlgraphics-fop.spec
index b896c7e..35b3638 100644
--- a/xmlgraphics-fop.spec
+++ b/xmlgraphics-fop.spec
@@ -1,7 +1,7 @@
#
# spec file for package xmlgraphics-fop
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2000-2008, JPackage Project
#
# All modifications and additions to the file contributed by third parties
@@ -38,6 +38,7 @@ Source11: %{name}-fontmetrics.xml
Source12: %{name}-fontlist.xml
Patch1: xmlgraphics-fop-cli.patch
Patch2: hyphenation-more-stack.patch
+Patch3: fix-javadoc-java8.patch
BuildRequires: ant >= 1.6.5
BuildRequires: apache-commons-io >= 2.4
BuildRequires: apache-commons-logging
@@ -85,6 +86,7 @@ ln -thyph offo-hyphenation/hyph/*.xml
find -name "*.jar" | xargs -t rm
%patch1 -p1 -b .cli
%patch2 -p1
+%patch3 -p1
cp %{SOURCE2} %{SOURCE3} %{SOURCE4} .
# Replace keyword "VERSION" in XML files with the real one:
@@ -185,7 +187,11 @@ popd
%{_javadir}/%{name}.jar
%{_datadir}/%{name}
%{_mavenpomdir}/*
+%if 0%{is_opensuse}
%{_datadir}/maven-metadata/%{name}.xml*
+%else
+%{_mavendepmapfragdir}/%{name}
+%endif
%{_mandir}/man1/*
%config(noreplace) %{_sysconfdir}/fop.xconf