summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2014-09-08 01:32:48 +0000
committer~suv <suv-sf@users.sourceforge.net>2014-09-08 01:32:48 +0000
commit99f62f496173d577426f7827a7dce453e89969a7 (patch)
tree5dadea5460511844ce43d4c31d58ac1db8f33bd2 /packaging
parentupdate to trunk (r13547) (diff)
downloadinkscape-99f62f496173d577426f7827a7dce453e89969a7.tar.gz
inkscape-99f62f496173d577426f7827a7dce453e89969a7.zip
add initial support for Quartz backend (no gtk-mac-integration, no native shortcut modifiers)
(bzr r13506.1.74)
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/macosx/Resources/bin/inkscape9
-rwxr-xr-xpackaging/macosx/ScriptExec/launcher-quartz-no-macintegration.sh183
-rwxr-xr-xpackaging/macosx/osx-app.sh201
3 files changed, 352 insertions, 41 deletions
diff --git a/packaging/macosx/Resources/bin/inkscape b/packaging/macosx/Resources/bin/inkscape
index acc3a5ec7..3ba4672fe 100755
--- a/packaging/macosx/Resources/bin/inkscape
+++ b/packaging/macosx/Resources/bin/inkscape
@@ -13,7 +13,7 @@ CWD="$(cd "$(dirname "$0")" && pwd)"
# e.g. /Applications/Inkscape.app/Contents/Resources/bin
TOP="$(dirname "$CWD")"
# e.g. /Applications/Inkscape.app/Contents/Resources
-BASE="$(echo "$CWD" | sed -e 's/\/Contents\/Resources.*$//')"
+BASE="$(echo "$TOP" | sed -e 's/\/Contents\/Resources.*$//')"
# e.g. /Applications/Inkscape.app
# FIXME: Inkscape needs better relocation support for OS X (get rid of the relative
@@ -87,10 +87,17 @@ export GTK_EXE_PREFIX="$TOP"
export GTK_PATH="$TOP"
export GNOME_VFS_MODULE_CONFIG_PATH="$TOP/etc/gnome-vfs-2.0/modules"
export GNOME_VFS_MODULE_PATH="$TOP/lib/gnome-vfs-2.0/modules"
+export GIO_USE_VFS="local"
+export GVFS_REMOTE_VOLUME_MONITOR_IGNORE=1
+export GVFS_DISABLE_FUSE=1
export XDG_DATA_DIRS="$TOP/share"
export ASPELL_CONF="prefix $TOP;"
export POPPLER_DATADIR="$TOP/share/poppler"
+# no DBUS for now
+unset DBUS_LAUNCHD_SESSION_BUS_SOCKET
+unset DBUS_SESSION_BUS_ADDRESS
+
# Note: This requires the path with the exact ImageMagic version number.
# The actual version is inserted by the packaging script.
export MAGICK_CONFIGURE_PATH="$TOP/lib/ImageMagick-IMAGEMAGICKVER/config:$TOP/share/ImageMagick-IMAGEMAGICKVER_MAJOR/config"
diff --git a/packaging/macosx/ScriptExec/launcher-quartz-no-macintegration.sh b/packaging/macosx/ScriptExec/launcher-quartz-no-macintegration.sh
new file mode 100755
index 000000000..db5861c83
--- /dev/null
+++ b/packaging/macosx/ScriptExec/launcher-quartz-no-macintegration.sh
@@ -0,0 +1,183 @@
+#!/bin/sh
+#
+# Author: Aaron Voisine <aaron@voisine.org>
+# Inkscape Modifications:
+# Michael Wybrow <mjwybrow@users.sourceforge.net>
+# Jean-Olivier Irisson <jo.irisson@gmail.com>
+# ~suv <suv-sf@users.sourceforge.net>
+#
+
+[ -n "$INK_DEBUG_LAUNCHER" ] && set -x
+
+CWD="$(cd "$(dirname "$0")" && pwd)"
+# e.g. /Applications/Inkscape.app/Contents/MacOS
+TOP="$(dirname "$CWD")/Resources"
+# e.g. /Applications/Inkscape.app/Contents/Resources
+BASE="$(echo "$TOP" | sed -e 's/\/Contents\/Resources.*$//')"
+# e.g. /Applications/Inkscape.app
+
+source "${TOP}/xdg_setup.sh"
+source "${TOP}/alert_fccache.sh"
+
+# FIXME: Inkscape needs better relocation support for OS X (get rid of the relative
+# path hack in src/path-prefix.h for osxapp-enabled builds). Until then, below change
+# of working directory is required:
+#
+# Due to changes after 0.48, we have change working directory in the script named 'inkscape':
+# recursive calls to inkscape from python-based extensions otherwise cause the app to hang or
+# fail (for python-based extensions, inkscape changes the working directory to the
+# script's directory, and inkscape launched by python script thus can't find resources
+# like the now essential 'units.xml' in INKSCAPE_UIDIR relative to the working directory).
+cd "$BASE" || exit 1
+
+# don't prepend to $PATH in recursive calls:
+if [ -z "$INK_PATH_ORIG" ]; then
+
+ # Brutally add many things to the PATH. If the directories do not exist, they won't be used anyway.
+ # the 'classic' PATH additions:
+ # /usr/local/bin which, though standard, doesn't seem to be in the PATH
+ # Fink
+ # MacPorts (former DarwinPorts)
+ # LaTeX distribution for Mac OS X
+ PATH_OTHER="/usr/texbin:/opt/local/bin:/sw/bin/:/usr/local/bin"
+
+ # Put /usr/bin at beginning of path so we make sure we use Apple's python
+ # over one that may be installed be Macports, Fink or some other means.
+ PATH_PYTHON="/usr/bin"
+
+ # Put $TOP/bin at beginning of path so we make sure that recursive calls
+ # to inkscape don't pull in other inkscape binaries with different setup.
+ # Also allows to override system python with custom wrapper script, and
+ # e.g. to support GIMP.app or gimp for external editing and GIMP XCF export.
+ PATH_pkgbin="$CWD:$TOP/bin"
+
+ # save orig, new PATH
+ export INK_PATH_ORIG="$PATH"
+ export PATH="$PATH_pkgbin:$PATH_PYTHON:$PATH_OTHER:$INK_PATH_ORIG"
+fi
+
+# Setup PYTHONPATH to use python modules shipped with Inkscape
+OSXMINORNO="$(/usr/bin/sw_vers -productVersion | cut -d. -f2)"
+build_arch=__build_arch__
+if [ $OSXMINORNO -gt "5" ]; then
+ if [ $OSXMINORNO -eq "6" ]; then
+ export VERSIONER_PYTHON_VERSION=2.6
+ else # if [ $OSXMINORNO -ge "7" ]; then
+ export VERSIONER_PYTHON_VERSION=2.7
+ fi
+ if [ $build_arch = "i386" ]; then
+ export VERSIONER_PYTHON_PREFER_32_BIT=yes
+ else # build & runtime arch x86_64
+ export VERSIONER_PYTHON_PREFER_32_BIT=no
+ fi
+fi
+PYTHON_VERS="$(python -V 2>&1 | cut -c 8-10)"
+export PYTHONPATH="$TOP/lib/python$PYTHON_VERS/site-packages/"
+
+# fallback for missing $INK_CACHE_DIR
+if [ -z "$INK_CACHE_DIR" ]; then
+ INK_CACHE_DIR="${HOME}/.cache/inkscape"
+ mkdir -p "$INK_CACHE_DIR"
+ [ $_DEBUG ] && echo "INK_CACHE_DIR: falling back to $INK_CACHE_DIR"
+fi
+
+export FONTCONFIG_PATH="$TOP/etc/fonts"
+export PANGO_RC_FILE="${INK_CACHE_DIR}/pangorc"
+export GTK_IM_MODULE_FILE="${INK_CACHE_DIR}/immodules.cache"
+export GDK_PIXBUF_MODULE_FILE="${INK_CACHE_DIR}/loaders.cache"
+export GTK_DATA_PREFIX="$TOP"
+export GTK_EXE_PREFIX="$TOP"
+export GTK_PATH="$TOP"
+export GNOME_VFS_MODULE_CONFIG_PATH="$TOP/etc/gnome-vfs-2.0/modules"
+export GNOME_VFS_MODULE_PATH="$TOP/lib/gnome-vfs-2.0/modules"
+export GIO_USE_VFS="local"
+export GVFS_REMOTE_VOLUME_MONITOR_IGNORE=1
+export GVFS_DISABLE_FUSE=1
+export XDG_DATA_DIRS="$TOP/share"
+export ASPELL_CONF="prefix $TOP;"
+export POPPLER_DATADIR="$TOP/share/poppler"
+
+# no DBUS for now
+unset DBUS_LAUNCHD_SESSION_BUS_SOCKET
+unset DBUS_SESSION_BUS_ADDRESS
+
+# Note: This requires the path with the exact ImageMagic version number.
+# The actual version is inserted by the packaging script.
+export MAGICK_CONFIGURE_PATH="$TOP/lib/ImageMagick-IMAGEMAGICKVER/config:$TOP/share/ImageMagick-IMAGEMAGICKVER_MAJOR/config"
+export MAGICK_CODER_FILTER_PATH="$TOP/lib/ImageMagick-IMAGEMAGICKVER/modules-Q16/filters"
+export MAGICK_CODER_MODULE_PATH="$TOP/lib/ImageMagick-IMAGEMAGICKVER/modules-Q16/coders"
+
+export INKSCAPE_SHAREDIR="$TOP/share/inkscape"
+export INKSCAPE_PLUGINDIR="$TOP/lib/inkscape"
+export INKSCAPE_LOCALEDIR="$TOP/share/locale"
+
+# Handle the case where the directory storing Inkscape has special characters
+# ('#', '&', '|') in the name. These need to be escaped to work properly for
+# various configuration files.
+ESCAPEDTOP=`echo "$TOP" | sed 's/#/\\\\\\\\#/' | sed 's/&/\\\\\\&/g' | sed 's/|/\\\\\\|/g'`
+
+# Set GTK theme (only if there is no .gtkrc-2.0 in the user's home)
+if [[ ! -e "$HOME/.gtkrc-2.0" ]]; then
+ export GTK2_RC_FILES="$ESCAPEDTOP/etc/gtk-2.0/gtkrc"
+fi
+
+# If the AppleCollationOrder preference doesn't exist, we fall back to using
+# the AppleLocale preference.
+LANGSTR=`defaults read .GlobalPreferences AppleCollationOrder 2>/dev/null`
+if [ "x$LANGSTR" == "x" -o "x$LANGSTR" == "xroot" ]
+then
+ LANGSTR=`defaults read .GlobalPreferences AppleLocale 2>/dev/null | \
+ sed 's/_.*//'`
+ [ $_DEBUG ] && echo "Setting LANGSTR from AppleLocale: $LANGSTR" 1>&2
+else
+ [ $_DEBUG ] && echo "Setting LANGSTR from AppleCollationOrder: $LANGSTR" 1>&2
+fi
+
+# NOTE: Have to add ".UTF-8" to the LANG since omitting causes Inkscape
+# to crash on startup in locale_from_utf8().
+if [ "x$LANGSTR" == "x" ]
+then
+ # override broken script
+ [ $_DEBUG ] && echo "Overriding empty LANGSTR" 1>&2
+ export LANG="en_US.UTF-8"
+else
+ tmpLANG="`grep \"\`echo $LANGSTR\`_\" /usr/share/locale/locale.alias | \
+ tail -n1 | sed 's/\./ /' | awk '{print $2}'`"
+ if [ "x$tmpLANG" == "x" ]
+ then
+ # override broken script
+ [ $_DEBUG ] && echo "Overriding empty LANG from /usr/share/locale/locale.alias" 1>&2
+ export LANG="en_US.UTF-8"
+ else
+ [ $_DEBUG ] && echo "Setting LANG from /usr/share/locale/locale.alias" 1>&2
+ export LANG="$tmpLANG.UTF-8"
+ fi
+fi
+[ $_DEBUG ] && echo "Setting Language: $LANG" 1>&2
+export LC_ALL="$LANG"
+
+sed 's|${INK_CACHE_DIR}|'"$INK_CACHE_DIR|g" "$TOP/etc/pango/pangorc" > "${INK_CACHE_DIR}/pangorc"
+sed 's|${CWD}|'"$ESCAPEDTOP|g" "$TOP/etc/pango/pango.modules" \
+ > "${INK_CACHE_DIR}/pango.modules"
+sed 's|${CWD}|'"$ESCAPEDTOP|g" "$TOP/lib/gtk-2.0/__gtk_version__/immodules.cache" \
+ > "${INK_CACHE_DIR}/immodules.cache"
+sed 's|${CWD}|'"$ESCAPEDTOP|g" "$TOP/lib/gdk-pixbuf-2.0/__gdk_pixbuf_version__/loaders.cache" \
+ > "${INK_CACHE_DIR}/loaders.cache"
+
+case "$INK_DEBUG" in
+ gdb)
+ EXEC="gdb --args" ;;
+ lldb)
+ EXEC="lldb -- " ;;
+ dtruss)
+ EXEC="dtruss" ;;
+ *)
+ EXEC="exec" ;;
+esac
+unset INK_DEBUG # ignore for recursive calls
+
+if [ "x$INK_DEBUG_SHELL" != "x" ]; then
+ exec bash
+else
+ $EXEC "$CWD/inkscape-bin" "$@"
+fi
diff --git a/packaging/macosx/osx-app.sh b/packaging/macosx/osx-app.sh
index 2371bc617..d6eaf436d 100755
--- a/packaging/macosx/osx-app.sh
+++ b/packaging/macosx/osx-app.sh
@@ -140,18 +140,18 @@ fi
if [ ${add_python} = "true" ]; then
if [ -z "$python_dir" ]; then
- echo "Python modules will be copied from MacPorts tree."
+ echo "Python modules will be copied from MacPorts tree." >&2
else
if [ ! -e "$python_dir" ]; then
echo "Python modules directory \""$python_dir"\" not found." >&2
exit 1
else
if [ -e "$python_dir/i386" -o -e "$python_dir/ppc" ]; then
- echo "Outdated structure in custom python modules detected,"
- echo "not compatible with current packaging."
+ echo "Outdated structure in custom python modules detected," >&2
+ echo "not compatible with current packaging." >&2
exit 1
else
- echo "Python modules will be copied from $python_dir."
+ echo "Python modules will be copied from $python_dir." >&2
fi
fi
fi
@@ -162,16 +162,80 @@ if [ ! -e "$LIBPREFIX" ]; then
exit 1
fi
+if [ "x$(otool -L "$binary" | grep "libgtk-quartz")" != "x" ]; then
+ if ! pkg-config --exists gtk+-quartz-2.0; then
+ echo "Missing GTK+ backend -- please install gtk2 and its dependencies with variant '+quartz' and try again." >&2
+ exit 1
+ fi
+ _backend="quartz"
+else
+ if ! pkg-config --exists gtk+-x11-2.0; then
+ echo "Missing GTK+ backend -- please install gtk2 and its dependencies with variant '+x11' and try again." >&2
+ exit 1
+ fi
+ _backend="x11"
+fi
+
if ! pkg-config --exists gtk-engines-2; then
echo "Missing gtk-engines2 -- please install gtk-engines2 and try again." >&2
exit 1
fi
-if ! pkg-config --exists gnome-vfs-2.0; then
- echo "Missing gnome-vfs2 -- please install gnome-vfs2 and try again." >&2
+if [ ! -e "$LIBPREFIX/lib/gtk-2.0/$(pkg-config --variable=gtk_binary_version gtk+-2.0)/engines/libmurrine.so" ]; then
+ echo "Missing gtk2-murrine -- please install gtk2-murrine and try again." >&2
+ exit 1
+fi
+
+if [ ! -e "$LIBPREFIX/lib/gtk-2.0/$(pkg-config --variable=gtk_binary_version gtk+-2.0)/engines/libadwaita.so" ]; then
+ echo "Missing gnome-themes-standard -- please install gnome-themes-standard and try again." >&2
+ exit 1
+fi
+
+if [ ! -e "$LIBPREFIX/share/icons/hicolor/index.theme" ]; then
+ echo "Missing hicolor-icon-theme -- please install hicolor-icon-theme and try again." >&2
exit 1
fi
+if [ "$default_theme" != "default" ] ; then
+ if ! pkg-config --exists gnome-icon-theme; then
+ echo "Missing gnome-icon-theme -- please install gnome-icon-theme and try again." >&2
+ exit 1
+ fi
+
+ if ! pkg-config --exists gnome-icon-theme-symbolic; then
+ echo "Missing gnome-icon-theme-symbolic -- please install gnome-icon-theme-symbolic and try again." >&2
+ exit 1
+ fi
+
+ if ! pkg-config --exists icon-naming-utils; then
+ echo "Missing icon-naming-utils -- please install icon-naming-utils and try again." >&2
+ exit 1
+ fi
+fi
+
+unset WITH_GNOME_VFS
+if ! pkg-config --exists gnome-vfs-2.0; then
+ echo "Missing gnome-vfs2 -- some features will be disabled" >&2
+else
+ WITH_GNOME_VFS=true
+fi
+
+# unset WITH_DBUS
+# if ! pkg-config --exists dbus-1; then
+# echo "Missing dbus -- some features will be disabled" >&2
+# else
+# WITH_DBUS=true
+# fi
+#
+# unset WITH_GVFS
+# if [ ! -e "$LIBPREFIX/libexec/gvfsd" ]; then
+# echo "Missing gvfs -- some features will be disabled" >&2
+# elif [ ! -z "$WITH_DBUS" ]; then
+# WITH_GVFS=true
+# else
+# echo "Missing dbus for gvfs -- some features will be disabled" >&2
+# fi
+
if ! pkg-config --exists poppler; then
echo "Missing poppler -- please install poppler and try again." >&2
exit 1
@@ -214,15 +278,26 @@ ARCH="$(uname -a | awk '{print $NF;}')"
# Setup
#----------------------------------------------------------
-# Handle some version specific details.
-if [ "$OSXMINORNO" -le "4" ]; then
- echo "Note: Inkscape packaging requires Mac OS X 10.5 Leopard or later."
- exit 1
-else # if [ "$OSXMINORNO" -ge "5" ]; then
- XCODEFLAGS="-configuration Deployment"
- SCRIPTEXECDIR="ScriptExec/build/Deployment/ScriptExec.app/Contents/MacOS"
- EXTRALIBS=""
-fi
+case $_backend in
+ x11)
+ echo "Building package with GTK+/X11." >&2
+ # Handle some version specific details.
+ if [ "$OSXMINORNO" -le "4" ]; then
+ echo "Note: Inkscape packaging requires Mac OS X 10.5 Leopard or later."
+ exit 1
+ else # if [ "$OSXMINORNO" -ge "5" ]; then
+ XCODEFLAGS="-configuration Deployment"
+ SCRIPTEXECDIR="ScriptExec/build/Deployment/ScriptExec.app/Contents/MacOS"
+ EXTRALIBS=""
+ fi
+ ;;
+ quartz)
+ # quartz backend
+ echo "Building package with GTK+/Quartz." >&2
+ ;;
+ *)
+ exit 1
+esac
# Package always has the same name. Version information is stored in
@@ -281,15 +356,24 @@ fi
# Build and add the launcher
#----------------------------------------------------------
-(
- # Build fails if CC happens to be set (to anything other than CompileC)
- unset CC
-
- cd "$resdir/ScriptExec"
- echo -e "\033[1mBuilding launcher...\033[0m\n"
- xcodebuild $XCODEFLAGS clean build
-)
-cp "$resdir/$SCRIPTEXECDIR/ScriptExec" "$pkgexec/Inkscape"
+case $_backend in
+ x11)
+ (
+ # Build fails if CC happens to be set (to anything other than CompileC)
+ unset CC
+
+ cd "$resdir/ScriptExec"
+ echo -e "\033[1mBuilding launcher...\033[0m\n"
+ xcodebuild $XCODEFLAGS clean build
+ )
+ cp "$resdir/$SCRIPTEXECDIR/ScriptExec" "$pkgexec/Inkscape"
+ ;;
+ quartz)
+ $cp_cmd "$resdir/ScriptExec/launcher-quartz-no-macintegration.sh" "$pkgexec/inkscape"
+ ;;
+ *)
+ exit 1
+esac
# Copy all files into the bundle
@@ -300,13 +384,26 @@ binary_name=`basename "$binary"`
binary_dir=`dirname "$binary"`
# Inkscape's binary
-binpath="$pkgbin/inkscape-bin"
+if [ $_backend = "x11" ]; then
+ scrpath="$pkgbin/inkscape"
+ binpath="$pkgbin/inkscape-bin"
+else
+ scrpath="$pkgexec/inkscape"
+ binpath="$pkgexec/inkscape-bin"
+fi
cp -v "$binary" "$binpath"
# TODO Add a "$verbose" variable and command line switch, which sets wether these commands are verbose or not
+# Info.plist
+cp "$plist" "$package/Contents/Info.plist"
+if [ $_backend = "quartz" ]; then
+ # FIXME: needs OS X version check (see man page)
+ defaults write "$(cd "$(dirname "$pkgresources")" && pwd)/Info" CGDisableCoalescedUpdates -boolean TRUE
+ plutil -convert xml1 "${package}/Contents/Info.plist"
+fi
+
# Share files
rsync -av "$binary_dir/../share/$binary_name"/* "$pkgshare/$binary_name"
-cp "$plist" "$package/Contents/Info.plist"
rsync -av "$binary_dir/../share/locale"/* "$pkglocale"
# Copy GTK shared mime information
@@ -329,10 +426,22 @@ for item in Adwaita Clearlooks HighContrast Industrial Raleigh Redmond ThinIce;
mkdir -p "$pkgshare/themes/$item"
cp -RP "$LIBPREFIX/share/themes/$item/gtk-2.0" "$pkgshare/themes/$item/"
done
+if [ $_backend = "quartz" ]; then
+ for item in Mac; do
+ cp -RP "$LIBPREFIX/share/themes/$item/gtk-2.0"* "$pkgshare/themes/$item/"
+ done
+fi
# Icons and the rest of the script framework
rsync -av --exclude ".svn" "$resdir"/Resources/* "$pkgresources/"
+# remove files not needed with GTK+/Quartz
+if [ $_backend = "quartz" ]; then
+ rm "$pkgresources/script"
+ rm "$pkgresources/openDoc"
+ rm "$pkgbin/inkscape"
+fi
+
# activate wrapper scripts for python and gimp (optional)
if [ $add_wrapper = "true" ]; then
mv "$pkgbin/gimp-wrapper.sh" "$pkgbin/gimp"
@@ -394,7 +503,7 @@ if [ ${add_python} = "true" ]; then
cp -rvf "$python_dir"/* "$pkglib"
fi
fi
-sed -e "s,__build_arch__,$ARCH,g" -i "" $pkgbin/inkscape
+sed -e "s,__build_arch__,$ARCH,g" -i "" "$scrpath"
# PkgInfo must match bundle type and creator code from Info.plist
echo "APPLInks" > $package/Contents/PkgInfo
@@ -419,12 +528,6 @@ cp -r $LIBPREFIX/share/fontconfig/conf.avail $pkgshare/fontconfig/
(cd $pkgetc/fonts/conf.d && ln -s ../../../share/fontconfig/conf.avail/10-autohint.conf)
(cd $pkgetc/fonts/conf.d && ln -s ../../../share/fontconfig/conf.avail/70-no-bitmaps.conf)
-
-for item in gnome-vfs-mime-magic gnome-vfs-2.0
-do
- cp -r $LIBPREFIX/etc/$item $pkgetc/
-done
-
pango_version=`pkg-config --variable=pango_module_version pango`
mkdir -p $pkglib/pango/$pango_version/modules
cp $LIBPREFIX/lib/pango/$pango_version/modules/*.so $pkglib/pango/$pango_version/modules/
@@ -433,18 +536,26 @@ gtk_version=`pkg-config --variable=gtk_binary_version gtk+-2.0`
mkdir -p $pkglib/gtk-2.0/$gtk_version/{engines,immodules,printbackends}
cp -r $LIBPREFIX/lib/gtk-2.0/$gtk_version/* $pkglib/gtk-2.0/$gtk_version/
-mkdir -p $pkglib/gnome-vfs-2.0/modules
-cp $LIBPREFIX/lib/gnome-vfs-2.0/modules/*.so $pkglib/gnome-vfs-2.0/modules/
-
gdk_pixbuf_version=`pkg-config --variable=gdk_pixbuf_binary_version gdk-pixbuf-2.0`
mkdir -p $pkglib/gdk-pixbuf-2.0/$gdk_pixbuf_version/loaders
cp $LIBPREFIX/lib/gdk-pixbuf-2.0/$gdk_pixbuf_version/loaders/*.so $pkglib/gdk-pixbuf-2.0/$gdk_pixbuf_version/loaders/
-sed -e "s,__gtk_version__,$gtk_version,g" -i "" $pkgbin/inkscape
-sed -e "s,__gdk_pixbuf_version__,$gdk_pixbuf_version,g" -i "" $pkgbin/inkscape
+sed -e "s,__gtk_version__,$gtk_version,g" -i "" "$scrpath"
+sed -e "s,__gdk_pixbuf_version__,$gdk_pixbuf_version,g" -i "" "$scrpath"
sed -e "s,$LIBPREFIX,\${CWD},g" $LIBPREFIX/lib/gtk-2.0/$gtk_version/immodules.cache > $pkglib/gtk-2.0/$gtk_version/immodules.cache
sed -e "s,$LIBPREFIX,\${CWD},g" $LIBPREFIX/lib/gdk-pixbuf-2.0/$gdk_pixbuf_version/loaders.cache > $pkglib/gdk-pixbuf-2.0/$gdk_pixbuf_version/loaders.cache
+# Gnome-vfs modules (deprecated, optional in inkscape)
+if [ $WITH_GNOME_VFS ] ; then
+ for item in gnome-vfs-mime-magic gnome-vfs-2.0; do
+ $cp_cmd -r "$LIBPREFIX/etc/$item" "$pkgetc/"
+ done
+ for item in modules; do
+ mkdir -p "$pkglib/gnome-vfs-2.0/$item"
+ $cp_cmd "$LIBPREFIX/lib/gnome-vfs-2.0/$item"/*.so "$pkglib/gnome-vfs-2.0/$item/"
+ done
+fi
+
# ImageMagick version
IMAGEMAGICKVER="$(pkg-config --modversion ImageMagick)"
IMAGEMAGICKVER_MAJOR="$(cut -d. -f1 <<< "$IMAGEMAGICKVER")"
@@ -468,8 +579,8 @@ done
for la_file in "$pkglib/ImageMagick-$IMAGEMAGICKVER/modules-Q16/filters"/*.la; do
sed -e "s,$LIBPREFIX/lib/ImageMagick-$IMAGEMAGICKVER/modules-Q16/filters,,g" -i "" "$la_file"
done
-sed -e "s,IMAGEMAGICKVER,$IMAGEMAGICKVER,g" -i "" $pkgbin/inkscape
-sed -e "s,IMAGEMAGICKVER_MAJOR,$IMAGEMAGICKVER_MAJOR,g" -i "" $pkgbin/inkscape
+sed -e "s,IMAGEMAGICKVER,$IMAGEMAGICKVER,g" -i "" "$scrpath"
+sed -e "s,IMAGEMAGICKVER_MAJOR,$IMAGEMAGICKVER_MAJOR,g" -i "" "$scrpath"
# Copy aspell dictionary files:
cp -r "$LIBPREFIX/share/aspell" "$pkgresources/share/"
@@ -477,6 +588,10 @@ cp -r "$LIBPREFIX/share/aspell" "$pkgresources/share/"
# Copy Poppler data:
cp -r "$LIBPREFIX/share/poppler" "$pkgshare"
+# GLib2 schemas
+mkdir -p "$pkgshare/glib-2.0"
+$cp_cmd -RP "$LIBPREFIX/share/glib-2.0/schemas" "$pkgshare/glib-2.0/"
+
# Copy all linked libraries into the bundle
#----------------------------------------------------------
# get list of *.so modules from python modules
@@ -506,6 +621,7 @@ while $endl; do
$pkgbin/*.so \
$python_libs \
$extra_bin \
+ $binpath \
2>/dev/null | fgrep compatibility | cut -d\( -f1 | grep $LIBPREFIX | sort | uniq)"
cp -f $libs "$pkglib"
let "a+=1"
@@ -577,6 +693,11 @@ fixlib () {
}
rewritelibpaths () {
+ if [ $_backend = "quartz" ]; then
+ echo -n "Rewriting dylib paths for executable ... "
+ (cd "$pkgexec"; fixlib "inkscape-bin" "$package/Contents/Resources/../MacOS" "exec")
+ echo "done"
+ fi
echo "Rewriting dylib paths for included binaries:"
for file in $extra_bin; do
echo -n "Rewriting dylib paths for $file ... "