From 21b8036796e362f43105d1841464c890456b1f2a Mon Sep 17 00:00:00 2001 From: Andrew Overholt Date: Mar 03 2006 20:34:46 +0000 Subject: Only build /usr/bin/ecj natively on x86{,_64} --- diff --git a/eclipse.spec b/eclipse.spec index b66448d..7ad603a 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -43,6 +43,7 @@ Source11: %{name}-fedora-splash-3.1.2.png Source16: %{name}-copy-platform.sh Source17: %{name}-efj-wrapper.sh Source19: %{name}-filenamepatterns.txt +Source20: ecj.sh.in Source21: rebuild-sdk-features # Build libswt-mozilla and libswt-cairo and use O2 @@ -662,8 +663,10 @@ tar -C $RPM_BUILD_ROOT%{_datadir} -zxf \ result/linux-gtk-%{eclipse_arch}-sdk.tar.gz pushd $RPM_BUILD_ROOT%{_datadir}/%{name} +%if %{native_ecj} # extract jdtCompilerAdapter.jar from org.eclipse.jdt.core_3.1.2.jar unzip -d plugins plugins/org.eclipse.jdt.core_3.1.2.jar jdtCompilerAdapter.jar +%endif # Extract .so files # https://bugs.eclipse.org/bugs/show_bug.cgi?id=90535 @@ -924,14 +927,21 @@ ln -s %{_datadir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclip %if %{gcj_support} aot-compile-rpm -# Build and install ecj binary -pushd $RPM_BUILD_ROOT%{_libdir}/gcj/%{name} - gcj -g -O2 --main=org.eclipse.jdt.internal.compiler.batch.Main \ - -Wl,-R,%{_libdir}/gcj/%{name} \ - org.eclipse.jdt.core_3.1.2.jar.so jdtCompilerAdapter.jar.so -o \ - $RPM_BUILD_ROOT%{_bindir}/ecj -popd -chmod a+x $RPM_BUILD_ROOT%{_bindir}/ecj +%if %{native_ecj} + # Build and install ecj binary + pushd $RPM_BUILD_ROOT%{_libdir}/gcj/%{name} + gcj -g -O2 --main=org.eclipse.jdt.internal.compiler.batch.Main \ + -Wl,-R,%{_libdir}/gcj/%{name} \ + org.eclipse.jdt.core_3.1.2.jar.so jdtCompilerAdapter.jar.so -o \ + $RPM_BUILD_ROOT%{_bindir}/ecj + popd + chmod a+x $RPM_BUILD_ROOT%{_bindir}/ecj +%else + # Install /usr/bin/ecj script + sed 's:@JAVADIR@:%{_javadir}:g' < %{SOURCE20} > ecj + install -m755 ecj $RPM_BUILD_ROOT%{_bindir} + rm ecj +%endif %endif @@ -1059,15 +1069,19 @@ fi %dir %{_datadir}/%{name}/features %dir %{_datadir}/%{name}/configuration %{_datadir}/%{name}/plugins/org.eclipse.jdt.core_3.* +%if %{native_ecj} %{_datadir}/%{name}/plugins/jdtCompilerAdapter.jar +%endif %{_datadir}/java/eclipse-ecj.jar %if %{gcj_support} # Native bits %dir %{_libdir}/gcj/%{name} %{_libdir}/gcj/%{name}/org.eclipse.jdt.core_3.1.2.jar.so %{_libdir}/gcj/%{name}/org.eclipse.jdt.core_3.1.2.jar.db +%if %{native_ecj} %{_libdir}/gcj/%{name}/jdtCompilerAdapter.jar.so %{_libdir}/gcj/%{name}/jdtCompilerAdapter.jar.db +%endif %{_bindir}/ecj %endif