diff --git a/antlr-bootstrap.changes b/antlr-bootstrap.changes index 90a732e..4d49177 100644 --- a/antlr-bootstrap.changes +++ b/antlr-bootstrap.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Sep 20 17:39:46 UTC 2017 - fstrba@suse.com + +- Remove requirements of ecj-bootstrap and fastjar + * use the gcj.jar that comes with gccN-java + * use gjar-N instead of fastjar + ------------------------------------------------------------------- Fri Jul 4 11:17:30 UTC 2014 - tchvatal@suse.com diff --git a/antlr-bootstrap.spec b/antlr-bootstrap.spec index bb3728a..3e97895 100644 --- a/antlr-bootstrap.spec +++ b/antlr-bootstrap.spec @@ -16,23 +16,21 @@ # +%define gccbinsuffix %(rpm -q --qf "-%{VERSION}" gcc-java) %define real_name antlr Name: antlr-bootstrap Version: 2.7.7 Release: 0 Summary: Antlr for bootstrapping purposes -License: BSD-3-Clause and SUSE-Public-Domain +License: BSD-3-Clause AND SUSE-Public-Domain Group: Development/Libraries/Java Url: http://www.antlr.org Source0: antlr-%{version}.tar.bz2 Source1: manifest.antlr -BuildRequires: ecj-bootstrap >= 0.570 -BuildRequires: fastjar BuildRequires: gcc-gij BuildRequires: gcc-java BuildRequires: unzip BuildRequires: zip -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %description @@ -58,7 +56,7 @@ function delBinaryFiles() { done set -x } -#>>> make a string with all jar files found in target folder that can be used for a classpath string +#>>> make %{?_smp_mflags} a string with all jar files found in target folder that can be used for a classpath string # string is saved in JAR_CLASSPATH function mkTargetClasspath() { set +x @@ -91,15 +89,16 @@ function compileFiles() { done set -x } -#>>> make jar archive +#>>> make %{?_smp_mflags} jar archive # PARAM#1: name of jar archive (without .jar suffix) # uses $TARGET_DIR to move created jar to function mkJar() { find -name "version.txt" -or -name "*.class" -or -name "*.properties" -or -name "*.rsc" -or -name "*manifest*" |\ - xargs %{_bindir}/fastjar -m manifest.* -cf ${1}.jar ; + xargs gjar%{gccbinsuffix} -m manifest.* -cf ${1}.jar ; mv ${1}.jar $TARGET_DIR } -COMPILER_COMMAND="gij -jar %{_javadir}/jdtcore.jar -cp " +ECJJAR=`gcj%{gccbinsuffix} -print-file-name=ecj.jar` +COMPILER_COMMAND="gij%{gccbinsuffix} -cp $ECJJAR org.eclipse.jdt.internal.compiler.batch.Main -cp " delBinaryFiles mkdir src mv antlr src @@ -115,7 +114,6 @@ install -m 0644 %{name}.jar %{buildroot}%{_javadir}/ ln -s -f %{_javadir}/%{name}.jar %{buildroot}/%{_javadir}/%{name}-%{version}.jar %files -%defattr(-,root,root) %{_javadir}/%{name}*.jar %changelog diff --git a/antlr.spec b/antlr.spec index d24c1f2..b0105c6 100644 --- a/antlr.spec +++ b/antlr.spec @@ -20,7 +20,7 @@ Name: antlr Version: 2.7.7 Release: 0 Summary: Another Tool for Language Recognition -License: GPL-2.0+ and SUSE-Public-Domain and MIT +License: GPL-2.0+ AND SUSE-Public-Domain AND MIT Group: Development/Tools/Other Url: http://www.antlr.org/ Source0: antlr-%{version}.tar.bz2 @@ -41,7 +41,6 @@ Requires: %{name}-java Provides: %{name}-bootstrap = %{version} Obsoletes: %{name}-bootstrap < %{version} Obsoletes: %{name}-javadoc -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description ANTLR, Another Tool for Language Recognition, (formerly PCCTS) is a @@ -107,6 +106,7 @@ Haefelinger and Marq Kole. %setup -q # remove all binary libs find . -name "*.jar" -exec rm -f {} \; +find . -name Makefile.in | xargs chmod 0644 %patch0 cp -p %{SOURCE1} build.xml #Fix the source so that it compiles with GCC 4.5 @@ -154,32 +154,28 @@ install -m 0644 lib/cpp/%{name}/*hpp %{buildroot}%{_includedir}/%{name} ### find duplicates ### find examples -type f | xargs chmod 0644 %fdupes -s examples +find doc -type f | xargs chmod 0644 +%fdupes -s doc %files -%defattr(0644,root,root,0755) %doc LICENSE.txt README.txt CHANGES.txt %dir %{_datadir}/%{name}-%{version} -%defattr(0755,root,root,0755) %{_bindir}/antlr %{_bindir}/antlr-config %files java -%defattr(0644,root,root,0755) %dir %{_datadir}/%{name}-%{version} %{_datadir}/%{name}-%{version}/*jar %{_javadir}/%{name}*.jar %files manual -%defattr(0644,root,root,0755) %doc doc examples %files devel -%defattr(0644,root,root,0755) %attr(755,root,root) %{_libdir}/libantlr.a %{_includedir}/%{name} %files -n python-%{name} -%defattr(-,root,root) %dir %{_datadir}/%{name}-%{version} %{_datadir}/%{name}-%{version}/*py %{_datadir}/%{name}-%{version}/*pyc