~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to packaging/macosx/Resources/script

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Ted Gould, Kees Cook
  • Date: 2009-06-24 14:00:43 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624140043-07stp20mry48hqup
Tags: 0.47~pre0-0ubuntu1
* New upstream release

[ Ted Gould ]
* debian/control: Adding libgsl0 and removing version specifics on boost

[ Kees Cook ]
* debian/watch: updated to run uupdate and mangle pre-release versions.
* Dropped patches that have been taken upstream:
  - 01_mips
  - 02-poppler-0.8.3
  - 03-chinese-inkscape
  - 05_fix_latex_patch
  - 06_gcc-4.4
  - 07_cdr2svg
  - 08_skip-bad-utf-on-pdf-import
  - 09_gtk-clist
  - 10_belarussian
  - 11_libpng
  - 12_desktop
  - 13_slider
  - 100_svg_import_improvements
  - 102_sp_pattern_painter_free
  - 103_bitmap_type_print

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# Author: Aaron Voisine <aaron@voisine.org>
4
4
# Inkscape Modifications: Michael Wybrow <mjwybrow@users.sourceforge.net>
5
5
 
6
 
CWD="`dirname \"$0\"`"
 
6
CWD=`dirname "$0"`
7
7
 
8
8
# System version: 3 for Panther, 4 for Tiger, 5 for Leopard
9
 
VERSION=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 -d'.'`
 
9
export VERSION=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 -d'.'`
10
10
 
11
11
# On Leopard, X11.app is installed by default, and will be started
12
12
# automatically via launchd.  On older systems, we need to start 
18
18
        # from xinitrc but when is it really used? Should we modify 
19
19
        # the .xinitrc of the user without warning?
20
20
        ps -wx -ocommand | grep -e '[X]11' > /dev/null
21
 
        if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
22
 
            echo "rm -f ~/.xinitrc" > ~/.xinitrc
23
 
            sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc
 
21
        if [ "$?" != "0" -a ! -f "${HOME}/.xinitrc" ]; then
 
22
            echo "rm -f \"\${HOME}/.xinitrc\"" > "${HOME}/.xinitrc"
 
23
            sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> "${HOME}/.xinitrc"
24
24
        fi
25
25
 
26
26
        # Start X11 and get DISPLAY
 
27
        # FIXME: Insecure tmp file usage.  Why do we have to copy this to /tmp anyway?
27
28
        cp -f "$CWD/bin/getdisplay.sh" /tmp/
28
29
        rm -f /tmp/display.$UID
29
30
        open-x11 /tmp/getdisplay.sh || \
33
34
        while [ "$?" == "0" -a ! -f /tmp/display.$UID ]; do
34
35
            sleep 1
35
36
        done
36
 
        export DISPLAY="`cat /tmp/display.$UID`"
 
37
        export DISPLAY=`cat /tmp/display.$UID`
37
38
 
38
39
        ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11
 
40
        
 
41
        # Warn the user about time-consuming generation of fontconfig caches.
 
42
        test -f "${HOME}/.inkscape/.fccache-new" || exit 12
 
43
else
 
44
        # Leopard onwards...
 
45
 
 
46
        # Warn the user about time-consuming generation of fontconfig caches.
 
47
        test -d "${HOME}/.fontconfig" || exit 12
39
48
fi
40
49
 
41
50
 
42
 
# Warn the user about time-consuming generation of fontconfig caches.
43
 
test -f ~/.inkscape/.fccache-new || exit 12
44
 
 
45
 
 
46
 
BASE="`echo "$0" | sed -e 's/\/Contents\/Resources\/script/\//'`"
 
51
 
 
52
BASE=`echo "$0" | sed -e 's/\/Contents\/Resources\/script/\//'`
47
53
cd "$BASE"
48
54
exec "$CWD/bin/inkscape" "$@"
49
 
# TODO examine wether it would be wisest to move the code from inkscape shell
 
55
# TODO examine whether it would be wisest to move the code from inkscape shell
50
56
# script and getdisplay.sh to here and only keep the real binary in bin. This
51
57
# may make things easier on Leopard and may also help using Inkscape on the
52
 
# command line
 
58
# command line.
53
59