diff --git a/eclipse-ecj-square-bracket-classpath.patch b/eclipse-ecj-square-bracket-classpath.patch new file mode 100644 index 0000000..bba56e5 --- /dev/null +++ b/eclipse-ecj-square-bracket-classpath.patch @@ -0,0 +1,189 @@ +### Eclipse Workspace Patch 1.0 +#P org.eclipse.jdt.core +Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v +retrieving revision 1.254.4.1 +diff -u -r1.254.4.1 Main.java +--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 2 Jul 2006 10:11:58 -0000 1.254.4.1 ++++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 20 Oct 2006 21:45:05 -0000 +@@ -28,9 +28,11 @@ + import java.text.MessageFormat; + import java.util.ArrayList; + import java.util.Arrays; ++import java.util.Collections; + import java.util.Date; + import java.util.HashMap; + import java.util.Iterator; ++import java.util.LinkedList; + import java.util.Locale; + import java.util.Map; + import java.util.MissingResourceException; +@@ -40,8 +42,8 @@ + + import org.eclipse.jdt.core.compiler.CategorizedProblem; + import org.eclipse.jdt.core.compiler.CharOperation; +-import org.eclipse.jdt.core.compiler.InvalidInputException; + import org.eclipse.jdt.core.compiler.IProblem; ++import org.eclipse.jdt.core.compiler.InvalidInputException; + import org.eclipse.jdt.internal.compiler.ClassFile; + import org.eclipse.jdt.internal.compiler.CompilationResult; + import org.eclipse.jdt.internal.compiler.Compiler; +@@ -59,9 +61,9 @@ + import org.eclipse.jdt.internal.compiler.problem.DefaultProblem; + import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory; + import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities; ++import org.eclipse.jdt.internal.compiler.util.HashtableOfObject; + import org.eclipse.jdt.internal.compiler.util.Messages; + import org.eclipse.jdt.internal.compiler.util.SuffixConstants; +-import org.eclipse.jdt.internal.compiler.util.HashtableOfObject; + import org.eclipse.jdt.internal.compiler.util.Util; + + public class Main implements ProblemSeverities, SuffixConstants { +@@ -2989,56 +2991,73 @@ + ArrayList currentRuleSpecs = new ArrayList(defaultSize); + StringTokenizer tokenizer = new StringTokenizer(currentPath, + File.pathSeparator + "[]", true); //$NON-NLS-1$ ++ LinkedList list = new LinkedList(Collections.list(tokenizer)); ++ + // state machine +- final int start = 0; +- final int readyToClose = 1; +- // 'path' 'path1[rule];path2' +- final int readyToCloseEndingWithRules = 2; +- // 'path[rule]' 'path1;path2[rule]' +- final int readyToCloseOrOtherEntry = 3; +- // 'path[rule];' 'path;' 'path1;path2;' +- final int rulesNeedAnotherRule = 4; +- // 'path[rule1;' +- final int rulesStart = 5; +- // 'path[' 'path1;path2[' +- final int rulesReadyToClose = 6; +- // 'path[rule' 'path[rule1;rule2' ++ // process list in reverse order, start refers to end of list ++ final int start = 0; ++ final int rulesStart = 1; ++ // ']' '];path' ++ final int rulesReadyToCloseOrOtherRule = 2; ++ // 'rule]' 'rule1;rule2]' ++ final int rulesNeedAnotherRule = 3; ++ // ';rule2]' ';rule2;rule3];path' ++ final int readyForPath = 4; ++ // '[rule]' '[rule1;rule2]' ++ final int readyToCloseOrOtherEntry = 5; ++ // 'path[rule]' 'path' 'path1;path2' ++ final int readyForPathOrRules = 6; ++ // ';path[rule]' ';path' + final int error = 99; + int state = start; ++ + String token = null; +- while (tokenizer.hasMoreTokens()) { +- token = tokenizer.nextToken(); ++ while (!list.isEmpty()) { ++ token = (String)list.removeLast(); + if (token.equals(File.pathSeparator)) { + switch (state) { + case start: + break; +- case readyToClose: +- case readyToCloseEndingWithRules: + case readyToCloseOrOtherEntry: +- state = readyToCloseOrOtherEntry; + addNewEntry(paths, currentClasspathName, currentRuleSpecs, customEncoding, isSourceOnly); + currentRuleSpecs.clear(); ++ state = readyForPathOrRules; + break; +- case rulesReadyToClose: ++ case rulesReadyToCloseOrOtherRule: + state = rulesNeedAnotherRule; + break; ++ case rulesNeedAnotherRule: ++ break; ++ case readyForPathOrRules: ++ break; + default: + state = error; + } + } else if (token.equals("[")) { //$NON-NLS-1$ + switch (state) { +- case readyToClose: +- state = rulesStart; ++ case start: ++ case readyForPath: ++ case readyForPathOrRules: ++ currentClasspathName = getPath(list, token); ++ state = readyToCloseOrOtherEntry; + break; +- default: ++ case rulesReadyToCloseOrOtherRule: ++ state = readyForPath; ++ break; ++ default: + state = error; + } + } else if (token.equals("]")) { //$NON-NLS-1$ + switch (state) { +- case rulesReadyToClose: +- state = readyToCloseEndingWithRules; ++ case start: ++ case readyForPathOrRules: ++ state = rulesStart; + break; +- default: ++ case readyForPath: ++ currentClasspathName = getPath(list, token); ++ state = readyToCloseOrOtherEntry; ++ break; ++ default: + state = error; + } + +@@ -3046,24 +3065,25 @@ + // regular word + switch (state) { + case start: +- case readyToCloseOrOtherEntry: +- state = readyToClose; +- currentClasspathName = token; ++ case readyForPath: ++ case readyForPathOrRules: ++ currentClasspathName = getPath(list, token); ++ state = readyToCloseOrOtherEntry; + break; +- case rulesNeedAnotherRule: + case rulesStart: +- state = rulesReadyToClose; ++ case rulesNeedAnotherRule: + currentRuleSpecs.add(token); ++ state = rulesReadyToCloseOrOtherRule; + break; + default: + state = error; + } + } + } ++ + switch(state) { +- case readyToClose : +- case readyToCloseEndingWithRules : +- case readyToCloseOrOtherEntry : ++ case readyForPathOrRules: ++ case readyToCloseOrOtherEntry: + addNewEntry(paths, currentClasspathName, currentRuleSpecs, customEncoding, isSourceOnly); + break; + default : +@@ -3071,4 +3091,13 @@ + this.logger.logIncorrectClasspath(currentPath); + } + } ++ ++private String getPath(LinkedList list, String path) { ++ while (!list.isEmpty()) { ++ if (File.pathSeparator.equalsIgnoreCase((String)list.getLast())) ++ break; ++ path = (String)list.removeLast() + path; ++ } ++ return path; ++} + } diff --git a/eclipse.spec b/eclipse.spec index 23431f1..6a8e39e 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -32,7 +32,7 @@ Epoch: 1 Summary: An open, extensible IDE Name: eclipse Version: %{eclipse_majmin}.%{eclipse_micro} -Release: 6%{?dist} +Release: 7%{?dist} License: EPL Group: Text Editors/Integrated Development Environments (IDE) URL: http://www.eclipse.org/ @@ -79,9 +79,7 @@ Patch40: %{name}-usebuiltlauncher.patch ## Build cairo native libs #Patch43: %{name}-libswt-cairo1.0-3.patch Patch46: %{name}-libswt-xpcomgcc4.patch -# https://bugs.eclipse.org/bugs/show_bug.cgi?id=79592 -# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=168726 -Patch47: %{name}-launcher-link.patch +Patch47: %{name}-launcher-set-install-dir-and-shared-config.patch # Don't attempt to link to Sun's javadocs Patch48: %{name}-javadoclinks.patch # Always generate debug info when building RPMs (Andrew Haley) @@ -110,9 +108,9 @@ Patch54: %{name}-swt-rm-ON_TOP.patch Patch22: %{name}-updatehomedir.patch # JPackage []s in names of symlinks ... # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=162177 -Patch34: %{name}-bz162177.patch +Patch34: %{name}-ecj-square-bracket-classpath.patch # Use ecj for gcj -Patch57: %{name}-ecj-gcj.patch +Patch57: %{name}-ecj-gcj.patch # Build against firefox: # - fix swt profile include path # - don't compile the mozilla 1.7 / firefox profile library -- build it inline @@ -126,6 +124,7 @@ Patch59: %{name}-swt-firefox.patch Patch60: %{name}-swt-firefox.2.patch Patch100: customBuildCallbacks.xml-add-pre.gather.bin.parts.patch + %if %{gcj_support} %else ExclusiveArch: %{ix86} x86_64 ppc ia64 sparc sparc64 @@ -170,8 +169,7 @@ BuildRequires: lucene BuildRequires: regexp BuildRequires: junit >= 3.8.1-3jpp %if %{gcj_support} -Requires(post): java-gcj-compat >= 1.0.64 -Requires(postun): java-gcj-compat >= 1.0.64 +Requires(post,postun): java-gcj-compat >= 1.0.64 %endif %description @@ -187,8 +185,7 @@ Obsoletes: ecj Provides: ecj %if %{gcj_support} Requires: libgcj >= 4.0.2 -Requires(post): java-gcj-compat >= 1.0.64 -Requires(postun): java-gcj-compat >= 1.0.64 +Requires(post,postun): java-gcj-compat >= 1.0.64 %else Requires: java >= 1.4.2 %endif @@ -201,8 +198,7 @@ Summary: SWT Library for GTK2 Group: Text Editors/Integrated Development Environments (IDE) %if %{gcj_support} Requires: libgcj >= 4.0.2 -Requires(post): java-gcj-compat >= 1.0.64 -Requires(postun): java-gcj-compat >= 1.0.64 +Requires(post,postun): java-gcj-compat >= 1.0.64 %endif Requires: firefox Conflicts: mozilla @@ -214,10 +210,10 @@ SWT Library for GTK2. Summary: Eclipse Rich Client Platform Group: Development/Languages Requires: %{libname}-gtk2 = %{epoch}:%{version}-%{release} +Requires(post,postun): %{libname}-gtk2 = %{epoch}:%{version}-%{release} %if %{gcj_support} Requires: libgcj >= 4.0.2 -Requires(post): java-gcj-compat >= 1.0.64 -Requires(postun): java-gcj-compat >= 1.0.64 +Requires(post,postun): java-gcj-compat >= 1.0.64 %else Requires: java >= 1.4.2 %endif @@ -232,6 +228,7 @@ Group: Text Editors/Integrated Development Environments (IDE) Provides: %{name}-rcp-devel Obsoletes: %{name}-rcp-devel Requires: %{name}-rcp = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-rcp = %{epoch}:%{version}-%{release} #FIXME: fix description to include docs %description rcp-sdk @@ -244,18 +241,14 @@ Group: Text Editors/Integrated Development Environments (IDE) %if %{gcj_support} Requires: libgcj >= 4.0.2 Requires: java-gcj-compat >= 1.0.64 -Requires(post): java-gcj-compat >= 1.0.64 -Requires(postun): java-gcj-compat >= 1.0.64 +Requires(post,postun): java-gcj-compat >= 1.0.64 %else Requires: java >= 1.4.2 %endif Requires: %{name}-rcp = %{epoch}:%{version}-%{release} Requires(post,postun): %{name}-rcp = %{epoch}:%{version}-%{release} -Requires: %{libname}-gtk2 = %{epoch}:%{version}-%{release} - BuildRequires: gtk2 >= 2.6 Requires: gtk2 >= 2.6 - Requires: ant-antlr ant-apache-bcel ant-apache-log4j ant-apache-oro ant-apache-regexp ant-apache-resolver ant-commons-logging #Requires: ant-antlr ant-apache-bcel ant-apache-bsf ant-apache-log4j ant-apache-oro ant-apache-regexp ant-apache-resolver ant-commons-logging # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=180642 @@ -270,7 +263,7 @@ Requires: lucene Requires: regexp %description platform -Eclipse platform common files. This package now contains the GTK2 UI (the +Eclipse platform common files. This package now contains the GTK2 UI (the former eclipse-gtk2 package). %package platform-sdk @@ -281,6 +274,8 @@ Provides: %{name}-platform-devel Obsoletes: %{name}-platform-devel Requires: %{name}-platform = %{epoch}:%{version}-%{release} Requires: %{name}-rcp-sdk = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-platform = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-rcp-sdk = %{epoch}:%{version}-%{release} Requires: java-javadoc #FIXME: fix description to include docs @@ -292,11 +287,12 @@ Summary: Eclipse Java development tools Group: Text Editors/Integrated Development Environments (IDE) Requires: %{name}-platform = %{epoch}:%{version}-%{release} Requires: %{name}-ecj = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-platform = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-ecj = %{epoch}:%{version}-%{release} Requires: junit >= 3.8.1-3jpp %if %{gcj_support} Requires: libgcj >= 4.0.2 -Requires(post): java-gcj-compat >= 1.0.64 -Requires(postun): java-gcj-compat >= 1.0.64 +Requires(post,postun): java-gcj-compat >= 1.0.64 %endif %description jdt @@ -310,6 +306,8 @@ Provides: %{name}-jdt-devel Obsoletes: %{name}-jdt-devel Requires: %{name}-jdt = %{epoch}:%{version}-%{release} Requires: %{name}-platform-sdk = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-jdt = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-platform-sdk = %{epoch}:%{version}-%{release} Requires: java-javadoc @@ -323,10 +321,12 @@ Group: Text Editors/Integrated Development Environments (IDE) Requires: %{name}-jdt = %{epoch}:%{version}-%{release} Requires: %{name}-pde-runtime = %{epoch}:%{version}-%{release} Requires: %{name}-platform-sdk = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-jdt = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-pde-runtime = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-platform-sdk = %{epoch}:%{version}-%{release} %if %{gcj_support} Requires: libgcj >= 4.0.2 -Requires(post): java-gcj-compat >= 1.0.64 -Requires(postun): java-gcj-compat >= 1.0.64 +Requires(post,postun): java-gcj-compat >= 1.0.64 %endif %description pde @@ -335,8 +335,8 @@ Eclipse Plug-in Development Environment. %package pde-runtime Summary: Eclipse PDE runtime plugin. Group: Text Editors/Integrated Development Environments (IDE) -Requires: %{name}-jdt = %{epoch}:%{version}-%{release} Requires: %{name}-platform = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-platform = %{epoch}:%{version}-%{release} %if %{gcj_support} Requires: libgcj >= 4.0.2 Requires(post): java-gcj-compat >= 1.0.64 @@ -351,6 +351,7 @@ Summary: Eclipse PDE Source Group: Text Editors/Integrated Development Environments (IDE) Requires: %{name}-pde = %{epoch}:%{version}-%{release} Requires: %{name}-jdt-sdk = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-pde = %{epoch}:%{version}-%{release} #FIXME: fix description to include docs %description pde-sdk @@ -363,13 +364,14 @@ Group: Text Editors/Integrated Development Environments (IDE) Provides: %{name}-pde-devel Obsoletes: %{name}-pde-devel Requires: %{name}-platform-sdk = %{epoch}:%{version}-%{release} -Requires(post,postun): %{name}-platform = %{epoch}:%{version}-%{release} Requires: %{name}-jdt-sdk = %{epoch}:%{version}-%{release} Requires: %{name}-pde-sdk = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-platform-sdk = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-pde-sdk = %{epoch}:%{version}-%{release} +Requires(post,postun): %{name}-jdt-sdk = %{epoch}:%{version}-%{release} %if %{gcj_support} Requires: libgcj >= 4.0.2 -Requires(post): java-gcj-compat >= 1.0.64 -Requires(postun): java-gcj-compat >= 1.0.64 +Requires(post,postun): java-gcj-compat >= 1.0.64 %endif #FIXME: fix description to be better @@ -424,18 +426,27 @@ pushd plugins/org.eclipse.swt/Eclipse\ SWT\ Mozilla/common/library popd # Because the launcher source is zipped up, we need to unzip, patch, and re-pack +# FIXME: figure out why we need to patch and sed twice and fix upstream mkdir launchertmp unzip -qq -d launchertmp plugins/org.eclipse.platform/launchersrc.zip pushd launchertmp -%patch47 -p1 +%patch47 -p0 +# put the configuration directory in an arch specific location +sed --in-place "s:/usr/lib/eclipse/configuration:%{_libdir}/%{name}/configuration:" library/eclipse.c +# make the eclipse install relocatable +sed --in-place "s:/usr/share/eclipse:%{_datadir}/%{name}:" library/eclipse.c zip -q -9 -r ../launchersrc.zip * popd mv launchersrc.zip plugins/org.eclipse.platform rm -rf launchertmp - pushd features/org.eclipse.platform.launchers -%patch47 -p1 +%patch47 -p0 +# put the configuration directory in an arch specific location +sed --in-place "s:/usr/lib/eclipse:%{_libdir}/%{name}:" library/eclipse.c +# make the eclipse install relocatable +sed --in-place "s:/usr/share/eclipse:%{_datadir}/%{name}:" library/eclipse.c popd + # Link against our system-installed javadocs %patch48 -p0 sed --in-place "s:/usr/share/:%{_datadir}/:g" \ @@ -911,99 +922,90 @@ SWT_MIN_VER=$(grep min_ver plugins/org.eclipse.swt/Eclipse\ SWT/common/library/m SWT_VERSION=$SWT_MAJ_VER$SWT_MIN_VER install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name} - tar -C $RPM_BUILD_ROOT%{_datadir} -zxf result/linux-gtk-%{eclipse_arch}-sdk.tar.gz -pushd $RPM_BUILD_ROOT%{_datadir}/%{name} - +# FIXME: investigate why it doesn't work to set this -- configuration data is +# always written to /usr/share/eclipse/configuration +# -Dosgi.sharedConfiguration.area=$RPM_BUILD_ROOT%{_libdir}/%{name}/configuration \ # Extract .so files # https://bugs.eclipse.org/bugs/show_bug.cgi?id=90535 -java -cp startup.jar org.eclipse.core.launcher.Main -consolelog -application org.eclipse.core.runtime.initializer -fileInitializer %{SOURCE19} -popd - -# Remove unnecessary configuration data -rm -r $RPM_BUILD_ROOT%{_datadir}/%{name}/configuration/org.eclipse.update -rm -r $RPM_BUILD_ROOT%{_datadir}/%{name}/configuration/org.eclipse.core.runtime - -# Binaries, libraries, and natively-built shared libraries -install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/%{name} - -install -d -m 755 $RPM_BUILD_ROOT%{_bindir} - -# Eclipse binary -mv $RPM_BUILD_ROOT%{_datadir}/%{name}/eclipse $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name} - pushd $RPM_BUILD_ROOT%{_datadir}/%{name} -ln -s %{_libdir}/%{name}/eclipse eclipse +java -cp startup.jar \ + org.eclipse.core.launcher.Main \ + -consolelog \ + -application org.eclipse.core.runtime.initializer \ + -fileInitializer %{SOURCE19} +popd -# Symlink JNI libraries +# Install config.ini to an arch dependant location and remomve the unnecessary +# configuration data +install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/%{name} +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/configuration $RPM_BUILD_ROOT%{_libdir}/%{name} +rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/configuration/org.eclipse.update +rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/configuration/org.eclipse.core.runtime +rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/configuration/*.log + +# Set config.ini for the rcp package, the lowest package in the dependancy chain. +sed --in-place "s/eclipse.product=org.eclipse.sdk.ide/#eclipse.product=/" \ + $RPM_BUILD_ROOT%{_libdir}/%{name}/configuration/config.ini + +# Install the platform specific fragments in an arch specific dir +install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/links +echo "path:%{_libdir}" > $RPM_BUILD_ROOT%{_datadir}/%{name}/links/fragments.link +echo "name=Eclipse Platform" > $RPM_BUILD_ROOT%{_libdir}/%{name}/.eclipseextension +echo "id=org.eclipse.platform" >> $RPM_BUILD_ROOT%{_libdir}/%{name}/.eclipseextension +echo "version=%{eclipse_majmin}.%{eclipse_micro}" >> $RPM_BUILD_ROOT%{_libdir}/%{name}/.eclipseextension +install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/*%{eclipse_arch}* $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins + +# Install the Eclipse binary +install -d -m 755 $RPM_BUILD_ROOT%{_bindir} +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/eclipse $RPM_BUILD_ROOT%{_bindir}/%{name} + +# Ensure the shared libraries have the correct permissions +pushd $RPM_BUILD_ROOT%{_libdir}/%{name} +for lib in `find configuration -name \*.so`; do + chmod 755 $lib +done + +# Create file listings for the extracted shared objects echo -n "" > %{_builddir}/%{buildsubdir}/%{name}-platform.install; -for l in `find configuration -name \*.so`; do - mv $l $RPM_BUILD_ROOT%{_libdir}/%{name}; - pushd `dirname $l`; - ln -s %{_libdir}/%{name}/`basename $l`; - popd; - # SWT bundle stuff should go in libswt3-gtk - # Contents of other bundles should go in eclipse-platform - if [ "`basename $l`" = "libswt-gtk-$SWT_VERSION.so" ]; then - pushd `dirname $l`; - cd ../..; - currentDir=`pwd`; - # Add this directory to the files list for libswt - # This topmostDirs hack is needed due to differences in directory - # layout between the build system and regular machines - topmostDirs=`echo $currentDir | gawk -F '/' '{ print $2"-"$3 }'`; - if [ "$topmostDirs" = "var-tmp" ]; then - echo $currentDir | gawk -F '/' '{ print "/"$5"/"$6"/"$7"/"$8"/"$9"/"$10"/"$11"/"$12 }' > %{_builddir}/%{buildsubdir}/%{libname}-gtk2.install; - else - echo $currentDir | gawk -F '/' '{ print "/"$7"/"$8"/"$9"/"$10"/"$11"/"$12"/"$13"/"$14 }' > %{_builddir}/%{buildsubdir}/%{libname}-gtk2.install; - fi - popd - elif [ "`basename $l`" = "liblocalfile_1_0_0.so" -o "`basename $l`" = "libupdate.so" ]; then - pushd `dirname $l`; - cd ../../../../..; - currentDir=`pwd`; - # Add this directory to the files list for eclipse-platform - # This topmostDirs hack is needed due to differences in directory - # layout between the build system and regular machines - topmostDirs=`echo $currentDir | gawk -F '/' '{ print $2"-"$3 }'`; - if [ "$topmostDirs" = "var-tmp" ]; then - echo $currentDir | gawk -F '/' '{ print "/"$5"/"$6"/"$7"/"$8"/"$9"/"$10"/"$11"/"$12 }' >> %{_builddir}/%{buildsubdir}/%{name}-platform.install; - else - echo $currentDir | gawk -F '/' '{ print "/"$7"/"$8"/"$9"/"$10"/"$11"/"$12"/"$13"/"$14 }' >> %{_builddir}/%{buildsubdir}/%{name}-platform.install; - fi - popd - fi -done +for id in `ls configuration/org.eclipse.osgi/bundles`; do + if [ "Aconfiguration" = $(echo A`find configuration/org.eclipse.osgi/bundles/$id -name libswt\*.so` | sed "s:/.*::") ]; then + echo "%{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles/$id" > %{_builddir}/%{buildsubdir}/%{libname}-gtk2.install; + else + echo "%{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles/$id" >> %{_builddir}/%{buildsubdir}/%{name}-platform.install; + fi +done popd -pushd $RPM_BUILD_ROOT%{_libdir}/%{name} -chmod -R 755 eclipse *.so -popd - -### begin libswt-gtk2 symlinks +# Install symlinks to the SWT JNI shared libraries in /usr/lib pushd $RPM_BUILD_ROOT%{_libdir} -for base in awt-gtk atk-gtk cairo-gtk mozilla-gtk gnome-gtk gtk pi-gtk glx-gtk; do - ln -s %{_libdir}/%{name}/libswt-${base}-$SWT_VERSION.so libswt-${base}-$SWT_VERSION.so +for lib in $(find %{name}/configuration -name libswt\*.so); do + ln -s %{_libdir}/$lib `basename $lib` done popd + +# Install the SWT symlinks in javadir install -d -m 755 $RPM_BUILD_ROOT%{_javadir} swtjarversion=$(grep v$SWT_VERSION plugins/org.eclipse.swt.gtk.linux.%{eclipse_arch}/build.xml | sed "s:.*<.*\"\(.*\)\"/>:\1:") pushd $RPM_BUILD_ROOT%{_javadir} -ln -s %{_datadir}/%{name}/plugins/org.eclipse.swt.gtk.linux.%{eclipse_arch}_$swtjarversion.jar swt-gtk-%{eclipse_majmin}.%{eclipse_micro}.jar +ln -s %{_libdir}/%{name}/plugins/org.eclipse.swt.gtk.linux.%{eclipse_arch}_$swtjarversion.jar swt-gtk-%{eclipse_majmin}.%{eclipse_micro}.jar ln -s swt-gtk-%{eclipse_majmin}.%{eclipse_micro}.jar swt-gtk-%{eclipse_majmin}.jar popd -### end libswt-gtk2 symlinks +# Install the eclipse-ecj.jar symlink for java-1.4.2-gcj-compat's "javac" +JDTCORESUFFIX=$(ls $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins | grep jdt.core_ | sed "s/org.eclipse.jdt.core_//") +ln -s %{_javadir}/plugins/org.eclipse.jdt.core_$JDTCORESUFFIX $RPM_BUILD_ROOT%{_javadir}/eclipse-ecj.jar +ln -s %{_javadir}/eclipse-ecj.jar $RPM_BUILD_ROOT%{_javadir}/jdtcore.jar + +# FIXME: get rid of this by putting logic in package build to know what version +# of pde.build it's using +# Install a versionless pde.build pushd $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/ ln -s org.eclipse.pde.build_* org.eclipse.pde.build popd -mkdir -p $RPM_BUILD_ROOT%{_bindir} -pushd $RPM_BUILD_ROOT%{_bindir} -ln -s %{_datadir}/%{name}/%{name} -popd - # rh/freedesktop.org icons install -p -D -m0644 %{SOURCE5} \ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/%{name}.png @@ -1019,20 +1021,20 @@ ln -s ../../../../%{name}/plugins/org.eclipse.platform_%{eclipse_majmin}.%{eclip # Remove unused icon.xpm rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/icon.xpm -# install the efj wrapper script and change the Eclipse installation dir +# install the efj wrapper script install -p -D -m0755 %{SOURCE17} $RPM_BUILD_ROOT%{_bindir}/efj sed --in-place "s:startup.jar:%{_datadir}/%{name}/startup.jar:" \ $RPM_BUILD_ROOT%{_bindir}/efj +# Install the ecj wrapper script +install -p -D -m0755 %{SOURCE18} $RPM_BUILD_ROOT%{_bindir}/ecj +sed --in-place "s:@JAVADIR@:%{_javadir}:" $RPM_BUILD_ROOT%{_bindir}/ecj + # A sanity check. desktop-file-validate %{SOURCE2} # freedesktop.org menu entry -install -p -D -m0644 %{SOURCE2} \ - $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop - -sed --in-place "s/eclipse.product=org.eclipse.sdk.ide/#eclipse.product=/" \ - $RPM_BUILD_ROOT%{_datadir}/%{name}/configuration/config.ini +install -p -D -m0644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop %if %{fedora} # Put Fedora Core version into about.mappings of org.eclipse.sdk and @@ -1063,9 +1065,6 @@ sed -e's/^\(.*\)$/\1 \1/' -e's,^,ln -s $eclipse/,' >> copy-platform mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/buildscripts cp copy-platform $RPM_BUILD_ROOT%{_datadir}/%{name}/buildscripts -JDTCOREVERSION=$(grep "compiler\.version = 0\..*, 3.2.0" plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties | \ - sed "s/^compiler\.version = 0\.\(.*\), 3.2.0 release/\1/") - pushd $RPM_BUILD_ROOT%{_datadir}/%{name} ## BEGIN ANT ## rm plugins/org.apache.ant_*/lib/ant-antlr.jar @@ -1175,13 +1174,6 @@ build-jar-repository -s -p plugins/org.eclipse.tomcat_$TOMCATPLUGINVERSION/lib s build-jar-repository -s -p plugins/org.junit_* junit -# Symlink org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}.jar in -# %{_datadir}/java/eclipse-ecj.jar for java-1.4.2-gcj-compat's "javac" -mkdir -p $RPM_BUILD_ROOT%{_datadir}/java -JDTCORESUFFIX=$(ls $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins | grep jdt.core_ | sed "s/org.eclipse.jdt.core_//") -ln -s %{_datadir}/%{name}/plugins/org.eclipse.jdt.core_$JDTCORESUFFIX $RPM_BUILD_ROOT%{_datadir}/java/eclipse-ecj.jar -ln -s %{_datadir}/java/eclipse-ecj.jar $RPM_BUILD_ROOT%{_datadir}/java/jdtcore.jar - # FIXME: due to aot-compile-rpm smarts, the required resource bundles aren't # being compiled so this truly native ecj binary isn't possible #%if %{gcj_support} @@ -1194,17 +1186,49 @@ ln -s %{_datadir}/java/eclipse-ecj.jar $RPM_BUILD_ROOT%{_datadir}/java/jdtcore.j # popd # chmod a+x $RPM_BUILD_ROOT%{_bindir}/ecj #%else -# Install /usr/bin/ecj script -sed 's:@JAVADIR@:%{_javadir}:g' < %{SOURCE18} > ecj -install -m755 ecj $RPM_BUILD_ROOT%{_bindir} -rm ecj -# Remove log file(s) we don't want to ship -pushd $RPM_BUILD_ROOT%{_datadir}/%{name}/configuration -rm *.log -popd + +# Ensure that the zip files are the same across all builds. +# This is needed to make these package multilib compatible. +mkdir -p ${RPM_BUILD_ROOT}/tmp +for zip in `find ${RPM_BUILD_ROOT}%{_datadir}/%{name} -type f -name \*.zip`; do + # unpack every zip, set the date of the files and directories and repack the zip + ZIPNAME=`basename $zip` + TMPDIR=`mktemp -d -p ${RPM_BUILD_ROOT}/tmp $ZIPNAME.tmpdir.XXXXXXXXXX` + ZIPDIR=`mktemp -d -p ${RPM_BUILD_ROOT}/tmp $ZIPNAME.zipdir.XXXXXXXXXX` + + pushd $TMPDIR + unzip -qq -o $zip + rm -f $zip + # create the directories first + for d in `find -type d | LC_ALL=C sort`; do + mkdir -p $ZIPDIR/$d + done + # move the contents over to the a new directory in order and set the times. + for f in `find -type f | LC_ALL=C sort`; do + cp $f $ZIPDIR/$f + touch --date="1970-01-01 UTC" $ZIPDIR/$f + done + popd + + # Set the times of the directories. + touch --date="$DATE" `find $ZIPDIR -type d` + + # make the new zip + pushd $ZIPDIR + find -type f -print | LC_ALL=C sort | /usr/bin/zip -q -X -9 $zip -@ + popd + + # Cleanup. + rm -rf $TMPDIR + rm -rf $ZIPDIR +done +rm -rf ${RPM_BUILD_ROOT}/tmp %if %{gcj_support} -aot-compile-rpm +# exclude org.eclipse.ui.ide to work around +# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=175547 +UIIDEPLUGINVERSION=$(ls plugins | grep ui.ide_ | sed 's/org.eclipse.ui.ide_//') +aot-compile-rpm --exclude %{_datadir}/%{name}/plugins/org.eclipse.ui.ide_$UIIDEPLUGINVERSION %endif %clean @@ -1218,9 +1242,9 @@ touch --no-create %{_datadir}/icons/hicolor if [ -x /usr/bin/gtk-update-icon-cache ]; then gtk-update-icon-cache -q %{_datadir}/icons/hicolor fi -if [ -f %{_datadir}/%{name}/configuration/config.ini ]; then +if [ -f %{_libdir}/%{name}/configuration/config.ini ]; then sed --in-place "s/#eclipse.product=/eclipse.product=org.eclipse.platform.ide/" \ - %{_datadir}/%{name}/configuration/config.ini + %{_libdir}/%{name}/configuration/config.ini fi %postun platform @@ -1233,9 +1257,9 @@ if [ -x /usr/bin/gtk-update-icon-cache ]; then fi if [ -d %{_datadir}/%{name}/features ]; then PLATFORMDIR=$(ls %{_datadir}/%{name}/features | grep "org\.eclipse\.platform_") - if [ ! -z "$PLATFORMDIR" -a -f %{_datadir}/%{name}/configuration/config.ini ]; then + if [ -z "$PLATFORMDIR" -a -f %{_libdir}/%{name}/configuration/config.ini ]; then sed --in-place "s/eclipse.product=org.eclipse.platform.ide/#eclipse.product=/" \ - %{_datadir}/%{name}/configuration/config.ini + %{_libdir}/%{name}/configuration/config.ini fi fi @@ -1243,9 +1267,9 @@ fi %if %{gcj_support} %{_bindir}/rebuild-gcj-db %endif -if [ -f %{_datadir}/%{name}/configuration/config.ini ]; then +if [ -f %{_libdir}/%{name}/configuration/config.ini ]; then sed --in-place "s/eclipse.product=org.eclipse.platform.ide/eclipse.product=org.eclipse.sdk.ide/" \ - %{_datadir}/%{name}/configuration/config.ini + %{_libdir}/%{name}/configuration/config.ini fi %postun sdk @@ -1254,9 +1278,9 @@ fi %endif if [ -d %{_datadir}/%{name}/features ]; then SDKDIR=$(ls %{_datadir}/%{name}/features | grep "org\.eclipse\.sdk_") - if [ ! -z "$SDKDIR" -a -f %{_datadir}/%{name}/configuration/config.ini ]; then + if [ -z "$SDKDIR" -a -f %{_libdir}/%{name}/configuration/config.ini ]; then sed --in-place "s/eclipse.product=org.eclipse.sdk.ide/eclipse.product=org.eclipse.platform.ide/" \ - %{_datadir}/%{name}/configuration/config.ini + %{_libdir}/%{name}/configuration/config.ini fi fi @@ -1285,7 +1309,6 @@ fi # This is to deal with my stupidity that manifested itself as # rebuild-sdk-features -- overholt - %triggerpostun rcp -- eclipse-rcp < 1:3.2.1, eclipse-rcp-devel < 1:3.2.1, eclipse-pde < 1:3.2.1, eclipse-pde-devel < 1:3.2.1, eclipse-jdt < 1:3.2.1, eclipse-jdt-devel < 1:3.2.1, eclipse-platform < 1:3.2.1, eclipse-platform-devel < 1:3.2.1 # Remove crap from rebuild-sdk-features rm -rf %{_datadir}/%{name}/features/org.eclipse.sdk_3.1.2 @@ -1309,12 +1332,12 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %defattr(-,root,root) %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/plugins -%dir %{_datadir}/%{name}/configuration -%dir %{_datadir}/%{name}/configuration/org.eclipse.osgi -%dir %{_datadir}/%{name}/configuration/org.eclipse.osgi/bundles +%dir %{_libdir}/%{name}/plugins +%dir %{_libdir}/%{name}/configuration +%dir %{_libdir}/%{name}/configuration/org.eclipse.osgi +%dir %{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles %{_datadir}/%{name}/plugins/org.eclipse.swt_* -%{_datadir}/%{name}/plugins/org.eclipse.swt.gtk.linux.%{eclipse_arch}_* -%{_libdir}/%{name}/libswt-*.so +%{_libdir}/%{name}/plugins/org.eclipse.swt.gtk.linux.%{eclipse_arch}_* %{_libdir}/libswt-*.so # FIXME: do we need to build? #%{_libdir}/%{name}/libcairo-swt.so @@ -1328,24 +1351,24 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %files rcp %defattr(-,root,root) %dir %{_datadir}/%{name}/features -%{_datadir}/%{name}/configuration/org.eclipse.osgi/.bundledata* -%{_datadir}/%{name}/configuration/org.eclipse.osgi/.lazy* -%{_datadir}/%{name}/configuration/org.eclipse.osgi/.manager -%{_datadir}/%{name}/configuration/org.eclipse.osgi/.state* -%{_datadir}/%{name}/configuration/config.ini -%{_datadir}/%{name}/configuration/org.eclipse.core.runtime -%{_datadir}/%{name}/configuration/org.eclipse.update +%{_libdir}/%{name}/configuration/org.eclipse.osgi/.bundledata* +%{_libdir}/%{name}/configuration/org.eclipse.osgi/.lazy* +%{_libdir}/%{name}/configuration/org.eclipse.osgi/.manager +%{_libdir}/%{name}/configuration/org.eclipse.osgi/.state* +%verify(not md5 size mtime) %{_libdir}/%{name}/configuration/config.ini +%{_libdir}/%{name}/.eclipseextension %{_datadir}/%{name}/.eclipseproduct %{_datadir}/%{name}/notice.html %{_datadir}/%{name}/epl-v10.html +%{_datadir}/%{name}/links %ifarch %{ix86} x86_64 %{_datadir}/%{name}/about.html %endif %{_datadir}/%{name}/startup.jar %ifarch x86_64 -%{_datadir}/%{name}/about_files/* +%{_datadir}/%{name}/about_files %endif -%{_datadir}/%{name}/readme/* +%{_datadir}/%{name}/readme %{_datadir}/%{name}/features/org.eclipse.rcp_* %{_datadir}/%{name}/plugins/org.eclipse.update.configurator_* %{_datadir}/%{name}/plugins/org.eclipse.osgi_* @@ -1389,23 +1412,17 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %files rcp-sdk %defattr(-,root,root) %{_datadir}/%{name}/features/org.eclipse.rcp.source_* -%{_datadir}/%{name}/plugins/org.eclipse.rcp.source.linux.gtk.%{eclipse_arch}* +%{_libdir}/%{name}/plugins/org.eclipse.rcp.source.linux.gtk.%{eclipse_arch}* %{_datadir}/%{name}/plugins/org.eclipse.rcp.source_* %{_datadir}/%{name}/plugins/com.ibm.icu.source_* %files platform -f %{name}-platform.install %defattr(-,root,root) -%{_datadir}/%{name}/eclipse -%{_libdir}/%{name}/eclipse -%attr(0755,root,root) %{_bindir}/eclipse +%attr(0755,root,root) %{_bindir}/%{name} %{_datadir}/%{name}/eclipse.ini %{_datadir}/applications/* %{_datadir}/pixmaps/* %{_datadir}/icons/*/*/apps/* -%{_libdir}/%{name}/libupdate* -%ifarch %{ix86} x86_64 -%{_libdir}/%{name}/liblocalfile* -%endif %{_datadir}/%{name}/features/org.eclipse.platform_* %{_datadir}/%{name}/plugins/org.eclipse.ui.navigator.resources_* %{_datadir}/%{name}/plugins/org.eclipse.team.cvs.ui_* @@ -1428,7 +1445,7 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %{_datadir}/%{name}/plugins/org.eclipse.team.ui_* %{_datadir}/%{name}/plugins/org.eclipse.update.core.linux_* %ifarch %{ix86} x86_64 -%{_datadir}/%{name}/plugins/org.eclipse.core.filesystem.linux.%{eclipse_arch}_* +%{_libdir}/%{name}/plugins/org.eclipse.core.filesystem.linux.%{eclipse_arch}_* %endif %{_datadir}/%{name}/plugins/org.eclipse.core.variables_* %{_datadir}/%{name}/plugins/org.eclipse.help.base_* @@ -1476,7 +1493,7 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %{_libdir}/gcj/%{name}/org.eclipse.core.resources_* %{_libdir}/gcj/%{name}/org.eclipse.jface.text_* %{_libdir}/gcj/%{name}/org.eclipse.ui.intro_* -%{_libdir}/gcj/%{name}/org.eclipse.ui.ide_* +#%{_libdir}/gcj/%{name}/org.eclipse.ui.ide_* %{_libdir}/gcj/%{name}/com.jcraft.jsch_* %{_libdir}/gcj/%{name}/org.eclipse.ui.cheatsheets_* %{_libdir}/gcj/%{name}/org.eclipse.ant.core_* @@ -1526,7 +1543,7 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %files platform-sdk %defattr(-,root,root) %{_datadir}/%{name}/features/org.eclipse.platform.source_* -%{_datadir}/%{name}/plugins/org.eclipse.platform.source.linux.gtk.%{eclipse_arch}_* +%{_libdir}/%{name}/plugins/org.eclipse.platform.source.linux.gtk.%{eclipse_arch}_* %{_datadir}/%{name}/plugins/org.eclipse.platform.doc.isv_* %{_datadir}/%{name}/plugins/org.eclipse.platform.source_* %if %{gcj_support} @@ -1612,6 +1629,22 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %{_datadir}/%{name}/plugins/org.eclipse.sdk_* %changelog +* Fri Oct 20 2006 Ben Konrath 3.2.1-7 +- Add patch for ecj [] classpath problem. +- Remove configuration files from rcp files list. +- Add patch set bindir and shared config patch to allow the eclipse binary + to sit in %%{_bindir} and remove the symlinks. This patch also allows us to + set osgi.sharedConfiguration.area config on a per build basis so that the + configuration directory can be arch dependant. +- Remove launcher link patch as the bindir patch removes the requirement for + this patch. +- Don't aot-compile org.eclipse.ui.ide to work around rh bug # 175547. +- Add Requies(post,postun) to all packages to ensure that no files are left + behind when eclipse is un-installed. +- Many spec file clean ups. +- Resolves: #199961, #202585, #210764, #207016. +- Related: #175547. + * Mon Oct 16 2006 Andrew Overholt 3.2.1-6 - Remove unneeded tomcat symlinks.