summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorRené de Hesselle <dehesselle@web.de>2019-09-28 20:49:54 +0000
committerRené de Hesselle <dehesselle@web.de>2019-09-28 21:46:29 +0000
commitd565813f7bc587f3e45575a242ad5fd4c1214be9 (patch)
tree3bc262b0c3ec94005695697899964416227d2299 /packaging
parentFix issue multiple signals on font change. styling (diff)
downloadinkscape-d565813f7bc587f3e45575a242ad5fd4c1214be9.tar.gz
inkscape-d565813f7bc587f3e45575a242ad5fd4c1214be9.zip
Add Ghostscript to enable eps import
Diffstat (limited to 'packaging')
-rw-r--r--packaging/macos/020-vars.sh3
-rwxr-xr-xpackaging/macos/150-jhbuild-inkdeps.sh5
-rwxr-xr-xpackaging/macos/220-inkscape-package.sh32
-rw-r--r--packaging/macos/inkscape.bundle10
4 files changed, 37 insertions, 13 deletions
diff --git a/packaging/macos/020-vars.sh b/packaging/macos/020-vars.sh
index df8dc2e84..fd0d27aba 100644
--- a/packaging/macos/020-vars.sh
+++ b/packaging/macos/020-vars.sh
@@ -121,6 +121,7 @@ URL_CPPUNIT=https://dev-www.libreoffice.org/src/cppunit-1.14.0.tar.gz
URL_DOUBLE_CONVERSION=https://github.com/google/double-conversion/archive/v3.1.4.tar.gz
URL_GC=https://github.com/ivmai/bdwgc/releases/download/v8.0.4/gc-8.0.4.tar.gz
URL_GDL=https://github.com/GNOME/gdl/archive/GDL_3_28_0.tar.gz
+URL_GHOSTSCRIPT=https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs927/ghostscript-9.27.tar.gz
URL_GSL=http://ftp.fau.de/gnu/gsl/gsl-2.5.tar.gz
URL_GTK_MAC_BUNDLER=https://gitlab.gnome.org/GNOME/gtk-mac-bundler/-/archive/93edee7e2d0ec8230aaf5acb21452202b10cd678.tar.gz
URL_GTK_OSX=https://raw.githubusercontent.com/dehesselle/gtk-osx/inkscape
@@ -145,7 +146,7 @@ URL_PYTHON3_BIN=https://github.com/dehesselle/py3framework/releases/download/py3
URL_PYTHON36_SRC=https://github.com/dehesselle/py3framework/archive/py369.3.tar.gz
URL_PYTHON36_BIN=https://github.com/dehesselle/py3framework/releases/download/py369.3/py369_framework_3.tar.xz
# A pre-built version of the complete toolset.
-URL_TOOLSET_CACHE=https://github.com/dehesselle/mibap/releases/download/v0.20/mibap_v0.20.tar.xz
+URL_TOOLSET_CACHE=https://github.com/dehesselle/mibap/releases/download/v0.22/mibap_v0.22.tar.xz
### Python packages ############################################################
diff --git a/packaging/macos/150-jhbuild-inkdeps.sh b/packaging/macos/150-jhbuild-inkdeps.sh
index aac06eee4..77fa92ec8 100755
--- a/packaging/macos/150-jhbuild-inkdeps.sh
+++ b/packaging/macos/150-jhbuild-inkdeps.sh
@@ -115,3 +115,8 @@ configure_make_makeinstall --with-libpotrace
get_source $URL_OPENMP
cmake_make_makeinstall
+### install Ghostscript ########################################################
+
+get_source $URL_GHOSTSCRIPT
+configure_make_makeinstall
+
diff --git a/packaging/macos/220-inkscape-package.sh b/packaging/macos/220-inkscape-package.sh
index 851c7ec50..2c7b91e4d 100755
--- a/packaging/macos/220-inkscape-package.sh
+++ b/packaging/macos/220-inkscape-package.sh
@@ -100,10 +100,7 @@ mv inkscape.icns $APP_RES_DIR
# This section deals with bundling Python.framework into the application.
mkdir $APP_FRA_DIR
-get_source file://$SRC_DIR/$(basename $URL_PYTHON3_BIN) $APP_FRA_DIR
-
-# remove 'test' folder to save space
-rm -rf $APP_FRA_DIR/Python.framework/Versions/Current/lib/python3.7/test
+get_source file://$SRC_DIR/$(basename $URL_PYTHON3_BIN) $APP_FRA_DIR --exclude='Versions/3.7/lib/python3.7/test/*'
# add it to '$PATH' in launch script
insert_before $APP_EXE_DIR/Inkscape '\$EXEC' 'export PATH=$bundle_contents/Frameworks/Python.framework/Versions/Current/bin:$PATH'
@@ -188,20 +185,20 @@ python3 -m compileall -f $APP_DIR || true
# Default interpreter is an unversioned environment lookup for 'python', so
# we prepare to override it.
-mkdir -p $APP_BIN_DIR
-cd $APP_BIN_DIR
-ln -sf ../../Frameworks/Python.framework/Versions/Current/bin/python3 python
+mkdir -p $APP_BIN_DIR/python_override
+cd $APP_BIN_DIR/python_override
+ln -sf ../../../Frameworks/Python.framework/Versions/Current/bin/python3 python
# add override check to launch script
insert_before $APP_EXE_DIR/Inkscape '\$EXEC' '\
INKSCAPE_PREFERENCES=\"$HOME/Library/Application Support/Inkscape/config/inkscape/preferences.xml\"\
-if [ -f \"$INKSCAPE_PREFERENCES\" ]; then # Has Inkscape been launched before?\
+if [ -f \"$INKSCAPE_PREFERENCES\" ]; then # Has Inkscape been launched before?\
PYTHON_INTERPRETER=$\(xmllint --xpath '\''string\(//inkscape/group[@id=\"extensions\"]/@python-interpreter\)'\'' \"$INKSCAPE_PREFERENCES\"\)\
- if [ -z $PYTHON_INTERPRETER ]\; then # No override for Python interpreter?\
- export PATH=$bundle_bin:$PATH # make bundled Python default one\
+ if [ -z $PYTHON_INTERPRETER ]\; then # No override for Python interpreter?\
+ export PATH=$bundle_bin/python_override:$PATH # make bundled Python default one\
fi\
-else # Inkscape has not been launched before\
- export PATH=$bundle_bin:$PATH # make bundled Python default one\
+else # Inkscape has not been launched before?\
+ export PATH=$bundle_bin/python_override:$PATH # make bundled Python default one\
fi\
'
@@ -242,3 +239,14 @@ replace_line $APP_EXE_DIR/Inkscape AppleCollationOrder \
replace_line $APP_EXE_DIR/Inkscape '-a -n $APPLECOLLATION;' \
'if test -z ${LANG} -a -n "$APPLECOLLATION"; then'
+### Ghostscript ################################################################
+
+relocate_dependency @executable_path/../lib/libz.1.dylib $APP_BIN_DIR/gs
+relocate_dependency @executable_path/../lib/libfontconfig.1.dylib $APP_BIN_DIR/gs
+relocate_dependency @executable_path/../lib/libfreetype.6.dylib $APP_BIN_DIR/gs
+
+### final changes to PATH ######################################################
+
+insert_before $APP_EXE_DIR/Inkscape '\$EXEC' \
+ 'export PATH=$bundle_bin:$PATH'
+
diff --git a/packaging/macos/inkscape.bundle b/packaging/macos/inkscape.bundle
index d9322add7..4293f405a 100644
--- a/packaging/macos/inkscape.bundle
+++ b/packaging/macos/inkscape.bundle
@@ -94,6 +94,10 @@
<binary>
${prefix}/lib/libgirepository-1.0.1.dylib
</binary>
+ <!-- Ghostscript -->
+ <binary>
+ ${prefix}/bin/gs
+ </binary>
<!-- Translation filenames, one for each program or library that you
want to copy in to the bundle. The "dest" attribute is
optional, as usual. Bundler will find all translations of that
@@ -142,6 +146,12 @@
<data>
${prefix}/share/inkscape
</data>
+ <data>
+ ${prefix}/share/ghostscript
+ </data>
+ <data>
+ ${prefix}/bin/ps2pdf*
+ </data>
<!-- Copy in the themes data. You may want to trim this to save space
in your bundle. -->
<data>