diff --git a/eclipse-ecj.spec b/eclipse-ecj.spec index e2d757c..9758580 100644 --- a/eclipse-ecj.spec +++ b/eclipse-ecj.spec @@ -1,82 +1,39 @@ +%define pkgdate 202411201800 Name: eclipse-ecj -Version: 4.7.2 +Version: 4.34 Release: 1mamba Summary: Eclipse Compiler for Java Group: Development/Languages Vendor: openmamba Distribution: openmamba -Packager: Automatic Build System -URL: http://www.eclipse.org -#Source: http://mirrors.ibiblio.org/eclipse/eclipse/downloads/drops4/R-%{version}-201309111000/ecjsrc-%{version}.jar -Source: http://ftp.fau.de/eclipse/eclipse/downloads/drops4/R-%{version}-201711300510/ecjsrc-%{version}.jar -#Source: ftp://rm.mirror.garr.it/mirrors/eclipse/eclipse/downloads/drops/R-%{version}-201002111343/ecjsrc-%{version}.zip -#Source: http://download.eclipse.org/eclipse/downloads/drops/R-%{version}-200906111540/ecjsrc-%{version}.zip +Packager: Silvan Calarco +URL: https://www.eclipse.org/ +Source: https://archive.eclipse.org/eclipse/downloads/drops4/R-%{version}-%{pkgdate}/ecj-%{version}.jar Source1: java-ecj.sh.in -# cvs -d:pserver:anonymous@sourceware.org:/cvs/rhug export -r eclipse_r34_1 eclipse-gcj -# tar cjf java-ecj-gcj.tar.bz2 eclipse-gcj -Source2: java-ecj-gcj.tar.bz2 -Source3: jdtcoresrc.tar.gz -Patch0: java-ecj-3.4.2-rpmdebuginfo.patch -Patch1: java-ecj-3.4.2-defaultto1.5.patch -Patch2: java-ecj-3.4.2-generatedebuginfo.patch -License: Eclipse Public License -BuildRequires: apache-ant -BuildRequires: java-gcj-compat -BuildRequires: java-junit3 +License: EPL-2.0 +## AUTOBUILDREQ-BEGIN +## AUTOBUILDREQ-END BuildRequires: jpackage-utils -BuildRoot: %{_tmppath}/%{name}-%{version}-root %description ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as the JDT Core batch compiler. %prep -%setup -q -c -n %{name}-%{version} -%patch0 -p1 -#%patch1 -p1 -#%patch2 -p1 -tar jxf %{S:2} -tar zxf %{S:3} -# Use ECJ for GCJ's bytecode compiler - -mv eclipse-gcj/org/eclipse/jdt/internal/compiler/batch/GCCMain.java org/eclipse/jdt/internal/compiler/batch/ -cat eclipse-gcj/gcc.properties >> org/eclipse/jdt/internal/compiler/batch/messages.properties -rm -rf eclipse-gcj - -# JDTCompilerAdapter isn't used by the batch compiler -rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java - - %build -ORIGCLASSPATH=$CLASSPATH -ant -DcompilerArg="-encoding ISO-8859-1 -nowarn" -buildfile jdtcoresrc/compilejdtcorewithjavac.xml -# 2. Use this ecj to rebuild itself -export CLASSPATH=`pwd`/jdtcoresrc/ecj.jar:$ORIGCLASSPATH -ant -DcompilerArg="-encoding ISO-8859-1 -nowarn" -buildfile jdtcoresrc/compilejdtcore.xml + %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -mkdir -p %{buildroot}%{_javadir} -install -m 644 ecj.jar %{buildroot}%{_javadir}/ecj-%{version}.jar +install -D -m644 %{SOURCE0} %{buildroot}%{_javadir}/ecj-%{version}.jar -mkdir -p %{buildroot}/opt/java/ant/lib +ln -s ecj-%{version}.jar %{buildroot}%{_javadir}/eclipse-ecj-%{version}.jar +ln -s eclipse-ecj-%{version}.jar %{buildroot}%{_javadir}/eclipse-ecj.jar +ln -s ecj-%{version}.jar %{buildroot}%{_javadir}/jdtcore.jar -pushd %{buildroot}%{_javadir} -# ln -s ecj-%{version}.jar ecj.jar - ln -s ecj-%{version}.jar eclipse-ecj-%{version}.jar - ln -s eclipse-ecj-%{version}.jar eclipse-ecj.jar - ln -s ecj-%{version}.jar jdtcore.jar - ln -s ecj-%{version}.jar %{buildroot}/opt/java/ant/lib/ecj-%{version}.jar -popd - - -mkdir -p %{buildroot}%{_bindir} -install -pm 755 %{S:1} \ - %{buildroot}%{_bindir}/ecj +install -D -m755 %{SOURCE1} %{buildroot}%{_bindir}/ecj sed -i "s:@JAVADIR@:%{_javadir}:" %{buildroot}%{_bindir}/ecj -#%{_bindir}/aot-compile-rpm - %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -84,14 +41,15 @@ sed -i "s:@JAVADIR@:%{_javadir}:" %{buildroot}%{_bindir}/ecj %defattr(-,root,root) %{_bindir}/ecj %{_javadir}/ecj-%{version}.jar -#%{_javadir}/ecj.jar %{_javadir}/eclipse-ecj-%{version}.jar %{_javadir}/eclipse-ecj.jar %{_javadir}/jdtcore.jar -/opt/java/ant/lib/ecj-%{version}.jar -%doc about.html %changelog +* Thu Dec 05 2024 Silvan Calarco 4.34-1mamba +- update to 4.34 +- use prebuilt jar; specfile updates; closes #1 + * Sat Dec 23 2017 Silvan Calarco 4.7.2-1mamba - update to 4.7.2 diff --git a/java-ecj-3.4.2-defaultto1.5.patch b/java-ecj-3.4.2-defaultto1.5.patch deleted file mode 100644 index d1f3d6d..0000000 --- a/java-ecj-3.4.2-defaultto1.5.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- java-ecj-3.4.2/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 2008-04-14 15:41:34.000000000 +0200 -+++ java-ecj-3.4.2/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java-gil 2009-03-13 05:07:28.000000000 +0100 -@@ -253,9 +253,9 @@ - // By default only lines and source attributes are generated. - public int produceDebugAttributes = ClassFileConstants.ATTR_SOURCE | ClassFileConstants.ATTR_LINES; - -- public long complianceLevel = ClassFileConstants.JDK1_4; // by default be compliant with 1.4 -- public long sourceLevel = ClassFileConstants.JDK1_3; //1.3 source behavior by default -- public long targetJDK = ClassFileConstants.JDK1_2; // default generates for JVM1.2 -+ public long complianceLevel = ClassFileConstants.JDK1_5; // by default be compliant with 1.4 -+ public long sourceLevel = ClassFileConstants.JDK1_5; //1.3 source behavior by default -+ public long targetJDK = ClassFileConstants.JDK1_5; // default generates for JVM1.2 - - // source encoding format - public String defaultEncoding = null; // will use the platform default encoding diff --git a/java-ecj-3.4.2-generatedebuginfo.patch b/java-ecj-3.4.2-generatedebuginfo.patch deleted file mode 100644 index 87b62a0..0000000 --- a/java-ecj-3.4.2-generatedebuginfo.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- java-ecj-3.4.2/build.xml 2007-02-23 15:17:54.000000000 +0100 -+++ java-ecj-3.4.2/build.xml-gil 2009-03-13 05:13:49.000000000 +0100 -@@ -10,7 +10,7 @@ - - - -@@ -18,7 +18,7 @@ - - - diff --git a/java-ecj-3.4.2-rpmdebuginfo.patch b/java-ecj-3.4.2-rpmdebuginfo.patch deleted file mode 100644 index ebd0dd6..0000000 --- a/java-ecj-3.4.2-rpmdebuginfo.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- java-ecj-3.4.2/org/eclipse/jdt/internal/compiler/batch/Main.java 2008-04-21 11:01:00.000000000 +0200 -+++ java-ecj-3.4.2/org/eclipse/jdt/internal/compiler/batch/Main.java-gil 2009-03-13 05:20:09.000000000 +0100 -@@ -2609,6 +2609,29 @@ - this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED); - } - -+ { -+ // If we're building an RPM, force full debugging info to -+ // be generated, no matter what options have been passed -+ // by Ant. This is something of a kludge, but it is far -+ // better than the alternative, which is having class -+ // files with debug info mysteriously missing. -+ -+ String RpmPackageName = System.getenv("RPM_PACKAGE_NAME"); -+ String RpmArch = System.getenv("RPM_ARCH"); -+ String RpmBuildRoot = System.getenv("RPM_BUILD_ROOT"); -+ if (RpmPackageName != null && RpmArch != null && RpmBuildRoot != null) { -+ this.options.put( -+ CompilerOptions.OPTION_LocalVariableAttribute, -+ CompilerOptions.GENERATE); -+ this.options.put( -+ CompilerOptions.OPTION_LineNumberAttribute, -+ CompilerOptions.GENERATE); -+ this.options.put( -+ CompilerOptions.OPTION_SourceFileAttribute, -+ CompilerOptions.GENERATE); -+ } -+ } -+ - this.logger.logCommandLineArguments(newCommandLineArgs); - this.logger.logOptions(this.options); -