gobject-introspection 1.62.0-2 (i686;x86_64;znver1) 2019-9152
9999

Status published
Submitter nobodydead [@T] gmail.com
Platform rolling
Repository main
URL https://abf.openmandriva.org/build_lists/645193
Packages
gobject-introspection-1.62.0-2.i686.binary
gobject-introspection-1.62.0-2.i686.source
gobject-introspection-debuginfo-1.62.0-2.i686.debuginfo
libcairo-gir1.0-1.62.0-2.i686.binary
libdbus-gir1.0-1.62.0-2.i686.binary
libdbusglib-gir1.0-1.62.0-2.i686.binary
libfontconfig-gir2.0-1.62.0-2.i686.binary
libfreetype-gir2.0-1.62.0-2.i686.binary
libgirepository1.0_1-1.62.0-2.i686.binary
libgirepository1.0_1-debuginfo-1.62.0-2.i686.debuginfo
libgirepository-devel-1.62.0-2.i686.binary
libgirepository-devel-debuginfo-1.62.0-2.i686.debuginfo
libgirepository-gir2.0-1.62.0-2.i686.binary
libgl-gir1.0-1.62.0-2.i686.binary
libglib-gir2.0-1.62.0-2.i686.binary
libvulkan-gir1.0-1.62.0-2.i686.binary
libwin32-gir1.0-1.62.0-2.i686.binary
libxfixes-gir4.0-1.62.0-2.i686.binary
libxft-gir2.0-1.62.0-2.i686.binary
libxlib-gir2.0-1.62.0-2.i686.binary
libxml2-gir2.0-1.62.0-2.i686.binary
libxrandr-gir1.3-1.62.0-2.i686.binary
gobject-introspection-1.62.0-2.x86_64.binary
gobject-introspection-1.62.0-2.x86_64.source
gobject-introspection-debuginfo-1.62.0-2.x86_64.debuginfo
lib64cairo-gir1.0-1.62.0-2.x86_64.binary
lib64dbus-gir1.0-1.62.0-2.x86_64.binary
lib64dbusglib-gir1.0-1.62.0-2.x86_64.binary
lib64fontconfig-gir2.0-1.62.0-2.x86_64.binary
lib64freetype-gir2.0-1.62.0-2.x86_64.binary
lib64girepository1.0_1-1.62.0-2.x86_64.binary
lib64girepository1.0_1-debuginfo-1.62.0-2.x86_64.debuginfo
lib64girepository-devel-1.62.0-2.x86_64.binary
lib64girepository-devel-debuginfo-1.62.0-2.x86_64.debuginfo
lib64girepository-gir2.0-1.62.0-2.x86_64.binary
lib64gl-gir1.0-1.62.0-2.x86_64.binary
lib64glib-gir2.0-1.62.0-2.x86_64.binary
lib64vulkan-gir1.0-1.62.0-2.x86_64.binary
lib64win32-gir1.0-1.62.0-2.x86_64.binary
lib64xfixes-gir4.0-1.62.0-2.x86_64.binary
lib64xft-gir2.0-1.62.0-2.x86_64.binary
lib64xlib-gir2.0-1.62.0-2.x86_64.binary
lib64xml2-gir2.0-1.62.0-2.x86_64.binary
lib64xrandr-gir1.3-1.62.0-2.x86_64.binary
gobject-introspection-1.62.0-2.znver1.binary
gobject-introspection-1.62.0-2.znver1.source
gobject-introspection-debuginfo-1.62.0-2.znver1.debuginfo
lib64cairo-gir1.0-1.62.0-2.znver1.binary
lib64dbus-gir1.0-1.62.0-2.znver1.binary
lib64dbusglib-gir1.0-1.62.0-2.znver1.binary
lib64fontconfig-gir2.0-1.62.0-2.znver1.binary
lib64freetype-gir2.0-1.62.0-2.znver1.binary
lib64girepository1.0_1-1.62.0-2.znver1.binary
lib64girepository1.0_1-debuginfo-1.62.0-2.znver1.debuginfo
lib64girepository-devel-1.62.0-2.znver1.binary
lib64girepository-devel-debuginfo-1.62.0-2.znver1.debuginfo
lib64girepository-gir2.0-1.62.0-2.znver1.binary
lib64gl-gir1.0-1.62.0-2.znver1.binary
lib64glib-gir2.0-1.62.0-2.znver1.binary
lib64vulkan-gir1.0-1.62.0-2.znver1.binary
lib64win32-gir1.0-1.62.0-2.znver1.binary
lib64xfixes-gir4.0-1.62.0-2.znver1.binary
lib64xft-gir2.0-1.62.0-2.znver1.binary
lib64xlib-gir2.0-1.62.0-2.znver1.binary
lib64xml2-gir2.0-1.62.0-2.znver1.binary
lib64xrandr-gir1.3-1.62.0-2.znver1.binary
Build Date 2019-11-21 18:50:14 +0000 UTC
Last Updated 2019-11-24 18:38:53.023224061 +0000 UTC
$ git diff --patch-with-stat --summary 2d4e6559f264176d1d0eb8924cdf603c65b2f694..d3444ffeacdb939e216818894ef525404ad01c35

 g-ir-dep-tool.patch        | 109 ---------------------------------------------
 gi-find-deps.sh            |  38 +++++++++++-----
 gobject-introspection.spec |   4 +-
 3 files changed, 28 insertions(+), 123 deletions(-)
 delete mode 100644 g-ir-dep-tool.patch

diff --git a/g-ir-dep-tool.patch b/g-ir-dep-tool.patch
deleted file mode 100644
index 72c788f..0000000
--- a/g-ir-dep-tool.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-diff -urN gobject-introspection-1.50.0/Makefile-tools.am gobject-introspection-1.50.0-patched/Makefile-tools.am
---- gobject-introspection-1.50.0/Makefile-tools.am	2016-07-29 15:32:43.000000000 +1000
-+++ gobject-introspection-1.50.0-patched/Makefile-tools.am	2016-09-30 00:47:45.955492996 +1000
-@@ -1,5 +1,6 @@
- bin_PROGRAMS += g-ir-compiler g-ir-generate g-ir-inspect
- bin_SCRIPTS += g-ir-scanner g-ir-annotation-tool
-+bin_PROGRAMS += g-ir-dep-tool
- 
- if BUILD_DOCTOOL
- bin_SCRIPTS += g-ir-doc-tool
-@@ -46,8 +47,15 @@
-         libgirepository-1.0.la	\
-         $(GIREPO_LIBS)
- 
-+g_ir_dep_tool_SOURCES = tools/g-ir-dep-tool.c
-+g_ir_dep_tool_CFLAGS = $(GIO_CFLAGS) -I$(top_srcdir)/girepository
-+g_ir_dep_tool_LDADD = \
-+	libgirepository-internals.la	\
-+	libgirepository-1.0.la		\
-+	$(GIREPO_LIBS)
-+
- GCOVSOURCES =					\
- 	$(g_ir_compiler_SOURCES)		\
- 	$(g_ir_generate_SOURCES)
- 
--CLEANFILES += g-ir-scanner g-ir-annotation-tool g-ir-doc-tool g-ir-inspect
-+CLEANFILES += g-ir-scanner g-ir-annotation-tool g-ir-doc-tool g-ir-inspect g-ir-dep-tool
-diff -urN gobject-introspection-1.50.0/tools/g-ir-dep-tool.c gobject-introspection-1.50.0-patched/tools/g-ir-dep-tool.c
---- gobject-introspection-1.50.0/tools/g-ir-dep-tool.c	1970-01-01 10:00:00.000000000 +1000
-+++ gobject-introspection-1.50.0-patched/tools/g-ir-dep-tool.c	2016-09-30 00:46:28.923495036 +1000
-@@ -0,0 +1,78 @@
-+
-+/* -*- Mode: C; c-file-style: "gnu"; -*- */
-+/* GObject introspection: typelib dependency scanner
-+ *
-+ * Copyright (C) 2011 Dominique Leuenberger
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+ * Boston, MA 02111-1307, USA.
-+ */
-+
-+#include <glib.h>
-+#include <girepository.h>
-+
-+int main(int argc, char *argv[]) {
-+	GError *err = NULL;
-+	GITypelib *typelib;
-+	gchar **deps;
-+	const gchar *shlibs;
-+	int i;
-+	const char *namespace = argv[1];
-+	const char *version = argv[2];
-+
-+	g_type_init();
-+
-+	if (argc < 2 || argc > 3) {
-+		g_print ("Usage: %s <typelib> [<version>]\n\n", argv[0]);
-+		g_print ("       typelib: The namespace of the typelib to inspect\n");
-+		g_print ("       version: The version of the typelib to inspect\n");
-+		return 1;
-+	}
-+
-+	/* Try to load the typelib specified as parameter */
-+	typelib = g_irepository_require (NULL, namespace, version, 0, &err);
-+
-+	if (!typelib) {
-+		g_printerr ("ERROR: Failed to load typelib '%s'\n", namespace);
-+		return 2;
-+	}
-+
-+	/* Finding all the typelib based Requires */
-+	deps = g_irepository_get_dependencies (NULL, namespace);
-+	if (deps) {
-+		for (i=0; deps[i]; i++) {
-+			g_print ("typelib: %s\n", deps[i]);
-+		}
-+		g_strfreev (deps);
-+	}
-+
-+	/* Finding the shared library we depend on (if any) */
-+	shlibs = g_irepository_get_shared_library (NULL, namespace);
-+
-+	if (shlibs != NULL && shlibs[0] != '\0')
-+	{
-+		/* libs is a comma-separated list of libraries */
-+		gchar **libs = g_strsplit (shlibs, ",", 0);
-+
-+		for (i = 0; libs[i]; i++)
-+		{
-+			g_print ("shlib: %s\n", libs[i]);
-+		}
-+	}
-+
-+	g_typelib_free (typelib);
-+
-+	return 0;
-+}
diff --git a/gi-find-deps.sh b/gi-find-deps.sh
index c8abf40..ad127f0 100644
--- a/gi-find-deps.sh
+++ b/gi-find-deps.sh
@@ -9,7 +9,7 @@
 function split_name_version {
 base=$1
 tsymbol=${base%-*}
-# Sometimes we get a Requires on Gdk.Settings.foo, bebause you can directly use imports.gi.Gdk.Settings.Foo in Javascript.
+# Sometimes we get a Requires on Gdk.Settings.foo, because you can directly use imports.gi.Gdk.Settings.Foo in Javascript.
 # We know that the symbol in this case is called Gdk, so we cut everything after the . away.
 symbol=$(echo $tsymbol | awk -F. '{print $1}')
 version=${base#*-}
@@ -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.
@@ -55,12 +55,12 @@ for resource in $($gresourcecmd list "$1" 2>/dev/null); do
   mkdir -p $tmpdir/$(dirname $resource)
   $gresourcecmd extract "$1" $resource > $tmpdir/$resource
 done
-find $tmpdir -type f | sh $0 -R
+find $tmpdir -type f | sort | sh $0 -R
 rm -rf "$tmpdir"
 }
 
 function python_requires {
-	for module in $(grep -h -P "from gi\.repository import (\w+)" $1 | sed -e 's:#.*::' -e 's:raise ImportError.*::' -e 's:.*"from gi.repository import .*".*::' | sed -e 's,from gi.repository import,,' -r -e 's:\s+$::g' -e 's:\s+as\s+\w+::g' -e 's:,: :g'); do
+	for module in $(grep -h -P "^\s*from gi\.repository import (\w+)" $1 | sed -e 's:#.*::' -e 's:raise ImportError.*::' -e 's:.*"from gi.repository import .*".*::' | sed -e 's,from gi.repository import,,' -r -e 's:\s+$::g' -e 's:\s+as\s+\w+::g' -e 's:,: :g'); do
 		split_name_version $module
 		print_req_prov
 		# Temporarly disabled... this is not true if the python code is written for python3... And there seems no real 'way' to identify this.
@@ -70,9 +70,20 @@ function python_requires {
 		split_name_version $module
 		print_req_prov
 	done
+        # python glue layers (/gi/overrides) import their typelibs slightly different
+	for module in $(grep -h -P -o "=\s+(get_introspection_module\(['\"][^'\"]+['\"]\))" $1 | sed -e 's:#.*::' -e 's:=.*get_introspection_module::' -e "s:[()\"' ]::g"); do
+		split_name_version $module
+		print_req_prov
+	done
 }
 
 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 ' ' | awk -F ':' '{print $1}'); 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
@@ -82,6 +93,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
@@ -142,7 +159,7 @@ function typelib_requires {
 	split_name_version $(basename $1 | sed 's,.typelib$,,')
 	oldIFS=$IFS
 	IFS=$'\n'
-	for req in $(g-ir-dep-tool $symbol $version); do
+	for req in $(g-ir-inspect --print-shlibs --print-typelibs $symbol --version $version); do
 		case $req in
 			typelib:*)
 				module=${req#typelib: }
@@ -168,8 +185,9 @@ 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';
+#   . const { foo, bar } = imports.gi;
 #   . The imports can be listed on one line, and we catch them.
 
 while read file; do
@@ -188,7 +206,7 @@ while read file; do
 			;;
 		*)
 			case $(file -b $file) in
-				Python\ script*)
+				*[Pp]ython*script*)
 					python_requires "$file"
 					;;
 				*ELF*)
@@ -215,14 +233,12 @@ function inList() {
   return 1
 }
 
-x64bitarch="x86_64 ppc64 ppc64le s390x ia64 aarch64 znver1 riscv64"
-
-export RPM_BUILD_ROOT=$2
+x64bitarch="x86_64 ppc64 ppc64le s390x ia64 aarch64 riscv64"
 
 for path in \
 	$(for tlpath in \
 	$(find ${RPM_BUILD_ROOT}/usr/lib64 ${RPM_BUILD_ROOT}/usr/lib /usr/lib64 /usr/lib -name '*.typelib' 2>/dev/null); do
-        	dirname $tlpath; done | uniq ); do
+		dirname $tlpath; done | sort --unique ); do
 	export GI_TYPELIB_PATH=$GI_TYPELIB_PATH:$path
 done
 
diff --git a/gobject-introspection.spec b/gobject-introspection.spec
index 71d1ffe..2f651e6 100644
--- a/gobject-introspection.spec
+++ b/gobject-introspection.spec
@@ -9,7 +9,7 @@
 Summary:	GObject Introspection
 Name:		gobject-introspection
 Version:	1.62.0
-Release:	1
+Release:	2
 License:	GPLv2+, LGPLv2+, MIT
 Group:		Development/C
 Url:		http://live.gnome.org/GObjectIntrospection
@@ -19,8 +19,6 @@ Source1:	gi-find-deps.sh
 Source2:	typelib.macros
 Source3:	gobject-introspection-typelib.template
 Source4:	typelib.attr
-# PATCH-FIX-UPSTREAM g-ir-dep-tool.patch bgo#665672 dimstar@opensuse.org -- Add g-ir-dep-tool to get further automatic dependencies.
-#Patch0:		g-ir-dep-tool.patch
 Patch1:		gobject-introspection-1.54.1-lto.patch
 Patch2:		python3-linking.patch
 
Not Available

benbullard79 [@T] cox.netNo Comment.1610d 10hrs
benbullard79 [@T] cox.netNo Comment.1608d 10hrs
benbullard79 [@T] cox.netNo Comment.1608d 10hrs