diff options
| author | René de Hesselle <dehesselle@web.de> | 2019-10-05 08:58:10 +0000 |
|---|---|---|
| committer | René de Hesselle <dehesselle@web.de> | 2019-10-05 20:06:44 +0000 |
| commit | bbcb391589939e6ebb1270bb33d4269b196fd2a5 (patch) | |
| tree | 13685cedaa5048b03b7bdba2a20603bbb21a71ab /packaging | |
| parent | Fix various minor code problems (diff) | |
| download | inkscape-bbcb391589939e6ebb1270bb33d4269b196fd2a5.tar.gz inkscape-bbcb391589939e6ebb1270bb33d4269b196fd2a5.zip | |
Add GObject introspection repository to app
This is required for Python GTK bindings (PyGObject).
Diffstat (limited to 'packaging')
| -rwxr-xr-x | packaging/macos/220-inkscape-package.sh | 22 |
1 files changed, 22 insertions, 0 deletions
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' + |
