diff options
Diffstat (limited to 'packaging')
| -rw-r--r-- | packaging/macos/030-funcs.sh | 9 | ||||
| -rwxr-xr-x | packaging/macos/220-inkscape-package.sh | 30 | ||||
| -rw-r--r-- | packaging/macos/inkscape.bundle | 3 |
3 files changed, 29 insertions, 13 deletions
diff --git a/packaging/macos/030-funcs.sh b/packaging/macos/030-funcs.sh index 74254f164..c5b8339e4 100644 --- a/packaging/macos/030-funcs.sh +++ b/packaging/macos/030-funcs.sh @@ -256,11 +256,10 @@ function readlinkf function run_annotated { - # The newlines in the last 'sed' statement are significant! - - sed 's/\(^### .* ###\).*/echo \-e "\\033[1;44m\\033[1;37m['$SELF_NAME':$(printf '%03d' $LINENO)] \1\\033[0m"/g' $SELF_DIR/$SELF_NAME | sed 's/^run_annotated/#run_annotated/' | sed '/SELF_DIR=/a\ -SELF_DIR='$SELF_DIR'\ -' | bash + sed 's/\(^### .* ###\).*/echo \-e "\\033[1;44m\\033[1;37m['$SELF_NAME':$(printf '%03d' $LINENO)] \1\\033[0m"/g' $SELF_DIR/$SELF_NAME | + sed 's/^run_annotated/#run_annotated/' | + sed 's/^SELF_DIR=.*/SELF_DIR='$(escape_sed $SELF_DIR)'/' | + bash exit $? } diff --git a/packaging/macos/220-inkscape-package.sh b/packaging/macos/220-inkscape-package.sh index a87e12fea..851c7ec50 100755 --- a/packaging/macos/220-inkscape-package.sh +++ b/packaging/macos/220-inkscape-package.sh @@ -102,9 +102,14 @@ mv inkscape.icns $APP_RES_DIR 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 + # 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' -# add it to '$PATH' here and now (for package installation below) +# Add it to '$PATH' here and now (for package installation below). This is an +# exception: normally we'd not change the global environment but fence it +# using subshells. export PATH=$APP_FRA_DIR/Python.framework/Versions/Current/bin:$PATH # create '.pth' file inside Framework to include our site-packages directory @@ -121,21 +126,18 @@ echo "./../../../../../../../Resources/lib/python3.7/site-packages" > $APP_FRA_D # patch 'etree' relocate_dependency @loader_path/../../../libxml2.2.dylib $APP_LIB_DIR/python3.7/site-packages/lxml/etree.cpython-37m-darwin.so relocate_dependency @loader_path/../../../libz.1.dylib $APP_LIB_DIR/python3.7/site-packages/lxml/etree.cpython-37m-darwin.so +relocate_dependency @loader_path/../../../libxslt.1.dylib $APP_LIB_DIR/python3.7/site-packages/lxml/etree.cpython-37m-darwin.so +relocate_dependency @loader_path/../../../libexslt.0.dylib $APP_LIB_DIR/python3.7/site-packages/lxml/etree.cpython-37m-darwin.so # patch 'objectify' relocate_dependency @loader_path/../../../libxml2.2.dylib $APP_LIB_DIR/python3.7/site-packages/lxml/objectify.cpython-37m-darwin.so relocate_dependency @loader_path/../../../libz.1.dylib $APP_LIB_DIR/python3.7/site-packages/lxml/objectify.cpython-37m-darwin.so +relocate_dependency @loader_path/../../../libxslt.1.dylib $APP_LIB_DIR/python3.7/site-packages/lxml/objectify.cpython-37m-darwin.so +relocate_dependency @loader_path/../../../libexslt.0.dylib $APP_LIB_DIR/python3.7/site-packages/lxml/objectify.cpython-37m-darwin.so ### install Python package: NumPy ############################################## pip3 install --install-option="--prefix=$APP_RES_DIR" --ignore-installed $PYTHON_NUMPY -### install Python package: Pycairo ############################################ - -pip3 install --install-option="--prefix=$APP_RES_DIR" --ignore-installed $PYTHON_PYCAIRO - -# patch '_cairo' -relocate_dependency @loader_path/../../../libcairo.2.dylib $APP_LIB_DIR/python3.7/site-packages/cairo/_cairo.cpython-37m-darwin.so - ### install Python package: PyGObject ########################################## pip3 install --install-option="--prefix=$APP_RES_DIR" --ignore-installed $PYTHON_PYGOBJECT @@ -158,6 +160,14 @@ relocate_dependency @loader_path/../../../libffi.6.dylib $APP_LIB_DIR/python3.7/ relocate_dependency @loader_path/../../../libcairo.2.dylib $APP_LIB_DIR/python3.7/site-packages/gi/_gi_cairo.cpython-37m-darwin.so relocate_dependency @loader_path/../../../libcairo-gobject.2.dylib $APP_LIB_DIR/python3.7/site-packages/gi/_gi_cairo.cpython-37m-darwin.so +### install Python package: Pycairo ############################################ + +# PyGObject pulls in Pycairo, so not going to install again. +#pip3 install --install-option="--prefix=$APP_RES_DIR" --ignore-installed $PYTHON_PYCAIRO + +# patch '_cairo' +relocate_dependency @loader_path/../../../libcairo.2.dylib $APP_LIB_DIR/python3.7/site-packages/cairo/_cairo.cpython-37m-darwin.so + ### install Python package: pySerial ########################################### pip3 install --install-option="--prefix=$APP_RES_DIR" --ignore-installed $PYTHON_PYSERIAL @@ -166,6 +176,10 @@ pip3 install --install-option="--prefix=$APP_RES_DIR" --ignore-installed $PYTHON pip3 install --install-option="--prefix=$APP_RES_DIR" --ignore-installed $PYTHON_SCOUR +### precompile all Python packages ############################################# + +python3 -m compileall -f $APP_DIR || true + ### set default Python interpreter ############################################# # If no override is present in 'preferences.xml' (see diff --git a/packaging/macos/inkscape.bundle b/packaging/macos/inkscape.bundle index fcb04bfeb..d9322add7 100644 --- a/packaging/macos/inkscape.bundle +++ b/packaging/macos/inkscape.bundle @@ -78,6 +78,9 @@ ${prefix}/lib/inkscape/libinkscape_base.dylib </binary> <binary> + ${prefix}/lib/libexslt.0.dylib + </binary> + <binary> ${prefix}/lib/libssl.1.1.dylib </binary> <binary> |
