From b703f6f946a039a83ed7f231d2ccc503e2e7d1bb Mon Sep 17 00:00:00 2001 From: Andrew Overholt Date: Jul 05 2005 16:12:22 +0000 Subject: - Add ecj_bootstrap patch from Gary Benson to bootstrap new architectures. --- diff --git a/eclipse.spec b/eclipse.spec index 509ec58..678f4a9 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -1,5 +1,11 @@ Epoch: 1 +%ifarch %{ix86} x86_64 ppc +%define ecj_bootstrap 0 +%else +%define ecj_bootstrap 1 +%endif + %define gcj_support 1 %define tomcatsharedir %{_datadir}/tomcat5 %define tomcatlibdir %{_var}/lib/tomcat5 @@ -24,7 +30,7 @@ Epoch: 1 Summary: %{pkg_summary} Name: eclipse Version: %{eclipse_majmin}.%{eclipse_micro}_fc -Release: 3 +Release: 4 License: EPL Group: Text Editors/Integrated Development Environments (IDE) URL: http://www.eclipse.org/ @@ -103,25 +109,32 @@ ExclusiveArch: %{ix86} x86_64 ppc BuildArch: noarch %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +%if !%{ecj_bootstrap} BuildRequires: ant +%endif BuildRequires: perl BuildRequires: jpackage-utils >= 0:1.5, make, gcc BuildRequires: gnome-vfs2-devel BuildRequires: gtk2-devel BuildRequires: glib2-devel BuildRequires: gcc-c++ +%ifnarch ppc64 BuildRequires: mozilla >= 37:1.7.8 BuildRequires: mozilla-devel >= 37:1.7.8 BuildRequires: mozilla-nspr-devel >= 37:1.7.8 +%endif BuildRequires: xorg-x11-devel %if %{gcj_support} BuildRequires: gcc-java >= 4.0.0-9 +%if !%{ecj_bootstrap} BuildRequires: java-1.4.2-gcj-compat-devel >= 1.4.2.0-40jpp_24rh +%endif BuildRequires: dos2unix %else BuildRequires: java-devel >= 1.4.2 %endif +%if !%{ecj_bootstrap} BuildRequires: ant-antlr ant-apache-bcel ant-apache-log4j ant-apache-oro ant-apache-regexp ant-apache-resolver ant-commons-logging #BuildRequires: ant-apache-bsf ant-commons-net BuildRequires: ant-javamail ant-jdepend ant-jmf ant-junit ant-nodeps ant-swing ant-trax ant-jsch @@ -132,6 +145,7 @@ BuildRequires: tomcat5 tomcat5-jasper tomcat5-servlet-2.4-api BuildRequires: lucene lucene-demo BuildRequires: regexp BuildRequires: junit >= 3.8.1-3jpp +%endif %if %{gcj_support} Requires(post,postun): java-1.4.2-gcj-compat %endif @@ -157,6 +171,7 @@ Requires: java >= 1.4.2 %description ecj Eclipse compiler for Java. +%if !%{ecj_bootstrap} %package platform Summary: Eclipse platform common files Group: Text Editors/Integrated Development Environments (IDE) @@ -280,6 +295,7 @@ Requires: %{name}-jdt-devel = %{epoch}:%{version}-%{release} %description rcp-devel Source for RCP for use within Eclipse. +%endif %prep %setup -q -c @@ -503,6 +519,14 @@ ORIGCLASSPATH=$CLASSPATH export CLASSPATH=ecj-bootstrap.jar:$ORIGCLASSPATH #export GCJ_PROPERTIES="gnu.gcj.precompiled.db.path=`pwd`/ecj-bootstrap.db" %endif +%if %{ecj_bootstrap} + gcj -O1 -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \ + -o ecj-bootstrap.jar.so ecj-bootstrap.jar + gcj -g --main=org.eclipse.jdt.internal.compiler.batch.Main \ + -Wl,-R,%{_libdir}/%{name} ecj-bootstrap.jar.so -o ecj +%endif + +%if !%{ecj_bootstrap} ant -buildfile jdtcoresrc/compilejdtcorewithjavac.xml %if %{gcj_support} @@ -639,10 +663,21 @@ ant \ #find $src_root -type d -a \( -name org.eclipse.swt -prune -o -name org -print0 \) | xargs -l -0 ./copyallsrc #./copyallsrc $src_root/org.eclipse.swt/Eclipse\ SWT/gtk/org #popd +%endif %install rm -rf $RPM_BUILD_ROOT +%if %{ecj_bootstrap} +install -d -m 755 $RPM_BUILD_ROOT%{_javadir} +install -d -m 755 $RPM_BUILD_ROOT%{_libdir} +install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/%{name} +install -d -m 755 $RPM_BUILD_ROOT%{_bindir} +install -m 644 ecj-bootstrap.jar $RPM_BUILD_ROOT%{_javadir}/eclipse-ecj.jar +install -m 644 ecj-bootstrap.jar.so $RPM_BUILD_ROOT%{_libdir}/%{name}/eclipse-ecj.jar.so +install -m 644 ecj $RPM_BUILD_ROOT%{_bindir} + +%else install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name} tar -C $RPM_BUILD_ROOT%{_datadir} -zxf \ @@ -986,10 +1021,18 @@ for dir in `cat %{SOURCE10}`; do done; done %endif +%endif %clean rm -rf $RPM_BUILD_ROOT +%if %{ecj_bootstrap} +%files ecj +%{_datadir}/java/eclipse-ecj.jar +%{_libdir}/%{name}/eclipse-ecj.jar.so +%{_bindir}/ecj + +%else %if %{gcj_support} %post ecj %{_bindir}/rebuild-gcj-db %{_libdir} @@ -1227,8 +1270,12 @@ fi %{_datadir}/%{name}/plugins/org.eclipse.platform.source_3.* %{_datadir}/%{name}/features/org.eclipse.platform.source_3.* %{_datadir}/%{name}/plugins/org.eclipse.platform.source.linux.gtk.*_3.1.0 +%endif %changelog +* Tue Jul 05 2005 Andrew Overholt 3.1.0_fc-4 +- Add ecj_bootstrap patch from Gary Benson to bootstrap new architectures. + * Tue Jul 05 2005 Andrew Overholt 3.1.0_fc-3 - Bump release for FC4 update.