summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-10-16 23:36:32 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-10-16 23:36:32 +0000
commitb2c02c3cd7513b6fad49a0bd0c669f9a581f5cc8 (patch)
tree7d37d088e9179f631f22143a980157da49a331a9 /src
parentRemoved dangerous GTK-mimicking macros. (diff)
parentupdate to trunk (r13610) (diff)
downloadinkscape-b2c02c3cd7513b6fad49a0bd0c669f9a581f5cc8.tar.gz
inkscape-b2c02c3cd7513b6fad49a0bd0c669f9a581f5cc8.zip
Merge in osx-packaging-update branch. OS X packaging now works correctly for trunk.
(bzr r13620)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/pdfinput/pdf-input.cpp24
-rw-r--r--src/path-prefix.h34
2 files changed, 41 insertions, 17 deletions
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
diff --git a/src/path-prefix.h b/src/path-prefix.h
index be57ae354..4c31b629c 100644
--- a/src/path-prefix.h
+++ b/src/path-prefix.h
@@ -66,23 +66,23 @@ extern "C" {
# define CREATE_PALETTESDIR WIN32_DATADIR("create\\swatches")
# define CREATE_PATTERNSDIR WIN32_DATADIR("create\\patterns\\vector")
# elif defined ENABLE_OSX_APP_LOCATIONS
-# define INKSCAPE_APPICONDIR "Contents/Resources/pixmaps"
-# define INKSCAPE_ATTRRELDIR "Contents/Resources/attributes"
-# define INKSCAPE_BINDDIR "Contents/Resources/bind"
-# define INKSCAPE_EXAMPLESDIR "Contents/Resources/examples"
-# define INKSCAPE_EXTENSIONDIR "Contents/Resources/extensions"
-# define INKSCAPE_FILTERDIR "Contents/Resources/filters"
-# define INKSCAPE_GRADIENTSDIR "Contents/Resources/gradients"
-# define INKSCAPE_KEYSDIR "Contents/Resources/keys"
-# define INKSCAPE_PIXMAPDIR "Contents/Resources/icons"
-# define INKSCAPE_MARKERSDIR "Contents/Resources/markers"
-# define INKSCAPE_PALETTESDIR "Contents/Resources/palettes"
-# define INKSCAPE_PATTERNSDIR "Contents/Resources/patterns"
-# define INKSCAPE_SCREENSDIR "Contents/Resources/screens"
-# define INKSCAPE_SYMBOLSDIR "Contents/Resources/symbols"
-# define INKSCAPE_TUTORIALSDIR "Contents/Resources/tutorials"
-# define INKSCAPE_TEMPLATESDIR "Contents/Resources/templates"
-# define INKSCAPE_UIDIR "Contents/Resources/ui"
+# define INKSCAPE_APPICONDIR "Contents/Resources/share/pixmaps"
+# define INKSCAPE_ATTRRELDIR "Contents/Resources/share/inkscape/attributes"
+# define INKSCAPE_BINDDIR "Contents/Resources/share/inkscape/bind"
+# define INKSCAPE_EXAMPLESDIR "Contents/Resources/share/inkscape/examples"
+# define INKSCAPE_EXTENSIONDIR "Contents/Resources/share/inkscape/extensions"
+# define INKSCAPE_FILTERDIR "Contents/Resources/share/inkscape/filters"
+# define INKSCAPE_GRADIENTSDIR "Contents/Resources/share/inkscape/gradients"
+# define INKSCAPE_KEYSDIR "Contents/Resources/share/inkscape/keys"
+# define INKSCAPE_PIXMAPDIR "Contents/Resources/share/inkscape/icons"
+# define INKSCAPE_MARKERSDIR "Contents/Resources/share/inkscape/markers"
+# define INKSCAPE_PALETTESDIR "Contents/Resources/share/inkscape/palettes"
+# define INKSCAPE_PATTERNSDIR "Contents/Resources/share/inkscape/patterns"
+# define INKSCAPE_SCREENSDIR "Contents/Resources/share/inkscape/screens"
+# define INKSCAPE_SYMBOLSDIR "Contents/Resources/share/inkscape/symbols"
+# define INKSCAPE_TUTORIALSDIR "Contents/Resources/share/inkscape/tutorials"
+# define INKSCAPE_TEMPLATESDIR "Contents/Resources/share/inkscape/templates"
+# define INKSCAPE_UIDIR "Contents/Resources/share/inkscape/ui"
//CREATE V0.1 support
# define CREATE_GRADIENTSDIR "/Library/Application Support/create/gradients/gimp"
# define CREATE_PALETTESDIR "/Library/Application Support/create/swatches"