3d8be3debc
- BuildIgnore java-devel pkgs to avoid conflicts OBS-URL: https://build.opensuse.org/package/show/Java:packages/ecj?expand=0&rev=17
124 lines
3.9 KiB
RPMSpec
124 lines
3.9 KiB
RPMSpec
#
|
|
# spec file for package ecj
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: ecj
|
|
Version: 4.2.1
|
|
Release: 0
|
|
Summary: Eclipse Compiler for Java
|
|
License: EPL-1.0
|
|
Group: Development/Languages/Java
|
|
Url: http://eclipse.org
|
|
Source0: %{name}src-%{version}.jar
|
|
Source1: ecj.sh.in
|
|
# Use ECJ for GCJ
|
|
# cvs -d:pserver:anonymous@sourceware.org:/cvs/rhug \
|
|
# export -D 2009-09-28 eclipse-gcj
|
|
# tar cjf ecj-gcj.tar.bz2 eclipse-gcj
|
|
Source2: %{name}-gcj.tar.bz2
|
|
#Patched from http://repo2.maven.org/maven2/org/eclipse/jdt/core/3.3.0-v_771/core-3.3.0-v_771.pom
|
|
# No dependencies are needed for ecj, dependencies are for using of jdt.core which makes no sense outside of eclipse
|
|
Source3: core-3.3.0-v_771.pom
|
|
# Always generate debug info when building RPMs (Andrew Haley)
|
|
Patch0: %{name}-rpmdebuginfo.patch
|
|
Patch1: %{name}-defaultto1.5.patch
|
|
Patch2: %{name}-generatedebuginfo.patch
|
|
# Patches Source2 for compatibility with newer ecj
|
|
Patch3: eclipse-gcj-compat4.2.1.patch
|
|
# build.xml fails to include a necessary .props file in the built ecj.jar
|
|
Patch4: %{name}-include-props.patch
|
|
Patch5: eclipse-gcj-nodummysymbol.patch
|
|
BuildRequires: ant
|
|
BuildRequires: javapackages-tools
|
|
BuildRequires: sed
|
|
BuildRequires: unzip
|
|
Requires: java >= 1.6.0
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildArch: noarch
|
|
Conflicts: ecj-bootstrap
|
|
%if 0%{?suse_version} < 1320
|
|
BuildRequires: java-devel >= 1.6.0
|
|
%else
|
|
#!BuildIgnore: java-1_6_0-openjdk java-1_6_0-openjdk-devel
|
|
#!BuildIgnore: java-1_7_0-openjdk java-1_7_0-openjdk-devel
|
|
BuildRequires: java-1_7_0-openjdk-bootstrap-devel
|
|
%endif
|
|
|
|
%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
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch4 -p1
|
|
|
|
cp %{SOURCE3} pom.xml
|
|
# Use ECJ for GCJ's bytecode compiler
|
|
tar jxf %{SOURCE2}
|
|
mv eclipse-gcj/org/eclipse/jdt/internal/compiler/batch/GCCMain.java \
|
|
org/eclipse/jdt/internal/compiler/batch/
|
|
%patch3 -p1
|
|
%patch5 -p1
|
|
cat eclipse-gcj/gcc.properties >> \
|
|
org/eclipse/jdt/internal/compiler/batch/messages.properties
|
|
rm -rf eclipse-gcj
|
|
|
|
# Remove bits of JDT Core we don't want to build
|
|
rm -r org/eclipse/jdt/internal/compiler/tool
|
|
rm -r org/eclipse/jdt/internal/compiler/apt
|
|
rm -f org/eclipse/jdt/core/BuildJarIndex.java
|
|
|
|
# JDTCompilerAdapter isn't used by the batch compiler
|
|
rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
|
|
|
|
%build
|
|
ant
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{_javadir}
|
|
cp -a *.jar %{buildroot}%{_javadir}/%{name}.jar
|
|
pushd %{buildroot}%{_javadir}
|
|
ln -s %{name}.jar eclipse-%{name}.jar
|
|
ln -s %{name}.jar jdtcore.jar
|
|
popd
|
|
|
|
# Install the ecj wrapper script
|
|
install -p -D -m0755 %{SOURCE1} %{buildroot}%{_bindir}/ecj
|
|
sed --in-place "s:@JAVADIR@:%{_javadir}:" %{buildroot}%{_bindir}/ecj
|
|
|
|
# poms
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
|
install -pm 644 pom.xml \
|
|
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
|
|
|
%add_maven_depmap -a "org.eclipse.tycho:org.eclipse.jdt.core" JPP-%{name}.pom %{name}.jar
|
|
|
|
%files
|
|
%defattr(0644,root,root,0755)
|
|
%doc about.html
|
|
%{_mavenpomdir}/JPP-%{name}.pom
|
|
%{_mavendepmapfragdir}/%{name}
|
|
%attr(0755,root,root) %{_bindir}/%{name}
|
|
%{_javadir}/%{name}.jar
|
|
%{_javadir}/eclipse-%{name}.jar
|
|
%{_javadir}/jdtcore.jar
|
|
|
|
%changelog
|