update to 4.12

This commit is contained in:
lyn1001 2022-10-27 12:50:20 +08:00
parent d24db5a0f9
commit 4d5b2aaec3
9 changed files with 115 additions and 97 deletions

View File

@ -1,10 +1,5 @@
Manifest-Version: 1.0 Manifest-Version: 1.0
Bundle-SymbolicName: org.eclipse.jdt.core.compiler.batch Bundle-SymbolicName: org.eclipse.jdt.core.compiler.batch
Archiver-Version: Plexus Archiver
Built-By: genie.releng
Bundle-ManifestVersion: 2
Bundle-Vendor: Eclipse.org
Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
Export-Package: org.eclipse.jdt.core,org.eclipse.jdt.core.compiler,org Export-Package: org.eclipse.jdt.core,org.eclipse.jdt.core.compiler,org
.eclipse.jdt.internal.antadapter;x-internal:=true,org.eclipse.jdt.int .eclipse.jdt.internal.antadapter;x-internal:=true,org.eclipse.jdt.int
ernal.compiler;x-internal:=true,org.eclipse.jdt.internal.compiler.apt ernal.compiler;x-internal:=true,org.eclipse.jdt.internal.compiler.apt
@ -23,8 +18,12 @@ Export-Package: org.eclipse.jdt.core,org.eclipse.jdt.core.compiler,org
-internal:=true,org.eclipse.jdt.internal.compiler.tool;x-internal:=tr -internal:=true,org.eclipse.jdt.internal.compiler.tool;x-internal:=tr
ue ue
Bundle-Name: Eclipse Compiler for Java(TM) Bundle-Name: Eclipse Compiler for Java(TM)
Bundle-Version: 3.13.0.v20170516-1929 Bundle-Version: 3.18.0.v20190522-0428
Bundle-ClassPath: . Bundle-ClassPath: .
Created-By: Apache Maven Built-By: genie.releng
Build-Jdk: 1.8.0_121 Bundle-ManifestVersion: 2
Bundle-Vendor: Eclipse.org
Created-By: Apache Maven 3.5.4
Build-Jdk: 1.8.0_192
Main-Class: org.eclipse.jdt.internal.compiler.batch.Main

47
ecj-3.18.0.pom Normal file
View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2016, 2018 GK Software SE and others.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Contributors:
Stephan Herrmann - initial implementation
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xsi:noNamespaceSchemaLocation="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version>3.18.0</version>
<description>Eclipse Compiler for Java(TM)</description>
<name>Eclipse Compiler for Java(TM)</name>
<url>http://www.eclipse.org/jdt</url>
<licenses>
<license>
<name>Eclipse Public License - v 2.0</name>
<url>https://www.eclipse.org/legal/epl-2.0/</url>
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>Eclipse Foundation</name>
<url>http://www.eclipse.org/</url>
</organization>
<issueManagement>
<system>Bugzilla</system>
<url>https://bugs.eclipse.org/</url>
</issueManagement>
<scm>
<connection>scm:git:git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git</connection>
<url>https://git.eclipse.org/c/jdt/eclipse.jdt.core.git</url>
</scm>
<developers>
<developer>
<url>https://projects.eclipse.org/projects/eclipse.jdt/who</url>
</developer>
</developers>
</project>

View File

@ -1,64 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<!--
Originally downloaded here:
http://download.eclipse.org/eclipse/downloads/drops4/R-4.7.1-201709061700/#JDTCORE
-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
<version>4.9</version>
<packaging>jar</packaging>
<name>Eclipse ECJ</name>
<description>Eclipse JDT Core Batch Compiler</description>
<url>http://www.eclipse.org/jdt/</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<licenses>
<license>
<name>Eclipse Public License v1.0</name>
<url>http://www.eclipse.org/org/documents/epl-v10.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/</url>
<connection>:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse</connection>
</scm>
<developers>
<!-- I didn't develop ECJ, but the Central Sync Requirements mandate a developer in the POM:
https://docs.sonatype.org/display/Repository/Central+Sync+Requirements
-->
<developer>
<name>Ralph Schaer</name>
<email>ralphschaer@gmail.com</email>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
</plugins>
</build>
</project>

39
ecj-rpmdebuginfo.patch Normal file
View File

@ -0,0 +1,39 @@
### Eclipse Workspace Patch 1.0
#P org.eclipse.jdt.core
Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v
retrieving revision 1.327
diff -u -r1.327 Main.java
--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 21 Apr 2008 15:00:59 -0000 1.327
+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 20 Nov 2008 19:26:57 -0000
@@ -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);

View File

@ -1,4 +0,0 @@
#!/bin/sh
CLASSPATH=$(build-classpath ecj):${CLASSPATH=.} \
java org.eclipse.jdt.internal.compiler.batch.Main "$@"

View File

@ -1,19 +1,21 @@
Epoch: 1 Epoch: 1
%global qualifier R-4.12-201906051800
Name: ecj Name: ecj
Version: 4.9 Version: 4.12
Release: 3 Release: 1
Summary: the Eclipse Compiler for Java Summary: the Eclipse Compiler for Java
License: EPL-2.0 License: EPL-2.0
URL: http://www.eclipse.org URL: http://www.eclipse.org
Source0: http://download.eclipse.org/eclipse/downloads/drops4/R-4.9-201809060745/ecjsrc-4.9.jar Source0: http://download.eclipse.org/eclipse/downloads/drops4/%{qualifier}/ecjsrc-%{version}.jar
Source1: ecj.sh.in Source1: https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/3.18.0/ecj-3.18.0.pom
Source3: https://repo1.maven.org/maven2/org/eclipse/jdt/core/compiler/ecj/%{version}/ecj-%{version}.pom Source2: MANIFEST.MF
Source4: MANIFEST.MF Source3: java10api.jar
Source5: java10api.jar
Patch0: javaAPI.patch Patch0: %{name}-rpmdebuginfo.patch
Patch1: javaAPI.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: ant javapackages-local BuildRequires: ant javapackages-local
@ -27,30 +29,26 @@ ECJ is the the Eclipse Compiler for Java. It is also known as the JDT Core batc
%autosetup -c -n %{name}-%{version} -p1 %autosetup -c -n %{name}-%{version} -p1
sed -i -e 's|debuglevel=\"lines,source\"|debug=\"yes\"|g' build.xml sed -i -e 's|debuglevel=\"lines,source\"|debug=\"yes\"|g' build.xml
sed -i -e "s/Xlint:none/Xlint:none -encoding cp1252/g" build.xml
rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java cp %{SOURCE1} pom.xml
cp %{SOURCE3} pom.xml
mkdir -p scripts/binary/META-INF/ mkdir -p scripts/binary/META-INF/
cp %{SOURCE4} scripts/binary/META-INF/MANIFEST.MF cp %{SOURCE2} scripts/binary/META-INF/MANIFEST.MF
%pom_remove_dep org.apache.ant:ant rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
%mvn_file :ecj ecj jdtcore %mvn_alias org.eclipse.jdt:ecj org.eclipse.jdt:core org.eclipse.jdt.core.compiler:ecj \
%mvn_alias org.eclipse.jdt.core.compiler:ecj org.eclipse.jdt:core org.eclipse.jdt:ecj \
org.eclipse.tycho:org.eclipse.jdt.core org.eclipse.tycho:org.eclipse.jdt.compiler.apt org.eclipse.tycho:org.eclipse.jdt.core org.eclipse.tycho:org.eclipse.jdt.compiler.apt
%mvn_artifact "org.eclipse:java10api:jar:10" %{SOURCE5} %mvn_artifact "org.eclipse:java10api:jar:10" %{SOURCE3}
%mvn_alias "org.eclipse:java10api:jar:10" "org.eclipse:java9api:jar:9" %mvn_alias "org.eclipse:java10api:jar:10" "org.eclipse:java9api:jar:9"
%build %build
ant -Djavaapi=%{SOURCE5} ant -Djavaapi=%{SOURCE3}
%install %install
%mvn_artifact pom.xml ecj.jar %mvn_artifact pom.xml ecj.jar
%mvn_install %mvn_install
sed -i 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/f2f42549-cfab-4d71-be48-5e9f9a41e5f5/g' $(find %{_buildrootdir} -name ecj.xml) %jpackage_script org.eclipse.jdt.internal.compiler.batch.Main '' '' ecj ecj true
install -p -D -m0755 %{SOURCE1} %{buildroot}%{_bindir}/ecj
mkdir -p %{buildroot}%{_mandir}/man1 mkdir -p %{buildroot}%{_mandir}/man1
install -m 644 -p ecj.1 %{buildroot}%{_mandir}/man1/ecj.1 install -m 644 -p ecj.1 %{buildroot}%{_mandir}/man1/ecj.1
@ -64,5 +62,8 @@ install -m 644 -p ecj.1 %{buildroot}%{_mandir}/man1/ecj.1
%{_mandir}/man1/ecj* %{_mandir}/man1/ecj*
%changelog %changelog
* Thu Oct 27 2022 liyanan <liyanan32@h-partners.com> - 1:4.12-1
- update to 4.12
* Wed Dec 4 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:4.9-3 * Wed Dec 4 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:4.9-3
- Package init - Package init

BIN
ecjsrc-4.12.jar Normal file

Binary file not shown.

Binary file not shown.

View File

@ -20,7 +20,7 @@
source="1.8" source="1.8"
target="1.8"> target="1.8">
- <compilerarg line="-Xlint:none"/> - <compilerarg line="-Xlint:none"/>
+ <compilerarg line="-Xlint:none -encoding cp1252 -encoding cp1252"/> + <compilerarg line="-Xlint:none -encoding cp1252"/>
</javac> </javac>
<delete file="${basedir}/META-INF/MANIFEST.MF" failonerror="false"/> <delete file="${basedir}/META-INF/MANIFEST.MF" failonerror="false"/>