diff options
| author | René de Hesselle <dehesselle@web.de> | 2019-07-24 09:40:24 +0000 |
|---|---|---|
| committer | René de Hesselle <dehesselle@web.de> | 2019-07-24 19:46:58 +0000 |
| commit | ea5b6c3e8ace6dd4a73324c52f2d6b6ac07cc4f7 (patch) | |
| tree | f929536bbf9b0b13d6139e78f4294ce8a6dfd2a6 /packaging | |
| parent | Marks string as translatable. (diff) | |
| download | inkscape-ea5b6c3e8ace6dd4a73324c52f2d6b6ac07cc4f7.tar.gz inkscape-ea5b6c3e8ace6dd4a73324c52f2d6b6ac07cc4f7.zip | |
Add logging to help with debugging
Diffstat (limited to 'packaging')
| -rw-r--r-- | packaging/macos/020-vars.sh | 4 | ||||
| -rw-r--r-- | packaging/macos/030-funcs.sh | 26 | ||||
| -rwxr-xr-x | packaging/macos/110-sysprep.sh | 7 | ||||
| -rwxr-xr-x | packaging/macos/120-python3.sh | 5 | ||||
| -rwxr-xr-x | packaging/macos/130-jhbuild-bootstrap.sh | 8 | ||||
| -rwxr-xr-x | packaging/macos/140-jhbuild-gtk3.sh | 7 | ||||
| -rwxr-xr-x | packaging/macos/150-jhbuild-inkdeps.sh | 5 | ||||
| -rwxr-xr-x | packaging/macos/160-jhbuild-other.sh | 5 | ||||
| -rwxr-xr-x | packaging/macos/210-inkscape-build.sh | 11 | ||||
| -rwxr-xr-x | packaging/macos/220-inkscape-package.sh | 5 | ||||
| -rwxr-xr-x | packaging/macos/230-inkscape-distrib.sh | 5 |
11 files changed, 62 insertions, 26 deletions
diff --git a/packaging/macos/020-vars.sh b/packaging/macos/020-vars.sh index 5bbd91c1e..b697f282a 100644 --- a/packaging/macos/020-vars.sh +++ b/packaging/macos/020-vars.sh @@ -21,8 +21,6 @@ ### name and directory ######################################################### SELF_NAME=$(basename $0) -SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); \ - cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) ### multithreading ############################################################# @@ -137,7 +135,7 @@ export PIP_CONFIG_DIR=$DEVCONFIG/pip if [ -z $CI_JOB_ID ]; then INK_DIR=$SRC_DIR/inkscape else - INK_DIR=$SELF_DIR/../.. + INK_DIR=$SELF_DIR/../.. # SELF_DIR needs to be set by the sourcing script INK_DIR=$(cd $INK_DIR; pwd -P) # make path canoncial fi diff --git a/packaging/macos/030-funcs.sh b/packaging/macos/030-funcs.sh index 525e736e2..af293bf53 100644 --- a/packaging/macos/030-funcs.sh +++ b/packaging/macos/030-funcs.sh @@ -192,3 +192,29 @@ function readlinkf echo $(pwd -P)/$file } +### run script and echo comments prefixed with three hashes #################### + +# This little magic trick +# - reads the current file +# - turns every line that matches "### text here ###" into an echo statement +# (whatever follows after the last three hashes is ignored) +# - adds script name and line number as prefix +# - sets background color for that "echo" to blue +# - removes the call to run_annotated to avoid recursion +# - set SELF_DIR to correct value (piping into bash breaks existing one) +# +# Known side effects: +# - SELF_NAME no longer works (is now "bash") +# - interactive JHBuild (e.g. on error) breaks + +function run_annotated +{ + # The newlines in the last 'sed' statement are significant! + + sed 's/\(^### .* ###\).*/echo \-e "\\033[1;44m['$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 + + exit $? +} + diff --git a/packaging/macos/110-sysprep.sh b/packaging/macos/110-sysprep.sh index 432972e6d..bfec0311e 100755 --- a/packaging/macos/110-sysprep.sh +++ b/packaging/macos/110-sysprep.sh @@ -8,10 +8,11 @@ ### load settings and functions ################################################ -SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); \ - cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) +SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) for script in $SELF_DIR/0??-*.sh; do source $script; done +run_annotated + ### create our work directory ################################################## [ ! -d $WRK_DIR ] && mkdir -p $WRK_DIR @@ -21,7 +22,7 @@ if $RAMDISK_ENABLE; then create_ramdisk $WRK_DIR $RAMDISK_SIZE fi -### housekeeping: redirect to locations below $WRK_DIR ######################### +### housekeeping: redirect to locations below WRK_DIR ########################## mkdir -p $TMP_DIR diff --git a/packaging/macos/120-python3.sh b/packaging/macos/120-python3.sh index 5401574f0..be6005f26 100755 --- a/packaging/macos/120-python3.sh +++ b/packaging/macos/120-python3.sh @@ -9,10 +9,11 @@ ### load settings and functions ################################################ -SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); \ - cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) +SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) for script in $SELF_DIR/0??-*.sh; do source $script; done +run_annotated + ### install Python 3 ########################################################### get_source $URL_PYTHON3_SRC diff --git a/packaging/macos/130-jhbuild-bootstrap.sh b/packaging/macos/130-jhbuild-bootstrap.sh index 5bd7bae03..81409a438 100755 --- a/packaging/macos/130-jhbuild-bootstrap.sh +++ b/packaging/macos/130-jhbuild-bootstrap.sh @@ -8,10 +8,11 @@ ### load settings and functions ################################################ -SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); \ - cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) +SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) for script in $SELF_DIR/0??-*.sh; do source $script; done +#run_annotated disabled for now, breaks jhbuild interactive mode + ### install and configure jhbuild ############################################## # remove configuration files from a previous installation @@ -36,5 +37,6 @@ ln -sf $DEVCONFIG/jhbuild* $HOME/.config echo "setup_sdk(target=\"$MACOSX_DEPLOYMENT_TARGET\")" >> $JHBUILDRC ) -# bootstrapping +### bootstrap JHBuild ########################################################## + jhbuild bootstrap-gtk-osx diff --git a/packaging/macos/140-jhbuild-gtk3.sh b/packaging/macos/140-jhbuild-gtk3.sh index aea766b72..3459c4dc0 100755 --- a/packaging/macos/140-jhbuild-gtk3.sh +++ b/packaging/macos/140-jhbuild-gtk3.sh @@ -8,10 +8,11 @@ ### load settings and functions ################################################ -SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); \ - cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) +SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) for script in $SELF_DIR/0??-*.sh; do source $script; done +#run_annotated disabled for now, breaks jhbuild interactive mode + ### install GTK3 libraries ##################################################### jhbuild build \ @@ -20,7 +21,7 @@ jhbuild build \ meta-gtk-osx-gtk3 \ meta-gtk-osx-gtkmm3 -### fix loaders ################################################################ +### fix GDK pixbuf loaders ##################################################### for file in $LIB_DIR/gdk-pixbuf-2.0/2.10.0/loaders/*.dylib; do mv $file $(dirname $file)/$(basename -s .dylib $file).so diff --git a/packaging/macos/150-jhbuild-inkdeps.sh b/packaging/macos/150-jhbuild-inkdeps.sh index 768c95e6a..6c56f35c8 100755 --- a/packaging/macos/150-jhbuild-inkdeps.sh +++ b/packaging/macos/150-jhbuild-inkdeps.sh @@ -9,10 +9,11 @@ ### load settings and functions ################################################ -SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); \ - cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) +SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) for script in $SELF_DIR/0??-*.sh; do source $script; done +run_annotated + ### install additional GNOME libraries ######################################### # adwaita-icon-theme - icons used by Inkscape/GTK diff --git a/packaging/macos/160-jhbuild-other.sh b/packaging/macos/160-jhbuild-other.sh index 9b7692f0a..775ac0d4f 100755 --- a/packaging/macos/160-jhbuild-other.sh +++ b/packaging/macos/160-jhbuild-other.sh @@ -9,10 +9,11 @@ ### load settings and functions ################################################ -SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); \ - cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) +SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) for script in $SELF_DIR/0??-*.sh; do source $script; done +run_annotated + ### install create-dmg ######################################################### get_source $URL_CREATEDMG diff --git a/packaging/macos/210-inkscape-build.sh b/packaging/macos/210-inkscape-build.sh index d92090f00..c5a513c7d 100755 --- a/packaging/macos/210-inkscape-build.sh +++ b/packaging/macos/210-inkscape-build.sh @@ -8,12 +8,13 @@ ### load settings and functions ################################################ -SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); \ - cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) +SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) for script in $SELF_DIR/0??-*.sh; do source $script; done set -e +run_annotated + ### build Inkscape ############################################################# if [ -z $CI_JOB_ID ]; then # running standalone @@ -45,13 +46,15 @@ cmake \ make make install -# patch Poppler library locations +### patch Poppler library locations ############################################ + relocate_dependency $LIB_DIR/libpoppler.85.dylib $BIN_DIR/inkscape relocate_dependency $LIB_DIR/libpoppler-glib.8.dylib $BIN_DIR/inkscape relocate_dependency $LIB_DIR/libpoppler.85.dylib $LIB_DIR/inkscape/libinkscape_base.dylib relocate_dependency $LIB_DIR/libpoppler-glib.8.dylib $LIB_DIR/inkscape/libinkscape_base.dylib -# patch OpenMP library locations +### patch OpenMP library locations ############################################# + relocate_dependency $LIB_DIR/libomp.dylib $BIN_DIR/inkscape relocate_dependency $LIB_DIR/libomp.dylib $LIB_DIR/inkscape/libinkscape_base.dylib diff --git a/packaging/macos/220-inkscape-package.sh b/packaging/macos/220-inkscape-package.sh index ed0be6572..83a01d9af 100755 --- a/packaging/macos/220-inkscape-package.sh +++ b/packaging/macos/220-inkscape-package.sh @@ -8,12 +8,13 @@ ### load settings and functions ################################################ -SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); \ - cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) +SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) for script in $SELF_DIR/0??-*.sh; do source $script; done set -e +run_annotated + ### package Inkscape ########################################################### mkdir -p $ARTIFACT_DIR diff --git a/packaging/macos/230-inkscape-distrib.sh b/packaging/macos/230-inkscape-distrib.sh index 929a51d72..eef455666 100755 --- a/packaging/macos/230-inkscape-distrib.sh +++ b/packaging/macos/230-inkscape-distrib.sh @@ -8,12 +8,13 @@ ### load settings and functions ################################################ -SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); \ - cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) +SELF_DIR=$(F=$0; while [ ! -z $(readlink $F) ] && F=$(readlink $F); cd $(dirname $F); F=$(basename $F); [ -L $F ]; do :; done; echo $(pwd -P)) for script in $SELF_DIR/0??-*.sh; do source $script; done set -e +run_annotated + ### create disk image for distribution ######################################### # Create background for development snapshots. This is not meant for |
