[40738] trunk/dports/aqua/gimp-app

devans at macports.org devans at macports.org
Mon Oct 13 09:51:38 PDT 2008


Revision: 40738
          http://trac.macports.org/changeset/40738
Author:   devans at macports.org
Date:     2008-10-13 09:51:37 -0700 (Mon, 13 Oct 2008)
Log Message:
-----------
Update start up script to work with Leopard.  Thanks to dersh at alum.mit.edu for script modifications. (#16516)

Modified Paths:
--------------
    trunk/dports/aqua/gimp-app/Portfile

Added Paths:
-----------
    trunk/dports/aqua/gimp-app/files/script

Modified: trunk/dports/aqua/gimp-app/Portfile
===================================================================
--- trunk/dports/aqua/gimp-app/Portfile	2008-10-13 16:38:12 UTC (rev 40737)
+++ trunk/dports/aqua/gimp-app/Portfile	2008-10-13 16:51:37 UTC (rev 40738)
@@ -5,6 +5,7 @@
 
 name            gimp-app
 version         2.6.0
+revision        1
 maintainers     devans
 description     Gimp.app application bundle
 long_description ${description}
@@ -26,6 +27,8 @@
         delete ${workpath}/Gimp.app/Contents/$f
         xinstall -m 644 ${filespath}/$f ${workpath}/Gimp.app/Contents
     }
+    delete ${workpath}/Gimp.app/Contents/Resources/script
+    xinstall -m 755 ${filespath}/script ${workpath}/Gimp.app/Contents/Resources
     reinplace "s|__VERSION__|${version}|g" ${workpath}/Gimp.app/Contents/Info.plist
 }
 

Added: trunk/dports/aqua/gimp-app/files/script
===================================================================
--- trunk/dports/aqua/gimp-app/files/script	                        (rev 0)
+++ trunk/dports/aqua/gimp-app/files/script	2008-10-13 16:51:37 UTC (rev 40738)
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# Author: Aaron Voisine <aaron at voisine.org>
+
+CWD="`dirname \"$0\"`"
+
+# System version: 3 for Panther, 4 for Tiger, 5 for Leopard
+export VERSION=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 -d'.'`
+
+# On Leopard, X11.app is installed by default, and will be started
+# automatically via launchd.  On older systems, we need to start
+# X11 ourself.
+
+# For Panther and Tiger, start X11
+if [[ $VERSION -le 4 ]]; then
+
+        ps -wx -ocommand | grep -e '[X]11' > /dev/null
+        if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
+                echo "rm -f ~/.xinitrc" > ~/.xinitrc
+                sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc
+        fi
+       
+        cp -f "$CWD/bin/getdisplay.sh" /tmp/
+        rm -f /tmp/display.$UID
+        open-x11 /tmp/getdisplay.sh || \
+        open -a XDarwin /tmp/getdisplay.sh || \
+        echo ":0" > /tmp/display.$UID
+       
+        while [ "$?" == "0" -a ! -f /tmp/display.$UID ]; do
+                sleep 1
+        done
+        export "DISPLAY=`cat /tmp/display.$UID`"
+       
+        ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11
+
+fi
+
+cd ~/
+exec "$CWD/bin/gimp" "$@"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20081013/72a0f428/attachment.html 


More information about the macports-changes mailing list