From 97d2579804d1bff68ae69189dd526b8cd9c32389b5c0db2fb9a751c9aba2e69b Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 13 Aug 2019 12:10:55 +0000 Subject: [PATCH] Accepting request 722989 from home:qkzhu:branches:GNOME:Factory - Update gi-find-deps.sh: upate javascript_requires function to parse the new JS import style (bsc#1140614). OBS-URL: https://build.opensuse.org/request/show/722989 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=208 --- gi-find-deps.sh | 7 +++++++ gobject-introspection.changes | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/gi-find-deps.sh b/gi-find-deps.sh index f2c00cb..bb48212 100644 --- a/gi-find-deps.sh +++ b/gi-find-deps.sh @@ -78,6 +78,12 @@ function python_requires { } function javascript_requires { + # parse the new import style in 3.32 + for module in $(grep -r -h -A2 'const {' $1 | paste -s -d ' ' | grep '} = imports.gi;' | sed 's/imports.gi;.*/imports.gi;/' | awk -F '[{}]' '{print $(NF>1?NF-1:"")}' | tr ',' '\n' | tr -d ' '); do + split_name_version $module + print_req_prov + done + # parse the old import style before 3.32 for module in $(grep -h -P -o "imports\.gi\.([^\s'\";]+)" $1 | grep -v "imports\.gi\.version" | sed -r -e 's,\s+$,,g' -e 's,imports.gi.,,'); do split_name_version $module print_req_prov @@ -181,6 +187,7 @@ function find_requires { # . imports.gi.foo; [unversioned requirement of 'foo'] # . imports.gi.foo-1.0; [versioned requirement of 'foo'] # . imports.gi.versions.Gtk = '3.0'; +# . const { foo, bar } = imports.gi; # . The imports can be listed on one line, and we catch them. while read file; do diff --git a/gobject-introspection.changes b/gobject-introspection.changes index 8f50a59..71fd948 100644 --- a/gobject-introspection.changes +++ b/gobject-introspection.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 25 04:59:37 UTC 2019 - Chingkai + +- Update gi-find-deps.sh: upate javascript_requires function to parse + the new JS import style (bsc#1140614). + ------------------------------------------------------------------- Sat Jun 15 18:34:15 UTC 2019 - Bjørn Lie