[SCM] eclipse - Powerful IDE written in java - Debian package. branch, master, updated. 319032113b86dab60a6c013165240d12efdf7850

Benjamin Drung bdrung-guest at alioth.debian.org
Thu Oct 8 22:56:47 UTC 2009


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "eclipse - Powerful IDE written in java - Debian package.".

The branch, master has been updated
       via  319032113b86dab60a6c013165240d12efdf7850 (commit)
       via  4291775119514bb2dba82148d996b1d3a185fa83 (commit)
       via  a442c2b4574e0ec988b7041835f1eb0372a7a3c0 (commit)
      from  953bc75c0035085c5a73ade0ce6b7d149ed55d8e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 319032113b86dab60a6c013165240d12efdf7850
Author: Benjamin Drung <bdrung at ubuntu.com>
Date:   Fri Oct 9 00:56:35 2009 +0200

    Sync upstream changes (into eclipse-build.patch)

commit 4291775119514bb2dba82148d996b1d3a185fa83
Author: Benjamin Drung <bdrung at ubuntu.com>
Date:   Fri Oct 9 00:49:58 2009 +0200

    Add wrapper script for setting LD_LIBRARY_PATH (LP: #445842).

commit a442c2b4574e0ec988b7041835f1eb0372a7a3c0
Author: Benjamin Drung <bdrung at ubuntu.com>
Date:   Fri Oct 9 00:02:55 2009 +0200

    Remove unversioned swt.jar link (LP: #446155).

-----------------------------------------------------------------------

Summary of changes:
 debian/extra/eclipse                         |  143 +-----
 debian/libswt-gtk-3.5-java.links             |    1 -
 debian/patches/buildEquinoxInitializer.patch |   25 -
 debian/patches/eclipse-build.patch           |  789 +++++++++++++++++++++++++-
 debian/patches/series                        |    1 -
 debian/rules                                 |    2 +
 6 files changed, 785 insertions(+), 176 deletions(-)

diff --git a/debian/extra/eclipse b/debian/extra/eclipse
index f46073d..8a8bef4 100644
--- a/debian/extra/eclipse
+++ b/debian/extra/eclipse
@@ -1,141 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
-# Having any sort of classpath causes massive breakage, with Kaffe at least.
-unset CLASSPATH; export CLASSPATH
-
-# Allow the user to specify their own Java home, we check for it later.
-#unset JAVA_HOME; export JAVA_HOME
-
-CMDLINEARGS=""
-VMARGS=""
-INSTALL="/usr/lib/eclipse"
-STARTUP=""
-JAVACMD=`which java`
-
-if [ -x /usr/bin/zenity ]; then
-    DIALOG=/usr/bin/zenity
-    DIALOGW="$DIALOG --warning"
-    DIALOGTEXT="--text="
-elif [ -x /usr/bin/kdialog ]; then
-    DIALOG=/usr/bin/kdialog
-    DIALOGW="$DIALOG --warningcontinuecancel"
-elif [ -x /usr/bin/xdialog ]; then
-    DIALOG=/usr/bin/xdialog
-    DIALOGW="$DIALOG --warning"
-    DIALOGTEXT=
-else
-    DIALOG=echo
-    DIALOGW="$DIALOG"
-    DIALOGTEXT=
-fi
-
-
-# Make sure this directory exists.
-if [ ! -d ~/.eclipse ]; then
-    mkdir ~/.eclipse > /dev/null 2>&1
-    if [ $? -ne 0 ]; then
-        $DIALOG \
-            --error \
-            ${DIALOGTEXT}"Could not create settings directory at ~/.eclipse." \
-            --title="Could not launch Eclipse Platform"
-    fi
-fi
-
-# Just in case Eclipse tries to put something in the home directory.
-cd ~
-
-# Load default settings from the user's configuration file.
-if [ -f ~/.eclipse/eclipserc ]; then
-    . ~/.eclipse/eclipserc
-fi
-
-# Process the command line options. These override the eclipserc file, so we do
-# them after parsing that file.
-while [ "$1" ]; do
-    if [ "$1" = "-h" -o "$1" = "--help" ]; then
-        echo "Eclipse Starter Script"
-	echo "Usage:"
-	echo "eclipse [options [value]]"
-	echo "See eclipse(1) for more information."
-	echo ""
-	echo "Also see ~/.eclipse/eclipserc, which provides some default values"
-        exit 0
-    elif [ "$1" = "-vm" ]; then
-        shift
-        unset JAVA_HOME
-        JAVACMD="$1"
-        shift
-    elif [ "$1" = "-install" ]; then
-        shift
-        INSTALL="$1"
-        shift
-    elif [ "$1" = "-startup" ]; then
-        shift
-        STARTUP="-startup $1"
-        shift
-    elif [ "$1" = "-vmargs" ]; then
-        shift
-	while [ "$1" ]; do
-		VMARGS="${VMARGS} $1"
-	        shift
-        done
-    else
-        CMDLINEARGS="${CMDLINEARGS} $1"
-        shift
-    fi
-done
-
-# If the user has specified a custom JAVA, we check it for validity.
-# JAVA defines the virtual machine that Eclipse will use to launch itself.
-if [ -n "${JAVA_HOME}" ]; then
-    echo "using specified vm: ${JAVA_HOME}"
-    if [ ! -x "${JAVA_HOME}/bin/java" ]; then
-        $DIALOG \
-            --error \
-	    ${DIALOGTEXT}"The custom VM you have chosen is not a valid executable." \
-            --title="Could not launch Eclipse Platform" \
-        exit 1
-    fi
-fi
-
-# If we don't have a JAVA_HOME yet, we're doomed.
-if [ -z "${JAVA_HOME}" -a ! -n "${JAVACMD}" ]; then
-    $DIALOG \
-        --error \
-	${DIALOGTEXT}"A suitable Java Virtual Machine for running the Eclipse Platform could not be located."
-        --title="Could not launch Eclipse Platform" \
-    exit 1
-fi
-
-# Set JAVACMD from JAVA_HOME
-if [ -n "${JAVA_HOME}" -a -z "${JAVACMD}" ]; then
-    JAVACMD="$JAVA_HOME/bin/java"
-fi
-
-EXT=/usr/local/lib/eclipse/.eclipseextension
-if [ ! -f $EXT ]; then
-    if ! touch $EXT 2>/dev/null; then
-	cat <<-EOF
-	Could not create $EXT. Please run as root:
-	    touch $EXT
-	    chmod 2775 $EXT
-	    chown root:staff $EXT
-	EOF
-    fi
-    chmod 2775 $EXT 2> /dev/null || true
-    chown root:staff $EXT 2> /dev/null || true
-fi
-
-# libraries from the mozilla choosen take precedence
-LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
-
-# Do the actual launch of Eclipse with the selected VM.
-exec /usr/lib/eclipse/eclipse \
-    -vm "${JAVACMD}" \
-    -install "${INSTALL}" \
-    "${STARTUP}" \
-    ${CMDLINEARGS} \
-    -vmargs -Djava.library.path=/usr/lib/jni \
-            -Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.2/classmap.db \
-            -Dgnu.gcj.runtime.VMClassLoader.library_control=never \
-            -Dosgi.locking=none ${VMARGS}
+xuldir=/usr/lib/xulrunner-$(/usr/bin/xulrunner --gre-version)
+LD_LIBRARY_PATH=$xuldir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} /usr/lib/eclipse/eclipse "$@"
diff --git a/debian/libswt-gtk-3.5-java.links b/debian/libswt-gtk-3.5-java.links
deleted file mode 100644
index 7bc631c..0000000
--- a/debian/libswt-gtk-3.5-java.links
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/java/swt-gtk-3.5.jar usr/lib/java/swt.jar
diff --git a/debian/patches/buildEquinoxInitializer.patch b/debian/patches/buildEquinoxInitializer.patch
deleted file mode 100644
index 9e08295..0000000
--- a/debian/patches/buildEquinoxInitializer.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-https://bugs.eclipse.org/bugs/show_bug.cgi?id=291681
---- a/build.xml	(Revision 23377)
-+++ b/build.xml	(Arbeitskopie)
-@@ -480,6 +480,21 @@
- 			<param name="p2.arch" value="${buildArch}" />
- 			<param name="p2.repo" value="${reposource}" />
- 		</antcall>
-+		<java classname="org.eclipse.core.launcher.Main" dir="${buildDirectory}/plugins/org.eclipse.equinox.initializer" fork="true">
-+			<classpath>
-+				<fileset dir="${buildDirectory}/installation/plugins">
-+					<include name="org.eclipse.equinox.launcher_*.jar" />
-+				</fileset>
-+			</classpath>
-+			<arg line="-application org.eclipse.ant.core.antRunner" />
-+			<arg line="-f build.xml" />
-+			<arg line="build.update.jar" />
-+		</java>
-+		<copy todir="${buildDirectory}/installation/plugins">
-+			<fileset dir="${buildDirectory}/plugins/org.eclipse.equinox.initializer">
-+				<include name="org.eclipse.equinox.initializer*.jar"/>
-+			</fileset>
-+		</copy>
- 		<echo file="provision.sdk-stamp" />
- 	</target>
- 
diff --git a/debian/patches/eclipse-build.patch b/debian/patches/eclipse-build.patch
index c7159cd..0a7cc62 100644
--- a/debian/patches/eclipse-build.patch
+++ b/debian/patches/eclipse-build.patch
@@ -1,8 +1,8 @@
 Description: Sync changes from eclipse-build
 diff -pruN eclipse-3.5.1/build.xml eclipse-3.5.1.new/build.xml
 --- eclipse-3.5.1/build.xml	2009-10-06 00:36:21.000000000 +0200
-+++ eclipse-3.5.1.new/build.xml	2009-10-07 21:42:51.829624000 +0200
-@@ -191,13 +191,17 @@
++++ eclipse-3.5.1.new/build.xml	2009-10-08 16:01:19.162887000 +0200
+@@ -191,13 +191,19 @@
  	</target>
  
  	<target name="applyPatches" depends="insertBuildId" unless="patch.complete">
@@ -14,6 +14,8 @@ diff -pruN eclipse-3.5.1/build.xml eclipse-3.5.1.new/build.xml
  		<patch patchfile="${basedir}/patches/eclipse-swt-buildagainstxulrunner.patch" dir="${buildDirectory}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library" strip="3" />
  		<patch patchfile="${basedir}/patches/donotstorebuildlogsinfiles.patch" dir="${buildDirectory}" strip="3" />
  		<patch patchfile="${basedir}/patches/donotsetjavahomeandoptimizeliblocalfile.patch" dir="${buildDirectory}" strip="3" />
++		<patch patchfile="${basedir}/patches/eclipse-pde.build-add-package-build.patch" dir="${buildDirectory}/plugins/org.eclipse.pde.build" strip="0" />
++		<replace file="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build/build.properties" token="/usr/share/eclipse" value="/usr/${libDir}/eclipse"/>
 +		<!-- end eclipse-build-only patches -->
 +		<!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=290064-->
 +		<patch patchfile="${basedir}/patches/eclipse-help-toolbar.patch" dir="${buildDirectory}" strip="0" />
@@ -22,7 +24,29 @@ diff -pruN eclipse-3.5.1/build.xml eclipse-3.5.1.new/build.xml
  		<echo file="patch-stamp" />
  	</target>
  
-@@ -530,17 +534,43 @@
+@@ -476,6 +482,21 @@
+ 			<param name="p2.arch" value="${buildArch}" />
+ 			<param name="p2.repo" value="${reposource}" />
+ 		</antcall>
++		<java classname="org.eclipse.core.launcher.Main" dir="${buildDirectory}/plugins/org.eclipse.equinox.initializer" fork="true">
++			<classpath>
++				<fileset dir="${buildDirectory}/installation/plugins">
++					<include name="org.eclipse.equinox.launcher_*.jar" />
++				</fileset>
++			</classpath>
++			<arg line="-application org.eclipse.ant.core.antRunner" />
++			<arg line="-f build.xml" />
++			<arg line="build.update.jar" />
++		</java>
++		<copy todir="${buildDirectory}/installation/plugins">
++			<fileset dir="${buildDirectory}/plugins/org.eclipse.equinox.initializer">
++				<include name="org.eclipse.equinox.initializer*.jar"/>
++			</fileset>
++		</copy>
+ 		<echo file="provision.sdk-stamp" />
+ 	</target>
+ 
+@@ -530,17 +551,43 @@
  		<echo message="###################################################################"/>
  		<echo message=""/>
  		<tstamp>
@@ -69,7 +93,7 @@ diff -pruN eclipse-3.5.1/build.xml eclipse-3.5.1.new/build.xml
  	</target>
  
  	<target name="run.director">
-@@ -629,7 +659,23 @@
+@@ -629,7 +676,23 @@
  				tofile="${destDir}${prefix}/share/icons/hicolor/32x32/apps/eclipse.png" />
  		<copy file="${buildDirectory}/plugins/org.eclipse.platform/eclipse48.png"
  				tofile="${destDir}${prefix}/share/icons/hicolor/48x48/apps/eclipse.png" />
@@ -95,8 +119,24 @@ diff -pruN eclipse-3.5.1/build.xml eclipse-3.5.1.new/build.xml
  </project>
 diff -pruN eclipse-3.5.1/ChangeLog eclipse-3.5.1.new/ChangeLog
 --- eclipse-3.5.1/ChangeLog	2009-10-06 00:36:21.000000000 +0200
-+++ eclipse-3.5.1.new/ChangeLog	2009-10-07 21:52:38.667578000 +0200
-@@ -1,7 +1,55 @@
++++ eclipse-3.5.1.new/ChangeLog	2009-10-08 16:01:19.162887000 +0200
+@@ -1,7 +1,71 @@
++2009-10-08  Andrew Overholt  <overholt at redhat.com>
++
++	Bud #291681 - Patch courtesy Benjamin Drung
++
++	* build.xml: Add patch to build Equinox initializer application.
++
++2009-10-08  Alexander Kurtakov  <akurtako at redhat.com>
++    Add pdebuild and companions.
++	* pdebuild/eclipse-copy-platform.sh: New file.
++	* pdebuild/eclipse-pdebuild.sh: Likewise.
++
++2009-10-07  Alexander Kurtakov  <akurtako at redhat.com>
++
++	* patches/eclipse-pde.build-add-package-build.patch: New file.
++	* build.xml: Apply pdebuild script patch.
++
 +2009-10-07  Andrew Overholt  <overholt at redhat.com>
 +
 +	* runtests.sh: Add missing line continuation.
@@ -152,7 +192,7 @@ diff -pruN eclipse-3.5.1/ChangeLog eclipse-3.5.1.new/ChangeLog
  2009-10-02  Alexander Kurtakov  <akurtako at redhat.com>
  
  	* buildSDKSource.sh: Update ecf tag to the one used for 3.5.1.
-@@ -9,7 +57,7 @@
+@@ -9,7 +73,7 @@
  2009-10-01  Alexander Kurtakov  <akurtako at redhat.com>
  
  	* pdebuild.xml: Use buildTag variable instead of hard-coded value.
@@ -161,7 +201,7 @@ diff -pruN eclipse-3.5.1/ChangeLog eclipse-3.5.1.new/ChangeLog
  2009-10-01  Alexander Kurtakov  <akurtako at redhat.com>
  
  	* pdebuild.properties: Sync buildId and buildTag with build.properties.
-@@ -19,7 +67,7 @@
+@@ -19,7 +83,7 @@
  
  	* build.properties: Separate buildId and buildTag.
  	* build.xml: Likewise.
@@ -170,7 +210,7 @@ diff -pruN eclipse-3.5.1/ChangeLog eclipse-3.5.1.new/ChangeLog
  2009-09-30  Alexander Kurtakov  <akurtako at redhat.com>
  
  	* eclipse-build-generatedScripts.tar.bz2: Regenerate for 3.5.1.
-@@ -52,7 +100,7 @@
+@@ -52,7 +116,7 @@
  	* patches/tests-nostyletask.patch: New file.
  	* build.xml: Apply patch to not use deprecated ant task.
  	* junitHelper.xml: Likewise.
@@ -189,6 +229,349 @@ diff -pruN eclipse-3.5.1/junitHelper.xml eclipse-3.5.1.new/junitHelper.xml
 -</project>
 \ Kein Zeilenumbruch am Dateiende.
 +</project>
+diff -pruN eclipse-3.5.1/patches/eclipse-pde.build-add-package-build.patch eclipse-3.5.1.new/patches/eclipse-pde.build-add-package-build.patch
+--- eclipse-3.5.1/patches/eclipse-pde.build-add-package-build.patch	1970-01-01 01:00:00.000000000 +0100
++++ eclipse-3.5.1.new/patches/eclipse-pde.build-add-package-build.patch	2009-10-08 10:43:20.983704000 +0200
+@@ -0,0 +1,339 @@
++### Eclipse Workspace Patch 1.0
++#P org.eclipse.pde.build
++Index: templates/package-build/prepare-build-dir.sh
++===================================================================
++RCS file: templates/package-build/prepare-build-dir.sh
++diff -N templates/package-build/prepare-build-dir.sh
++--- /dev/null	1 Jan 1970 00:00:00 -0000
+++++ templates/package-build/prepare-build-dir.sh	1 Jan 1970 00:00:00 -0000
++@@ -0,0 +1,105 @@
+++#!/bin/sh
+++
+++if [ $# -lt 2 ]; then
+++  echo "usage: $0 <path to source dir> <path to build dir>"
+++  exit 1
+++fi
+++
+++if [ ! -d $1 ]; then
+++  echo "usage: $0 <path to source dir> <path to build dir>"
+++  exit 1
+++fi
+++
+++SOURCEDIR=$1
+++BUILDDIR=$2
+++TESTING=$3
+++
+++echo "preparing files in $1 for buildfile generation ..."
+++mkdir -p $BUILDDIR
+++
+++# make some ant build files to extract the id from the feature.xml, plugin.xml or the fragment.xml
+++mkdir -p $BUILDDIR/tmp
+++BUILDFILE=$BUILDDIR/tmp/build.xml
+++
+++echo "<project default=\"main\">
+++	<target name=\"main\">
+++               	<xmlproperty file=\"@type at .xml\" collapseAttributes=\"true\"/>
+++		<fail unless=\"@type at .id\" message=\"feature.id not set\"/>
+++               	<echo message=\"\${@type at .id}\" />
+++        </target>
+++</project>" > $BUILDFILE
+++
+++for type in feature plugin fragment; do
+++  CURBUILDFILE=$BUILDDIR/tmp/$type-build.xml
+++  cat $BUILDFILE | sed "s|@type@|$type|" > $CURBUILDFILE
+++done
+++
+++# make the directories eclipse is expecting
+++echo "  making the 'features' and 'plugins' directories"
+++mkdir -p $BUILDDIR/features $BUILDDIR/plugins
+++
+++# make symlinks for the features
+++FEATURES=$(find $SOURCEDIR -name feature.xml)
+++find $SOURCEDIR -name feature.xml | while read f; do
+++  PROJECTDIR=$(dirname "$f")
+++  inSDK=1
+++  inSDK=$(echo $PROJECTDIR | grep -c $BUILDDIR)
+++  if [ $inSDK == 0 ]; then
+++    PROJECTNAME=$(ant -Dbasedir="$PROJECTDIR" -f $BUILDDIR/tmp/feature-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
+++    ERROR=""
+++    if [ -z "$PROJECTNAME" ]; then
+++      echo "ERROR: could not determine the feature id for $PROJECTDIR"
+++      if [ $TESTING != true ]; then
+++        exit 1
+++      else
+++        ERROR="yes"
+++      fi
+++    fi
+++
+++    if [ "x$ERROR" != "xyes" ]; then
+++      if [[ $TESTING != true || `echo $PROJECTNAME | grep "org.eclipse"` ]]; then
+++        echo "  making symlink: $BUILDDIR/features/$PROJECTNAME -> $PROJECTDIR"
+++        ln -sfT "$PROJECTDIR" $BUILDDIR/features/"$PROJECTNAME"
+++      fi
+++    fi
+++  fi
+++done
+++
+++# make symlinks for plugins and fragments
+++PLUGINDIRS=$(find $SOURCEDIR -name plugin.xml -o -name fragment.xml -o -name MANIFEST.MF | sed "s/plugin.xml//g" | sed "s/fragment.xml//g" | sed "s/META-INF\/MANIFEST.MF//" | sort | uniq)
+++find $SOURCEDIR -name plugin.xml -o -name fragment.xml -o -name MANIFEST.MF | sed "s/plugin.xml//g" | sed "s/fragment.xml//g" | sed "s/META-INF\/MANIFEST.MF//" | sort | uniq | while read dir; do
+++  PROJECTNAME=""
+++  ERROR=""
+++  inSDK=1
+++  inSDK=$(echo $dir | grep -c $BUILDDIR)
+++  if [ $inSDK == 0 ]; then
+++    if [ -e "$dir/META-INF/MANIFEST.MF" ]; then
+++      PROJECTNAME=$(grep Bundle-SymbolicName $dir/META-INF/MANIFEST.MF | cut --delimiter=';' -f 1 | cut --delimiter=' ' -f 2)
+++    elif [ -e "$dir/plugin.xml" ]; then
+++      PROJECTNAME=$(ant -Dbasedir=$dir -f $BUILDDIR/tmp/plugin-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
+++    elif [ -e "$dir/fragment.xml" ]; then
+++      PROJECTNAME=$(ant -Dbasedir=$dir -f $BUILDDIR/tmp/fragment-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
+++    fi
+++
+++    if [ -z "$PROJECTNAME"  ]; then
+++      echo "ERROR: could not determine the plugin or fragment id for $dir"
+++      if [ $TESTING != true ]; then
+++        exit 1
+++      else
+++        ERROR="yes"
+++      fi
+++    fi
+++
+++    if [ "x$ERROR" != "xyes" ]; then
+++      if [[ $TESTING != true || `echo $PROJECTNAME | grep "org.eclipse"` ]]; then
+++        echo "  making symlink: $BUILDDIR/plugins/$PROJECTNAME -> $dir"
+++        ln -sfT "$dir" $BUILDDIR/plugins/"$PROJECTNAME"
+++      fi
+++    fi;
+++
+++  fi
+++
+++done
+++
+++rm -rf $BUILDDIR/tmp
+++echo done
++Index: templates/package-build/customTargets-assemble-target.xml
++===================================================================
++RCS file: templates/package-build/customTargets-assemble-target.xml
++diff -N templates/package-build/customTargets-assemble-target.xml
++--- /dev/null	1 Jan 1970 00:00:00 -0000
+++++ templates/package-build/customTargets-assemble-target.xml	1 Jan 1970 00:00:00 -0000
++@@ -0,0 +1,15 @@
+++<project>
+++	<!-- ===================================================================== -->
+++	<!-- Targets to assemble the built elements for particular configurations  -->
+++	<!-- These generally call the generated assemble scripts (named in -->
+++	<!-- ${assembleScriptName}) but may also add pre and post processing -->
+++	<!-- Add one target for each root element and each configuration -->
+++	<!-- ===================================================================== -->
+++
+++	<target name="assemble. at id@">
+++		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+++	</target>
+++	<target name="assemble. at id@. at configs@">
+++		<ant antfile="${assembleScriptName}" dir="${buildDirectory}" />
+++	</target>
+++</project>
++Index: templates/package-build/customTargets.xml
++===================================================================
++RCS file: templates/package-build/customTargets.xml
++diff -N templates/package-build/customTargets.xml
++--- /dev/null	1 Jan 1970 00:00:00 -0000
+++++ templates/package-build/customTargets.xml	1 Jan 1970 00:00:00 -0000
++@@ -0,0 +1,149 @@
+++<project name="Build specific targets and properties" default="noDefault">
+++
+++	<fail unless="type" message="Please set the ${type} property to 'feature', 'plugin' or 'fragment'." />
+++	<fail unless="id" message="Please set the ${id} property to the feature, plugin or fragment id of the plugin you are building." />
+++	<fail unless="sourceDirectory" message="Please set the ${sourceDirectory} property to the directory that has the source plugins." />
+++
+++	<!-- we need to do this because you can't expand variables in target names -->
+++	<copy file="${builder}/customTargets-assemble-target.xml" tofile="${buildDirectory}/customTargets-${id}-assemble-target.xml" />
+++	<replace file="${buildDirectory}/customTargets-${id}-assemble-target.xml" token="@id@" value="${id}" />
+++	<replace file="${buildDirectory}/customTargets-${id}-assemble-target.xml" token="@configs@" value="${configs}" />              
+++	<replace file="${buildDirectory}/customTargets-${id}-assemble-target.xml" token="," value="." />              
+++	<import file="${buildDirectory}/customTargets-${id}-assemble-target.xml" />
+++
+++	<!-- ===================================================================== -->
+++	<!-- Run a given ${target} on all elements being built -->
+++	<!-- Add on <ant> task for each top level element being built. -->
+++	<!-- ===================================================================== -->
+++	<target name="allElements">
+++		<ant antfile="${genericTargets}" target="${target}">
+++			<property name="type" value="${type}" />
+++			<property name="id" value="${id}" />
+++		</ant>
+++	</target>
+++
+++
+++	<!-- ===================================================================== -->
+++	<!-- Check out map files from correct repository -->
+++	<!-- ===================================================================== -->
+++	<target name="getMapFiles">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++
+++	<target name="clean" unless="noclean">
+++		<antcall target="allElements">
+++			<param name="target" value="cleanElement" />
+++		</antcall>
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do before setup -->
+++	<!-- ===================================================================== -->
+++	<target name="preSetup">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do after setup but before starting the build proper -->
+++	<!-- ===================================================================== -->
+++	<target name="postSetup">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do before fetching the build elements -->
+++	<!-- ===================================================================== -->
+++	<target name="preFetch">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do after fetching the build elements -->
+++	<!-- ===================================================================== -->
+++	<target name="postFetch">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do before generating the build scripts. -->
+++	<!-- ===================================================================== -->
+++	<target name="preGenerate">
+++		<!-- Eclipse expects the feature projects to be in the 'features' directory and
+++   		plugin projects to be in the 'plugins' directory. The build infrastructure
+++		normally arranges the projects during the fetch stage. Since we aren't doing
+++ 		the fetch stage, we have to manually arrange the files -->
+++		<exec dir="${builder}" executable="/bin/sh">
+++			<arg line="prepare-build-dir.sh ${sourceDirectory} ${buildDirectory} ${testing}" />
+++		</exec>
+++		<exec dir="${builder}" executable="/bin/sh">
+++		    <arg line="symlink-deps.sh ${buildDirectory} ${orbitDepsDir}" />
+++		</exec>
+++
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do after generating the build scripts. -->
+++	<!-- ===================================================================== -->
+++	<target name="postGenerate">
+++		<antcall target="clean" />
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do before running the build.xmls for the elements being built. -->
+++	<!-- ===================================================================== -->
+++	<target name="preProcess">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do after running the build.xmls for the elements being built. -->
+++	<!-- ===================================================================== -->
+++	<target name="postProcess">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do before running assemble. -->
+++	<!-- ===================================================================== -->
+++	<target name="preAssemble">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do after  running assemble. -->
+++	<!-- ===================================================================== -->
+++	<target name="postAssemble">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do before running package. -->
+++	<!-- ===================================================================== -->
+++	<target name="prePackage">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do after  running package. -->
+++	<!-- ===================================================================== -->
+++	<target name="postPackage">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do after the build is done. -->
+++	<!-- ===================================================================== -->
+++	<target name="postBuild">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do to test the build results -->
+++	<!-- ===================================================================== -->
+++	<target name="test">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Steps to do to publish the build results -->
+++	<!-- ===================================================================== -->
+++	<target name="publish">
+++	</target>
+++
+++	<!-- ===================================================================== -->
+++	<!-- Default target                                                        -->
+++	<!-- ===================================================================== -->
+++	<target name="noDefault">
+++		<echo message="You must specify a target when invoking this file" />
+++	</target>
+++
+++</project>
++Index: templates/package-build/build.properties
++===================================================================
++RCS file: templates/package-build/build.properties
++diff -N templates/package-build/build.properties
++--- /dev/null	1 Jan 1970 00:00:00 -0000
+++++ templates/package-build/build.properties	1 Jan 1970 00:00:00 -0000
++@@ -0,0 +1,12 @@
+++buildDirectory=${sourceDirectory}/build
+++buildLabel=rpmBuild
+++archivePrefix=eclipse
+++skipFetch=true
+++javacFailOnError=true
+++collectingFolder=eclipse
+++archivesFormat=*,*,*-zip
+++zipargs=-y
+++javacDebugInfo=true
+++archiveName=${id}.zip
+++runPackager=false
+++baseLocation=/usr/share/eclipse
++Index: templates/package-build/symlink-deps.sh
++===================================================================
++RCS file: templates/package-build/symlink-deps.sh
++diff -N templates/package-build/symlink-deps.sh
++--- /dev/null	1 Jan 1970 00:00:00 -0000
+++++ templates/package-build/symlink-deps.sh	1 Jan 1970 00:00:00 -0000
++@@ -0,0 +1,21 @@
+++#!/bin/sh -x
+++
+++if [ $# -ne 2 ]; then
+++  echo "usage: $0 <path to build dir> <dependencies>"
+++  exit 1
+++fi
+++
+++if [ ! -d $1 ]; then
+++  echo "usage: $0 <path to build dir> <dependencies>"
+++  exit 1
+++fi
+++
+++BUILDDIR=$1
+++DEPENDENCIESDIR=$2
+++
+++pushd $BUILDDIR/plugins
+++  for dep in `ls $DEPENDENCIESDIR`; do
+++      echo "ln -s $DEPENDENCIESDIR/$dep"
+++      ln -s $DEPENDENCIESDIR/$dep
+++  done
+++popd
 diff -pruN eclipse-3.5.1/patches/gtk2.18zorder.patch eclipse-3.5.1.new/patches/gtk2.18zorder.patch
 --- eclipse-3.5.1/patches/gtk2.18zorder.patch	1970-01-01 01:00:00.000000000 +0100
 +++ eclipse-3.5.1.new/patches/gtk2.18zorder.patch	2009-10-06 17:06:09.903152000 +0200
@@ -411,6 +794,394 @@ diff -pruN eclipse-3.5.1/patches/gtk2.18zorder.patch eclipse-3.5.1.new/patches/g
 + /** @param window cast=(GdkWindow *) */
 + public static final native void _gdk_window_scroll(int /*long*/ window, int dx, int dy);
 + public static final void gdk_window_scroll(int /*long*/ window, int dx, int dy) {
+diff -pruN eclipse-3.5.1/pdebuild/eclipse-copy-platform.sh eclipse-3.5.1.new/pdebuild/eclipse-copy-platform.sh
+--- eclipse-3.5.1/pdebuild/eclipse-copy-platform.sh	1970-01-01 01:00:00.000000000 +0100
++++ eclipse-3.5.1.new/pdebuild/eclipse-copy-platform.sh	2009-10-08 11:04:18.677711000 +0200
+@@ -0,0 +1,77 @@
++#! /bin/sh
++
++# We need to make our own copy of the eclipse platform in order to
++# build against it.  We do this since the build root might already
++# contain a copy of the plugin we are building -- and the eclipse
++# releng scripts fail in this situation.  We put this script in the
++# eclipse core so that it is easy to use from other spec files.
++
++# Arguments are:
++# * directory where results should end up (script will make it)
++# * base location of eclipse platform install
++# * an optional string that is used to select non-platform
++#   plugins and features.  At present if a plugin or feature has
++#   this as a substring, it will be included.  You need only run
++#   this script once, it will link both the platform and the other
++#   optionally-selected parts in a single invocation.
++
++# Test to see if the minimum arguments
++# are specified
++
++if [ $# -lt 2 ]; then
++  echo "Usage: copy-platform where eclipse_base optional_directories"
++  echo "For example: copy-plaform ~/SDK /usr/lib/eclipse cdt pydev jdt"
++  exit 1
++fi
++
++where=$1; shift
++eclipse=$1; shift
++
++datadir=/usr/share/eclipse
++
++mkdir -p $where/plugins $where/features
++cd $where
++
++# Are there any optional arguments left?
++if [ $# -gt 0 ]; then
++   for optional in "$@"; do
++      (cd $eclipse; ls -d plugins/*"$optional"* features/*"$optional"*) |
++      while read f; do
++         [ ! -e $f ] && ln -s $eclipse/$f $f
++      done
++      (cd $eclipse/dropins; ls -d *"$optional"*) |
++      while read f; do
++	  if [ -e $eclipse/dropins/$f/eclipse ]; then
++	      (cd $eclipse/dropins/$f/eclipse; ls -d plugins/* features/*) |
++	      while read g; do
++		  [ ! -e $g ] && \
++		    ln -s $eclipse/dropins/$f/eclipse/$g $g
++	      done
++          else
++	      (cd $eclipse/dropins/$f; ls -d plugins/* features/*) |
++	      while read g; do
++	          [ ! -e $g ] && \
++		    ln -s $eclipse/dropins/$f/$g $g
++	      done
++          fi
++      done
++      (cd $datadir/dropins; ls -d *"$optional"*) |
++      while read f; do
++	  if [ -e $datadir/dropins/$f/eclipse ]; then
++	      (cd $datadir/dropins/$f/eclipse; ls -d plugins/* features/*) |
++	      while read g; do
++		  [ ! -e $g ] && \
++		    ln -s $datadir/dropins/$f/eclipse/$g $g
++	      done
++          else
++	      (cd $datadir/dropins/$f; ls -d plugins/* features/*) |
++	      while read g; do
++	          [ ! -e $g ] && \
++		    ln -s $datadir/dropins/$g $g
++	      done
++          fi
++      done
++   done
++fi
++
++# Code after this point is automatically created by eclipse.spec.
+diff -pruN eclipse-3.5.1/pdebuild/eclipse-pdebuild.sh eclipse-3.5.1.new/pdebuild/eclipse-pdebuild.sh
+--- eclipse-3.5.1/pdebuild/eclipse-pdebuild.sh	1970-01-01 01:00:00.000000000 +0100
++++ eclipse-3.5.1.new/pdebuild/eclipse-pdebuild.sh	2009-10-08 11:04:18.677711000 +0200
+@@ -0,0 +1,303 @@
++#!/bin/bash
++
++# args:  [-f <feature>] [-d <dependencies (outside SDK)>] [-a <additional build args>] [-j <JVM args>] [-v] [-D] [-o <Orbit dependencies>]
++
++function usage {
++cat << _EOF_
++usage: $0 [<options>]
++
++Use PDE Build to build Eclipse features
++
++Optional arguments:
++   -h      Show this help message
++   -f      Feature ID to build
++   -d      Plugin dependencies in addition to Eclipse SDK
++           (space-separated, names on which to glob features and plugins)
++   -a      Additional build arguments (ex. -DjavacSource=1.5)
++   -j      VM arguments (ex. -DJ2SE-1.5=%{_jvmdir}/java/jre/lib/rt.jar)
++   -v      Be verbose
++   -D      Debug platform itself (passes -consolelog -debug to Eclipse)
++   -o      Directory containing Orbit-style dependencies
++   -z      Comma-delimited list of dependency zips (not for use during RPM build)
++_EOF_
++}
++
++function copyPlatform {
++    # This seems silly but I was running into issues with empty strings
++    # counting as arguments to copy-platform -- overholt, 2008-03
++    if [ -z "$dependencies" ]; then
++        if [ $verbose -eq 1 ]; then
++            echo "/bin/sh -x $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse"
++            /bin/sh -x $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse
++        else
++            echo "/bin/sh $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse"
++            /bin/sh $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse
++        fi
++    else
++        if [ $verbose -eq 1 ]; then
++            echo "/bin/sh -x $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse $dependencies"
++            /bin/sh -x $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse $dependencies
++        else
++            echo "/bin/sh $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse $dependencies"
++            /bin/sh $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse $dependencies
++        fi
++    fi
++}
++
++function findFeatureId {
++    # We can determine the feature ID if we have only one
++    numFeatures=$(find $sourceDir -name feature.xml | wc -l)
++    if [ $numFeatures -ne 1 ]; then
++        #echo "# features found = $numFeatures"
++        echo "Cannot determine feature ID.  Please specify with -f."
++        usage
++        exit 1
++    fi
++    
++    featureXml=$(find $sourceDir -name feature.xml)
++    
++    # Taken from Ben Konrath's package-build
++    # make an ant build files to extract the id from the feature.xml
++    buildFile=$buildDir/findFeatureForRPM-tmp-build.xml
++    
++    echo "<project default=\"main\">
++    	<target name=\"main\">
++                   	<xmlproperty file=\"$featureXml\" collapseAttributes=\"true\"/>
++    		<fail unless=\"feature.id\" message=\"feature.id not set\"/>
++                   	<echo message=\"\${feature.id}\" />
++            </target>
++    </project>" > $buildFile
++    
++    featureId=$(ant -Dbasedir=$sourceDir -f $buildFile 2>&1 | grep echo | cut --delimiter=' ' -f 7)
++    rm $buildFile
++}
++
++function findFeatureNameAndVersion {
++    featureXml=$(find $sourceDir -name feature.xml | while read f; do grep -l id=\"$featureId\" $f; done)
++    
++    buildFile=$buildDir/findFeatureForRPM-tmp-build.xml
++    
++    echo "<project default=\"main\">
++    	<target name=\"main\">
++                   	<xmlproperty file=\"$featureXml\" collapseAttributes=\"true\"/>
++    		<fail unless=\"feature.id\" message=\"feature.id not set\"/>
++                   	<echo message=\"\${feature.label}\" />
++            </target>
++    </project>" > $buildFile
++    
++    featureName=$(ant -Dbasedir=$sourceDir -f $buildFile 2>&1 | grep echo | sed "s/.*\[echo\]\ //")
++    rm $buildFile
++
++    echo "<project default=\"main\">
++    	<target name=\"main\">
++                   	<xmlproperty file=\"$featureXml\" collapseAttributes=\"true\"/>
++    		<fail unless=\"feature.id\" message=\"feature.id not set\"/>
++                   	<echo message=\"\${feature.version}\" />
++            </target>
++    </project>" > $buildFile
++    
++    featureVersion=$(ant -Dbasedir=$sourceDir -f $buildFile 2>&1 | grep echo | sed "s/.*\[echo\]\ //")
++    rm $buildFile
++}
++
++function findMaxBREE {
++	manifests=$(find $sourceDir -name MANIFEST.MF)
++	maxBree=1.4
++	for i in $manifests; do
++		breeLine=$(cat $i|grep RequiredExecutionEnvironment|cut -c37-|sed 's/^ *\(.*\) *$/\1/')
++		case $breeLine in
++         "J2SE-1.5")
++         	 bree=1.5
++             ;;
++         "JavaSE-1.6")
++         	 bree=1.6
++             ;;
++     	esac
++     	if [ "$bree" \> "$maxBree" ]; then
++     		maxBree=$bree
++     	fi
++    done
++}
++
++sourceDir=$PWD
++buildDir=$PWD/build
++SDK=$buildDir/SDK
++homeDir=$buildDir/home
++datadir=`rpm --eval "%{_libdir}"`
++pdeBuildDir=$datadir/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_ at PDEBUILDVERSION@
++
++featureId=
++dependencies=
++additionalArgs=
++vmArgs=
++verbose=0
++dryRun=0
++debugPlatform=0
++orbitDepsDir=
++p2Generate=
++testing=false
++zipDeps=
++
++# See above.  r = dry run (used for testing)
++while getopts “hf:d:z:a:j:tvrDo:” OPTION
++do
++     case $OPTION in
++         h)
++             usage
++             exit
++             ;;
++         f)
++             featureId=$OPTARG
++             ;;
++         d)
++             dependencies=$OPTARG
++             ;;
++         a)
++             additionalArgs=$OPTARG
++             ;;
++         j)
++             vmArgs=$OPTARG
++             ;;
++         t)
++             testing=true
++             ;;
++         v)
++             verbose=1
++             ;;
++         r)
++             dryRun=1
++             ;;
++         D)
++             debugPlatform=1
++             ;;
++         o)
++             orbitDepsDir=$OPTARG
++             ;;
++         z)
++             zipDeps=$OPTARG
++             ;;
++         ?)
++             usage
++             exit
++             ;;
++     esac
++done
++
++echo "mkdir -p $buildDir"
++if [ $dryRun -ne 1 ]; then
++    mkdir -p $buildDir
++fi
++
++# Eclipse may try to write to the building user's home directory so we create a
++# temporary one for use by the build.
++echo "mkdir -p $homeDir"
++if [ $dryRun -ne 1 ]; then
++    mkdir -p $homeDir
++fi
++
++if [ -z $featureId ]; then
++    findFeatureId
++fi
++
++if [ -z $featureId ]; then
++    echo "Cannot determine feature ID.  Please specify with -f."
++    usage
++    exit 1
++fi
++
++findFeatureNameAndVersion
++
++echo "Building feature = $featureId."
++
++if [ -z "$dependencies" ]; then
++    if [ $verbose -eq 1 ]; then
++        echo "Assuming no dependencies except Eclipse SDK."
++    fi
++fi
++
++# Symlink the SDK and dependencies for build
++if [ -z "$dependencies" ]; then
++    echo "Symlinking SDK into $SDK directory."
++else
++    echo "Symlinking SDK and \"$dependencies\" into $SDK directory."
++fi
++if [ $dryRun -ne 1 ]; then
++    copyPlatform
++fi
++
++if [ $debugPlatform -eq 1 ]; then
++    debugPlatformArgs="-debug -consolelog"
++fi
++
++if [ "x$orbitDepsDir" != "x" ]; then
++    orbitDeps="-DorbitDepsDir=\"$orbitDepsDir\""
++fi
++
++if [ "x$zipDeps" != "x" ]; then
++    OLD_IFS="$IFS"
++    IFS=","
++    zipDepsArray=($zipDeps)
++    IFS="$OLD_IFS"
++    numZips=${#zipDepsArray[@]}
++    for (( i=0; i< $numZips; i++ )); do
++        thisZip=${zipDepsArray[$i]}
++        thisFile=$(basename $thisZip)
++        thisURL=$(echo $thisZip | sed s/$thisFile//)
++        if [ ! -e $thisFile ]; then
++            wget -q $thisZip
++        fi
++        mkdir -p tmp
++        unzip -q -o $thisFile -d tmp
++        cp -raf tmp/eclipse/features/* $SDK/features
++        cp -raf tmp/eclipse/plugins/* $SDK/plugins
++        rm -rf tmp
++        thisZip=
++        thisFile=
++        thisURL=
++    done
++fi
++if [ -z "$additionalArgs" ]; then
++	findMaxBREE
++	additionalArgs="-DjavacSource=$maxBree -DjavacTarget=$maxBree"
++fi
++
++echo "Starting build:"
++
++if [ $testing != true ]; then
++  java -cp $SDK/startup.jar \
++    org.eclipse.core.launcher.Main \
++    -application org.eclipse.ant.core.antRunner \
++    $debugPlatformArgs \
++    -Dtype=feature \
++    -Did=$featureId \
++    -DbaseLocation=$SDK \
++    -DsourceDirectory=$sourceDir \
++    -DbuildDirectory=$buildDir \
++    -Dbuilder=$datadir/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_ at PDEBUILDVERSION@/templates/package-build \
++    $orbitDeps \
++    -Dtesting="$testing" \
++    $additionalArgs \
++    -f $pdeBuildDir/scripts/build.xml \
++    -vmargs \
++    -Duser.home=$homeDir \
++    $vmArgs
++
++else
++  java -cp $SDK/startup.jar \
++    org.eclipse.core.launcher.Main \
++    -application org.eclipse.ant.core.antRunner \
++    $debugPlatformArgs \
++    -Dtype=feature \
++    -Did=$featureId \
++    -DbaseLocation=$SDK \
++    -DsourceDirectory=$sourceDir \
++    -DbuildDirectory=$buildDir \
++    -Dbuilder=$datadir/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_ at PDEBUILDVERSION@/templates/package-build \
++    $orbitDeps \
++    -Dtesting="$testing" \
++    $additionalArgs \
++    -f $pdeBuildDir/scripts/build.xml \
++    -vmargs \
++    -Duser.home=$homeDir \
++    $vmArgs
++fi
 diff -pruN eclipse-3.5.1/README.mediawiki eclipse-3.5.1.new/README.mediawiki
 --- eclipse-3.5.1/README.mediawiki	2009-10-06 00:36:21.000000000 +0200
 +++ eclipse-3.5.1.new/README.mediawiki	2009-10-06 18:19:12.204806000 +0200
diff --git a/debian/patches/series b/debian/patches/series
index 3eb8642..8e1779e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
 eclipse-build.patch
-buildEquinoxInitializer.patch
 fix-perm.patch
diff --git a/debian/rules b/debian/rules
index 6bc802b..3db6222 100755
--- a/debian/rules
+++ b/debian/rules
@@ -135,3 +135,5 @@ debian-install-stamp:
 	TO_CORRECT=`echo $(CURDIR)/debian/tmp | sed s@/@_ at g` ; grep -l -I -r debian_tmp debian/tmp/ | xargs sed -i s@$${TO_CORRECT}@@g
 	# remove extra licence file
 	rm -f debian/tmp/usr/lib/eclipse/plugins/org.apache.ant_*/about_files/LICENSE.sax.txt
+	# wrapper script for setting LD_LIBRARY_PATH
+	install -m 755 debian/extra/eclipse $(DEB_DESTDIR)usr/bin/eclipse


hooks/post-receive
-- 
eclipse - Powerful IDE written in java - Debian package.



More information about the pkg-java-commits mailing list