Accepting request 527074 from Java:packages
Fix build with jdk9 OBS-URL: https://build.opensuse.org/request/show/527074 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/javacc?expand=0&rev=19
This commit is contained in:
commit
df4be62f00
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 18 16:25:17 UTC 2017 - fstrba@suse.com
|
||||
|
||||
- Fix build with jdk9: specify java source and target 1.6
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 5 15:58:51 UTC 2017 - tchvatal@suse.com
|
||||
|
||||
|
13
javacc.spec
13
javacc.spec
@ -29,10 +29,10 @@ Source2: jjdoc
|
||||
Source3: jjtree
|
||||
Patch0: javacc.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: xml-commons-apis
|
||||
Requires: javapackages-tools
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
@ -79,13 +79,8 @@ cp %{SOURCE3} jjtree
|
||||
mv www/doc .
|
||||
|
||||
%build
|
||||
for file in `find -name build.xml` ; do
|
||||
if ! grep -q "javac.*source=" $file ; then
|
||||
perl -p -i -e 's|<javac |<javac source=\"1.4\" |' $file
|
||||
perl -p -i -e 's|<javadoc |<javadoc source=\"1.4" |' $file
|
||||
fi
|
||||
done
|
||||
ant \
|
||||
-Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 \
|
||||
-Dversion=%{version} \
|
||||
jar
|
||||
|
||||
@ -97,20 +92,18 @@ install -d -m 755 %{buildroot}%{_prefix}/bin
|
||||
install -m 755 javacc jjdoc jjtree %{buildroot}%{_prefix}/bin
|
||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
||||
cp -pr examples %{buildroot}%{_datadir}/%{name}
|
||||
%fdupes -s %{buildroot}%{_datadir}/%{name}
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%{_javadir}/*.jar
|
||||
%doc LICENSE README
|
||||
%defattr(0755,root,root,0755)
|
||||
%{_bindir}/*
|
||||
|
||||
%files manual
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc doc/*
|
||||
|
||||
%files demo
|
||||
%defattr(0644,root,root,0755)
|
||||
%{_datadir}/%{name}/
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user