2007-12-13 04:30:31 +01:00
|
|
|
#
|
2011-09-23 10:24:35 +02:00
|
|
|
# spec file for package ecj
|
2007-12-13 04:30:31 +01:00
|
|
|
#
|
2018-05-17 22:01:48 +02:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-12-13 04:30:31 +01:00
|
|
|
#
|
2009-06-17 19:25:11 +02:00
|
|
|
# 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.
|
|
|
|
|
2018-10-29 10:03:15 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-12-13 04:30:31 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2014-09-17 13:38:53 +02:00
|
|
|
%global qualifier R-4.4-201406061215
|
2007-12-13 04:30:31 +01:00
|
|
|
Name: ecj
|
2014-09-17 13:38:53 +02:00
|
|
|
Version: 4.4.0
|
2013-01-21 14:45:09 +01:00
|
|
|
Release: 0
|
2007-12-13 04:30:31 +01:00
|
|
|
Summary: Eclipse Compiler for Java
|
2011-12-06 18:07:40 +01:00
|
|
|
License: EPL-1.0
|
2017-09-19 01:03:47 +02:00
|
|
|
Group: Development/Languages/Java
|
2014-09-17 13:38:53 +02:00
|
|
|
Url: http://www.eclipse.org
|
|
|
|
Source0: http://download.eclipse.org/eclipse/downloads/drops4/%{qualifier}/%{name}src-4.4.jar
|
2013-01-21 14:45:09 +01:00
|
|
|
Source1: ecj.sh.in
|
2014-09-18 09:44:05 +02:00
|
|
|
# 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
|
2014-09-17 13:38:53 +02:00
|
|
|
#Patched from http://central.maven.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.4/ecj-4.4.pom
|
2013-01-21 14:45:09 +01:00
|
|
|
# No dependencies are needed for ecj, dependencies are for using of jdt.core which makes no sense outside of eclipse
|
2014-09-17 13:38:53 +02:00
|
|
|
Source3: ecj-4.4.pom
|
|
|
|
Source4: ecj.1
|
2014-09-18 10:39:51 +02:00
|
|
|
# http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/plain/org.eclipse.jdt.core/scripts/binary/META-INF/MANIFEST.MF
|
|
|
|
Source5: META-INF/MANIFEST.MF
|
2013-01-21 14:45:09 +01:00
|
|
|
# Always generate debug info when building RPMs (Andrew Haley)
|
|
|
|
Patch0: %{name}-rpmdebuginfo.patch
|
|
|
|
# build.xml fails to include a necessary .props file in the built ecj.jar
|
2014-09-17 13:38:53 +02:00
|
|
|
Patch1: %{name}-include-props.patch
|
2014-09-18 09:44:05 +02:00
|
|
|
# Patches Source2 for compatibility with newer ecj
|
|
|
|
Patch2: eclipse-gcj-compat4.2.1.patch
|
|
|
|
Patch3: eclipse-gcj-nodummysymbol.patch
|
2014-09-03 16:38:35 +02:00
|
|
|
BuildRequires: ant
|
2014-09-17 13:38:53 +02:00
|
|
|
BuildRequires: gzip
|
2017-09-19 01:03:47 +02:00
|
|
|
BuildRequires: java-devel >= 1.6.0
|
2017-05-19 14:05:16 +02:00
|
|
|
BuildRequires: javapackages-local
|
|
|
|
BuildRequires: javapackages-tools
|
2014-09-03 16:38:35 +02:00
|
|
|
BuildRequires: unzip
|
2015-09-10 12:08:54 +02:00
|
|
|
Conflicts: ecj-bootstrap
|
2014-09-17 13:38:53 +02:00
|
|
|
Provides: eclipse-ecj = %{version}-%{release}
|
|
|
|
Obsoletes: eclipse-ecj < 3.4.2-4
|
2015-09-10 12:08:54 +02:00
|
|
|
BuildArch: noarch
|
2007-12-13 04:30:31 +01:00
|
|
|
|
2013-01-21 14:45:09 +01:00
|
|
|
%description
|
|
|
|
ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as
|
|
|
|
the JDT Core batch compiler.
|
2007-12-13 04:30:31 +01:00
|
|
|
|
|
|
|
%prep
|
2013-01-21 14:45:09 +01:00
|
|
|
%setup -q -c
|
|
|
|
%patch0 -p1
|
2014-09-17 13:38:53 +02:00
|
|
|
%patch1 -b .sav
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
%if 0%{?suse_version} < 1200
|
|
|
|
sed -i -e 's|source=\"1.6\"|source=\"1.5\"|g' build.xml
|
|
|
|
sed -i -e 's|target=\"1.6\"|target=\"1.5\"|g' build.xml
|
|
|
|
%endif
|
2013-01-21 14:45:09 +01:00
|
|
|
|
|
|
|
cp %{SOURCE3} pom.xml
|
2014-09-17 13:38:53 +02:00
|
|
|
mkdir -p scripts/binary/META-INF/
|
|
|
|
cp %{SOURCE5} scripts/binary/META-INF/MANIFEST.MF
|
2013-01-21 14:45:09 +01:00
|
|
|
|
2014-09-18 09:44:05 +02:00
|
|
|
# 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/
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -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
|
|
|
|
|
2013-01-21 14:45:09 +01:00
|
|
|
# JDTCompilerAdapter isn't used by the batch compiler
|
|
|
|
rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
|
2014-09-17 13:38:53 +02:00
|
|
|
cp %{SOURCE4} ecj.1
|
2007-12-13 04:30:31 +01:00
|
|
|
|
|
|
|
%build
|
2013-01-21 14:45:09 +01:00
|
|
|
ant
|
2014-09-17 13:38:53 +02:00
|
|
|
gzip ecj.1
|
2007-12-13 04:30:31 +01:00
|
|
|
|
|
|
|
%install
|
2014-09-03 16:38:35 +02:00
|
|
|
mkdir -p %{buildroot}%{_javadir}
|
2014-09-17 13:38:53 +02:00
|
|
|
install -m0644 ecj.jar %{buildroot}%{_javadir}/%{name}.jar
|
2014-09-03 16:38:35 +02:00
|
|
|
pushd %{buildroot}%{_javadir}
|
2013-01-21 14:45:09 +01:00
|
|
|
ln -s %{name}.jar eclipse-%{name}.jar
|
|
|
|
ln -s %{name}.jar jdtcore.jar
|
2007-12-13 04:30:31 +01:00
|
|
|
popd
|
|
|
|
|
2013-01-21 14:45:09 +01:00
|
|
|
# Install the ecj wrapper script
|
2014-09-03 16:38:35 +02:00
|
|
|
install -p -D -m0755 %{SOURCE1} %{buildroot}%{_bindir}/ecj
|
|
|
|
sed --in-place "s:@JAVADIR@:%{_javadir}:" %{buildroot}%{_bindir}/ecj
|
2007-12-13 04:30:31 +01:00
|
|
|
|
2014-09-17 13:38:53 +02:00
|
|
|
# Install manpage
|
|
|
|
mkdir -p %{buildroot}%{_mandir}/man1
|
|
|
|
install -m 644 -p ecj.1.gz %{buildroot}%{_mandir}/man1/ecj.1.gz
|
|
|
|
|
2013-01-21 14:45:09 +01:00
|
|
|
# poms
|
2014-09-03 16:38:35 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
2013-01-21 14:45:09 +01:00
|
|
|
install -pm 644 pom.xml \
|
2014-09-03 16:38:35 +02:00
|
|
|
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
2007-12-13 04:30:31 +01:00
|
|
|
|
2018-10-29 10:03:15 +01:00
|
|
|
%add_maven_depmap -a "org.eclipse.tycho:org.eclipse.jdt.core,org.eclipse.jdt:core,org.eclipse.jdt:org.eclipse.jdt.core,org.eclipse.jdt.core.compiler:ecj,org.eclipse.jdt:ecj" JPP-%{name}.pom %{name}.jar
|
2007-12-13 04:30:31 +01:00
|
|
|
|
2014-09-17 13:38:53 +02:00
|
|
|
%files -f .mfiles
|
2013-01-21 14:45:09 +01:00
|
|
|
%doc about.html
|
|
|
|
%{_mavenpomdir}/JPP-%{name}.pom
|
2014-09-17 13:38:53 +02:00
|
|
|
%{_bindir}/%{name}
|
2007-12-13 04:30:31 +01:00
|
|
|
%{_javadir}/%{name}.jar
|
2013-01-21 14:45:09 +01:00
|
|
|
%{_javadir}/eclipse-%{name}.jar
|
|
|
|
%{_javadir}/jdtcore.jar
|
2017-09-19 01:03:47 +02:00
|
|
|
%{_mandir}/man1/ecj.1%{ext_man}
|
2007-12-13 04:30:31 +01:00
|
|
|
|
|
|
|
%changelog
|