From bbcb391589939e6ebb1270bb33d4269b196fd2a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20de=20Hesselle?= Date: Sat, 5 Oct 2019 10:58:10 +0200 Subject: Add GObject introspection repository to app This is required for Python GTK bindings (PyGObject). --- packaging/macos/220-inkscape-package.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'packaging') diff --git a/packaging/macos/220-inkscape-package.sh b/packaging/macos/220-inkscape-package.sh index 2c7b91e4d..10a975e26 100755 --- a/packaging/macos/220-inkscape-package.sh +++ b/packaging/macos/220-inkscape-package.sh @@ -250,3 +250,25 @@ relocate_dependency @executable_path/../lib/libfreetype.6.dylib $APP_BIN_DIR/gs insert_before $APP_EXE_DIR/Inkscape '\$EXEC' \ 'export PATH=$bundle_bin:$PATH' +### create GObject introspection repository #################################### + +mkdir $APP_LIB_DIR/girepository-1.0 + +# remove fully qualified paths from libraries in *.gir files +for gir in $OPT_DIR/share/gir-1.0/*.gir; do + sed "s/$(escape_sed $LIB_DIR/)//g" $gir > $SRC_DIR/$(basename $gir) +done + +# compile *.gir into *.typelib files +for gir in $SRC_DIR/*.gir; do + jhbuild run g-ir-compiler -o $APP_LIB_DIR/girepository-1.0/$(basename -s .gir $gir).typelib $gir +done + +# tell GObject where to find the repository +insert_before $APP_EXE_DIR/Inkscape '\$EXEC' \ + 'export GI_TYPELIB_PATH=$bundle_lib/girepository-1.0' + +# set library path so dlopen() can find libraries without fully qualified paths +insert_before $APP_EXE_DIR/Inkscape '\$EXEC' \ + 'export DYLD_LIBRARY_PATH=$bundle_lib' + -- cgit v1.2.3