summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2014-08-21 17:18:39 +0000
committer~suv <suv-sf@users.sourceforge.net>2014-08-21 17:18:39 +0000
commit963a90531a042d793f0f2e0fddbe9df0de35bf6d (patch)
tree2ba247408454caef04e4c760c93cc1c1f2804716
parentadd custom ports for Inkscape.app (Python 2.6.1 to be used on Leopard and SL,... (diff)
downloadinkscape-963a90531a042d793f0f2e0fddbe9df0de35bf6d.tar.gz
inkscape-963a90531a042d793f0f2e0fddbe9df0de35bf6d.zip
add poppler data to bundle, fix relocation support (see bug #956282)
(bzr r13506.1.40)
-rwxr-xr-xpackaging/macosx/Resources/bin/inkscape1
-rwxr-xr-xpackaging/macosx/osx-app.sh3
-rw-r--r--src/extension/internal/pdfinput/pdf-input.cpp24
3 files changed, 28 insertions, 0 deletions
diff --git a/packaging/macosx/Resources/bin/inkscape b/packaging/macosx/Resources/bin/inkscape
index b1ff5a85a..dcdeb0aaf 100755
--- a/packaging/macosx/Resources/bin/inkscape
+++ b/packaging/macosx/Resources/bin/inkscape
@@ -63,6 +63,7 @@ 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 XDG_DATA_DIRS="$TOP/share"
export ASPELL_CONF="prefix $TOP;"
+export POPPLER_DATADIR="$TOP/share/poppler"
# Note: This requires the path with the exact ImageMagic version number.
# Also, that ImageMagick will only work if it does not find a
diff --git a/packaging/macosx/osx-app.sh b/packaging/macosx/osx-app.sh
index 696f137fa..73e4714fc 100755
--- a/packaging/macosx/osx-app.sh
+++ b/packaging/macosx/osx-app.sh
@@ -402,6 +402,9 @@ cp -r "$LIBPREFIX/share/ImageMagick-6" "$pkgresources/share/"
# Copy aspell dictionary files:
cp -r "$LIBPREFIX/share/aspell" "$pkgresources/share/"
+# Copy Poppler data:
+cp -r "$LIBPREFIX/share/poppler" "$pkgshare"
+
# Copy all linked libraries into the bundle
#----------------------------------------------------------
# get list of *.so modules from python modules
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
index 63581bd8a..cbdaf9d20 100644
--- a/src/extension/internal/pdfinput/pdf-input.cpp
+++ b/src/extension/internal/pdfinput/pdf-input.cpp
@@ -647,7 +647,31 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
// Initialize the globalParams variable for poppler
if (!globalParams) {
+#ifdef ENABLE_OSX_APP_LOCATIONS
+ //
+ // data files for poppler are not relocatable (loaded from
+ // path defined at build time). This fails to work with relocatable
+ // application bundles for OS X.
+ //
+ // Workaround:
+ // 1. define $POPPLER_DATADIR env variable in app launcher script
+ // 2. pass custom $POPPLER_DATADIR via poppler's GlobalParams()
+ //
+ // relevant poppler commit:
+ // <http://cgit.freedesktop.org/poppler/poppler/commit/?id=869584a84eed507775ff1c3183fe484c14b6f77b>
+ //
+ // FIXES: Inkscape bug #956282, #1264793
+ // TODO: report RFE upstream (full relocation support for OS X packaging)
+ //
+ gchar const *poppler_datadir = g_getenv("POPPLER_DATADIR");
+ if (poppler_datadir != NULL) {
+ globalParams = new GlobalParams(poppler_datadir);
+ } else {
+ globalParams = new GlobalParams();
+ }
+#else
globalParams = new GlobalParams();
+#endif // ENABLE_OSX_APP_LOCATIONS
}
// poppler does not use glib g_open. So on win32 we must use unicode call. code was copied from glib gstdio.c
#ifndef WIN32