r1922 - in trunk/eclipse/debian: . extra

Matthias Klose doko at costa.debian.org
Sat Feb 18 00:43:45 UTC 2006


Author: doko
Date: 2006-02-18 00:43:44 +0000 (Sat, 18 Feb 2006)
New Revision: 1922

Modified:
   trunk/eclipse/debian/changelog
   trunk/eclipse/debian/extra/eclipse.sh
   trunk/eclipse/debian/rules
Log:
  * debian/extra/eclipse.sh: Make sure to use /usr/lib/mozilla as
    MOZILLA_HOME in any case.
  * debian/rules: Set a default for MOZILLA_HOME.


Modified: trunk/eclipse/debian/changelog
===================================================================
--- trunk/eclipse/debian/changelog	2006-02-17 12:25:47 UTC (rev 1921)
+++ trunk/eclipse/debian/changelog	2006-02-18 00:43:44 UTC (rev 1922)
@@ -11,6 +11,9 @@
 
   [ Matthias Klose ]
   * debian/control.in: eclipse replaces eclipse-platform (<< 3.1.2-2).
+  * debian/extra/eclipse.sh: Make sure to use /usr/lib/mozilla as
+    MOZILLA_HOME in any case.
+  * debian/rules: Set a default for MOZILLA_HOME.
 
  -- Michael Koch <konqueror at gmx.de>  Thu, 16 Feb 2006 08:52:25 +0000
 

Modified: trunk/eclipse/debian/extra/eclipse.sh
===================================================================
--- trunk/eclipse/debian/extra/eclipse.sh	2006-02-17 12:25:47 UTC (rev 1921)
+++ trunk/eclipse/debian/extra/eclipse.sh	2006-02-18 00:43:44 UTC (rev 1922)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Having any sort of classpath causes massive breakage, with Kaffe at least.
 unset CLASSPATH; export CLASSPATH
@@ -124,14 +124,30 @@
 fi
 
 # Set path for the Mozilla SWT binding
-if [ -e /usr/lib/firefox/libgtkembedmoz.so ]; then
+MOZILLA_FIVE_HOME=${MOZILLA_FIVE_HOME%*/}
+if [ -n "$MOZILLA_FIVE_HOME" -a -e $MOZILLA_FIVE_HOME/libgtkembedmoz.so ]; then
+    :
+elif [ -e @MOZILLA_FIVE_HOME_DEFAULT@/libgtkembedmoz.so ]; then
+    export MOZILLA_FIVE_HOME=@MOZILLA_FIVE_HOME_DEFAULT@
+elif [ -e /usr/lib/mozilla/libgtkembedmoz.so ]; then
+    export MOZILLA_FIVE_HOME=/usr/lib/mozilla
+elif [ -e /usr/lib/firefox/libgtkembedmoz.so ]; then
     export MOZILLA_FIVE_HOME=/usr/lib/firefox
 elif [ -e /usr/lib/mozilla-firefox/libgtkembedmoz.so ]; then
     export MOZILLA_FIVE_HOME=/usr/lib/mozilla-firefox
-elif [ -e /usr/lib/mozilla/libgtkembedmoz.so ]; then
-    export MOZILLA_FIVE_HOME=/usr/lib/mozilla
 fi
+# now forget everything ... everything besides mozilla doesn't work
+if [ "$MOZILLA_FIVE_HOME" != "/usr/lib/mozilla" ]; then
+        $DIALOG \
+            --error \
+            --title="Could not launch Eclipse Platform" \
+            --text="Eclipse currently only works with the mozilla browser. Please make sure that the package mozilla-browser is installed and MOZILLA_FIVE_HOME is either unset or points to /usr/lib/mozilla"
+	exit 1
+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}" \

Modified: trunk/eclipse/debian/rules
===================================================================
--- trunk/eclipse/debian/rules	2006-02-17 12:25:47 UTC (rev 1921)
+++ trunk/eclipse/debian/rules	2006-02-18 00:43:44 UTC (rev 1922)
@@ -155,6 +155,7 @@
   BUILD_DEPS += , mozilla-dev
 #  MOZILLA_DEP = mozilla-browser (>= 2:1.7.0) | firefox (>= 1.4.99) | mozilla-firefox (>= 1.0.7)
   MOZILLA_DEP = mozilla-browser (>= 2:1.7.0)
+  MOZILLA_HOME = /usr/lib/mozilla
 endif
 
 ifeq ($(with_browser),firefox)
@@ -164,6 +165,7 @@
   BUILD_DEPS += , firefox-dev
 #  MOZILLA_DEP = firefox (>= 1.4.99) | mozilla-browser (>= 2:1.7.0) | mozilla-firefox (>= 1.0.7)
   MOZILLA_DEP = firefox (>= 1.4.99)
+  MOZILLA_HOME = /usr/lib/firefox
 endif
 
 export PATCHLIST = $(eclipse_patches)
@@ -482,7 +484,9 @@
 	mkdir -p                                    $(DEBIAN_TMP)/usr/share/applications/
 	cp $(EXTRA)/eclipse.desktop                 $(DEBIAN_TMP)/usr/share/applications/eclipse.desktop
 	mkdir -p                                    $(DEBIAN_TMP)/usr/bin/
-	cp $(EXTRA)/eclipse.sh                      $(DEBIAN_TMP)/usr/bin/eclipse
+	sed 's/@MOZILLA_FIVE_HOME_DEFAULT@/$(MOZILLA_HOME)/g $(EXTRA)/eclipse.sh \
+	    > $(DEBIAN_TMP)/usr/bin/eclipse
+	chmod 755 $(DEBIAN_TMP)/usr/bin/eclipse
 	cp $(EXTRA)/ecj.sh                          $(DEBIAN_TMP)/usr/bin/ecj-java
 	cp $(EXTRA)/efj.sh                          $(DEBIAN_TMP)/usr/bin/efj
 	mkdir -p                                    $(DEBIAN_TMP)/usr/share/pixmaps/




More information about the pkg-java-commits mailing list