diff --git a/gi-find-deps.sh b/gi-find-deps.sh index 21c5a4d..f2c00cb 100644 --- a/gi-find-deps.sh +++ b/gi-find-deps.sh @@ -46,7 +46,7 @@ done function gresources_requires { # GNOME is embedding .js files into ELF binaries for faster startup. -# As a result, we need to extract them and re'run the scanner over the +# As a result, we need to extract them and re-run the scanner over the # embedded files. # We extract all the gresources embedded in ELF binaries and start # gi-find-deps.sh recusively over the extracted file list. @@ -87,6 +87,12 @@ function javascript_requires { split_name_version $module print_req_prov done + # This is, at the moment, specifically for Polari where a "const { Foo, Bar } = imports.gi;" is used. + for module in $(grep -h -E -o "\{ \w+(: \w+|, \w+)+ \} = imports.gi;" $1 | \ + sed -r -e '0,/\w+:\s\w+/ s/:\s\w+//g' -e 's: = imports.gi;:: ; s:\{ :: ; s: \}:: ; s/,//g'); do + split_name_version $module + print_req_prov + done # Remember files which contain a pkg.require() call if pcregrep -M "pkg.require\\(([^;])*" $1 > /dev/null; then # the file contains a pkg.require(..) list... let's remember th is file for the in-depth scanner @@ -173,7 +179,7 @@ function find_requires { # from gi.repository import foo, bar # - in JS: # . imports.gi.foo; [unversioned requirement of 'foo'] -# . imports.gi.goo-1.0; [versioned requirement] +# . imports.gi.foo-1.0; [versioned requirement of 'foo'] # . imports.gi.versions.Gtk = '3.0'; # . The imports can be listed on one line, and we catch them. diff --git a/gobject-introspection.changes b/gobject-introspection.changes index dcaffb1..139e49c 100644 --- a/gobject-introspection.changes +++ b/gobject-introspection.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 26 21:54:30 UTC 2018 - luc14n0@linuxmail.org + +- Update gi-find-reqs.sh to support new Polari's imports.gi pattern + "const { Foo, Bar } = imports.gi;". + ------------------------------------------------------------------- Wed Sep 19 18:38:47 UTC 2018 - antoine.belvire@opensuse.org