diff --git a/eclipse.spec b/eclipse.spec index 4ece575..48fd81b 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -25,7 +25,7 @@ ExclusiveArch: i386 x86_64 Summary: %{pkg_summary} Name: eclipse Version: %{eclipse_majmin}.%{eclipse_micro}_fc -Release: 0.M5.5 +Release: 0.M5.6 License: CPL Group: Text Editors/Integrated Development Environments (IDE) URL: http://www.eclipse.org/ @@ -231,10 +231,6 @@ ln -sf %{_javadir}/ant/ant-jmf.jar plugins/org.apache.ant/lib/ant-jmf.jar ln -sf %{_javadir}/ant/ant-junit.jar plugins/org.apache.ant/lib/ant-junit.jar ln -sf %{_javadir}/ant-launcher.jar plugins/org.apache.ant/lib/ant-launcher.jar # ------------------------------------------------------------------------ -# FIXME: can we just remove these? -rm -f plugins/org.apache.ant/lib/ant-netrexx.jar -#ln -sf %{_javadir}/ant/ant-netrexx.jar plugins/org.apache.ant/lib/ant-netrexx.jar -# ------------------------------------------------------------------------ ln -sf %{_javadir}/ant/ant-nodeps.jar plugins/org.apache.ant/lib/ant-nodeps.jar # ------------------------------------------------------------------------ ## FIXME: can we just remove these? @@ -305,22 +301,23 @@ ln -sf %{_javadir}/junit.jar plugins/org.junit/junit.jar %build -## Build jdtcore.jar and jdtCompilerAdapter.jar -#ant \ -# -DinstallOs=linux -DinstallWs=gtk -DinstallArch=%{eclipse_arch} \ -# bootstrap - -## Build a native ecj -#gcj4 -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \ -# -o jdtcore.jar.so jdtcore.jar -#gcj4 -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \ -# -o jdtCompilerAdapter.jar.so jdtCompilerAdapter.jar -#gcj4 -O2 --main=org.eclipse.jdt.internal.compiler.batch.Main \ -# jdtcore.jar.so jdtCompilerAdapter.jar.so -o ecj - -## Use this ecj and our built jars -#export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH -#export PATH=.:$PATH +export CLASSPATH=jdtcore.jar:jdtCompilerAdapter.jar:$CLASSPATH +# Build jdtcore.jar and jdtCompilerAdapter.jar +ant \ + -DinstallOs=linux -DinstallWs=gtk -DinstallArch=%{eclipse_arch} \ + bootstrap + +# Build a native ecj +gcj4 -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \ + -o jdtcore.jar.so jdtcore.jar +gcj4 -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \ + -o jdtCompilerAdapter.jar.so jdtCompilerAdapter.jar +gcj4 -O2 --main=org.eclipse.jdt.internal.compiler.batch.Main \ + jdtcore.jar.so jdtCompilerAdapter.jar.so -o ecj +ln -s jdtcore.jar.so lib-org-eclipse-jdt.so + +# Use this ecj and our built jars +export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH export CLASSPATH=jdtcore.jar:jdtCompilerAdapter.jar:$CLASSPATH ant \ @@ -383,8 +380,16 @@ install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/%{name} # Natively-compiled jars (shared libraries) tar -C $RPM_BUILD_ROOT -zxf result/%{name}-nativelycompiledjars.tar.gz +# Link lib-org-eclipse-jdt.so to jdtcore.jar.so for native "javac" +ln -s \ + %{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/jdtcore.jar.so \ + $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/lib-org-eclipse-jdt.so + install -d -m 755 $RPM_BUILD_ROOT%{_bindir} +# Directory to hold all the .jar->.so mapping dbs +install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings + ## Rebuild ecj binary ## FIXME: is this the best place for this? #gcj4 -O2 --main=org.eclipse.jdt.internal.compiler.batch.Main \ @@ -442,6 +447,11 @@ perl -pe \ s|/usr/bin/|%{_bindir}/|g' \ %{SOURCE1} > $RPM_BUILD_ROOT%{_bindir}/eclipse +## DB merging script +#perl -pe \ +# 's|/usr/lib/eclipse/|%{_libdir}/%{name}/|g' \ +# %{SOURCE17} > $RPM_BUILD_ROOT%{_libdir}/eclipse/eclipse-mergedbs.sh + # Default config mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} perl -pe 's|/usr/lib/eclipse/|%{_datadir}/%{name}/|g' \ @@ -508,7 +518,6 @@ ln -sf %{_javadir}/ant/ant-jmf.jar plugins/org.apache.ant_*/lib/ant-jmf.jar #ln -sf %{_javadir}/ant/ant-jsch.jar plugins/org.apache.ant_*/lib/ant-jsch.jar ln -sf %{_javadir}/ant/ant-junit.jar plugins/org.apache.ant_*/lib/ant-junit.jar ln -sf %{_javadir}/ant-launcher.jar plugins/org.apache.ant_*/lib/ant-launcher.jar -#ln -sf %{_javadir}/ant/ant-netrexx.jar plugins/org.apache.ant_*/lib/ant-netrexx.jar ln -sf %{_javadir}/ant/ant-nodeps.jar plugins/org.apache.ant_*/lib/ant-nodeps.jar #ln -sf %{_javadir}/ant/ant-starteam.jar plugins/org.apache.ant_*/lib/ant-starteam.jar #ln -sf %{_javadir}/ant/ant-stylebook.jar plugins/org.apache.ant_*/lib/ant-stylebook.jar @@ -562,9 +571,16 @@ ln -sf %{_javadir}/ant/ant-trax.jar plugins/org.apache.ant_*/lib/ant-trax.jar ## END TOMCAT4 ## ln -sf %{_javadir}/junit.jar plugins/org.junit_*/junit.jar -# Create the gcj db +# Create the main gcj db gcj-dbtool4 -n $RPM_BUILD_ROOT%{_libdir}/%{name}/eclipse.db 80000 +# Create the gcj dbs for libswt, ecj, platform, jdt, and pde +gcj-dbtool4 -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/libswt3-gtk2.db 80000 +gcj-dbtool4 -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/ecj.db 80000 +gcj-dbtool4 -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/platform.db 80000 +gcj-dbtool4 -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/jdt.db 80000 +gcj-dbtool4 -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/pde.db 80000 + # Copy these file lists for use at install time install -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_libdir}/%{name} install -m 644 %{SOURCE13} $RPM_BUILD_ROOT%{_libdir}/%{name} @@ -580,51 +596,76 @@ ln -s %{_datadir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclip rm -rf $RPM_BUILD_ROOT %post ecj -gcj-dbtool4 -n /tmp/eclipse-ecj.db 80000 -gcj-dbtool4 -a /tmp/eclipse-ecj.db \ +gcj-dbtool4 -a %{_libdir}/%{name}/mappings/ecj.db \ %{_datadir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtcore.jar \ %{_libdir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtcore.jar.so -gcj-dbtool4 -a /tmp/eclipse-ecj.db \ +gcj-dbtool4 -a %{_libdir}/%{name}/mappings/ecj.db \ %{_datadir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtCompilerAdapter.jar \ %{_libdir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtCompilerAdapter.jar.so -gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db /tmp/eclipse-ecj.db %{_libdir}/%{name}/eclipse.db -rm -f /tmp/eclipse-ecj.db +if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then + gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db` +fi %post jdt -gcj-dbtool4 -n /tmp/eclipse-jdt.db 80000 for j in `cat %{_libdir}/%{name}/%{name}-jdt.jarswithnativelibs`; do - gcj-dbtool4 -a /tmp/eclipse-jdt.db \ + gcj-dbtool4 -a %{_libdir}/%{name}/mappings/jdt.db \ $j `echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so; done -gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db /tmp/eclipse-jdt.db %{_libdir}/%{name}/eclipse.db -rm -f /tmp/eclipse-jdt.db +if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then + gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db` +fi %post pde -gcj-dbtool4 -n /tmp/eclipse-pde.db 80000 for j in `cat %{_libdir}/%{name}/%{name}-pde.jarswithnativelibs`; do - gcj-dbtool4 -a /tmp/eclipse-pde.db \ + gcj-dbtool4 -a %{_libdir}/%{name}/mappings/pde.db \ $j `echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so; done -gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db /tmp/eclipse-pde.db %{_libdir}/%{name}/eclipse.db -rm -f /tmp/eclipse-pde.db +if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then + gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db` +fi %post platform -gcj-dbtool4 -n /tmp/eclipse-platform.db 80000 for j in `cat %{_libdir}/%{name}/%{name}-platform.jarswithnativelibs`; do - gcj-dbtool4 -a /tmp/eclipse-platform.db \ + gcj-dbtool4 -a %{_libdir}/%{name}/mappings/platform.db \ $j `echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so; done -gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db /tmp/eclipse-platform.db %{_libdir}/%{name}/eclipse.db -rm -f /tmp/eclipse-platform.db +if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then + gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db` +fi %post -n %{libname}-gtk2 -gcj-dbtool4 -n /tmp/%{libname}-gtk2.db 80000 for j in `cat %{_libdir}/%{name}/%{libname}-gtk2.jarswithnativelibs`; do - gcj-dbtool4 -a /tmp/%{libname}-gtk2.db \ + gcj-dbtool4 -a %{_libdir}/%{name}/mappings/libswt3-gtk2.db \ $j `echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so; done -gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db /tmp/%{libname}-gtk2.db %{_libdir}/%{name}/eclipse.db -rm -f /tmp/%{libname}-gtk2.db +if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then + gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db` +fi + +%postun ecj +if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then + gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db` +fi + +%postun jdt +if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then + gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db` +fi + +%postun pde +if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then + gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db` +fi + +%postun platform +if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then + gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db` +fi + +%postun -n %{libname}-gtk2 +if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then + gcj-dbtool4 -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db` +fi # FIXME: add the native directories to these lists %files ecj @@ -635,6 +676,10 @@ rm -f /tmp/%{libname}-gtk2.db %{_datadir}/java/jdtcore*.jar # Native bits %{_libdir}/%{name}/eclipse.db +#%attr(0755,root,root) %{_libdir}/%{name}/eclipse-mergedbs.sh +%dir %{_libdir}/%{name}/mappings +%{_libdir}/%{name}/mappings/ecj.db +%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/lib-org-eclipse-jdt.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/jdtcore.jar.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/jdtCompilerAdapter.jar.so @@ -652,8 +697,11 @@ rm -f /tmp/%{libname}-gtk2.db %{_libdir}/libswt-*.so %{_javadir}/swt-gtk*.jar %{_javadir}/swt-pi-gtk*.jar -## Native bits +# Native bits %{_libdir}/%{name}/eclipse.db +#%attr(0755,root,root) %{_libdir}/%{name}/eclipse-mergedbs.sh +%dir %{_libdir}/%{name}/mappings +%{_libdir}/%{name}/mappings/libswt3-gtk2.db %ifarch alpha ia64 ppc64 sparc64 x86_64 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.swt.gtk64_3.1.0/ws/gtk/swt-pi.jar.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.swt.gtk64_3.1.0/ws/gtk/swt-mozilla.jar.so @@ -672,6 +720,9 @@ rm -f /tmp/%{libname}-gtk2.db %defattr(0644,root,root,0755) # Native bits %{_libdir}/%{name}/eclipse.db +#%attr(0755,root,root) %{_libdir}/%{name}/eclipse-mergedbs.sh +%dir %{_libdir}/%{name}/mappings +%{_libdir}/%{name}/mappings/jdt.db %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.debug.ui_3.1.0/jdiui.jar.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.debug.ui_3.1.0/snippetsupport.jar.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.debug_3.1.0/jdimodel.jar.so @@ -692,7 +743,10 @@ rm -f /tmp/%{libname}-gtk2.db %files pde -f %{name}-pde.install %defattr(0644,root,root,0755) # Native bits -%attr(0755,root,root) %{_libdir}/%{name}/eclipse.db +%{_libdir}/%{name}/eclipse.db +#%attr(0755,root,root) %{_libdir}/%{name}/eclipse-mergedbs.sh +%dir %{_libdir}/%{name}/mappings +%{_libdir}/%{name}/mappings/pde.db %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.pde.build_3.1.0/lib/pdebuild-ant.jar.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.pde.build_3.1.0/pdebuild.jar.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.pde.core_3.1.0/pdecore.jar.so @@ -727,6 +781,9 @@ rm -f /tmp/%{libname}-gtk2.db %config(noreplace) %{_sysconfdir}/eclipse.conf # Native bits %{_libdir}/%{name}/eclipse.db +#%attr(0755,root,root) %{_libdir}/%{name}/eclipse-mergedbs.sh +%dir %{_libdir}/%{name}/mappings +%{_libdir}/%{name}/mappings/platform.db %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.ant.core_3.1.0/antsupport.jar.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.compare_3.1.0/compare.jar.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.core.boot_3.0.0/boot.jar.so @@ -820,8 +877,7 @@ rm -f /tmp/%{libname}-gtk2.db %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.apache.ant_1.6.2/lib/ant-jmf.jar.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.apache.ant_1.6.2/lib/ant-weblogic.jar.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.apache.ant_1.6.2/lib/ant-apache-oro.jar.so -# FIXME: if we re-add, be sure to add to eclipse-platform.jarswithnativelibs -#%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.apache.ant_1.6.2/lib/ant-netrexx.jar.so +%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.apache.ant_1.6.2/lib/ant-netrexx.jar.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.apache.ant_1.6.2/lib/ant.jar.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.apache.ant_1.6.2/lib/ant-trax.jar.so %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.apache.ant_1.6.2/lib/ant-jdepend.jar.so @@ -856,6 +912,10 @@ rm -f /tmp/%{libname}-gtk2.db %{_datadir}/%{name}/plugins/org.eclipse.platform.source.linux.gtk.*_3.1.0 %changelog +* Fri Feb 25 2005 Andrew Overholt 3.1.0_fc-0.M5.6 +- Re-work how we do the gcj-dbtool magic. +- Don't remove ant-netrexx (need to find an RPM if we can). + * Sun Feb 20 2005 Andrew Overholt 1:3.1_fc-0.M5.5 - Build for just i386 and x86_64 for now due to upstream gcc bugs.