From c5d0ae65a26a337b486755060053d15f9ed21383 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Sun, 10 Mar 2019 17:41:52 +0100 Subject: [PATCH] gobject-introspection: update to 1.60.0. --- ...t-cross-compilation-support-to-meson.patch | 35 +- ...08-g-ir-tools-respect-gir_dir_prefix.patch | 64 ---- .../patches/fix-cross-tests.patch | 311 ++++++++++++++++++ srcpkgs/gobject-introspection/template | 16 +- 4 files changed, 330 insertions(+), 96 deletions(-) delete mode 100644 srcpkgs/gobject-introspection/patches/0008-g-ir-tools-respect-gir_dir_prefix.patch create mode 100644 srcpkgs/gobject-introspection/patches/fix-cross-tests.patch diff --git a/srcpkgs/gobject-introspection/patches/0001-Port-cross-compilation-support-to-meson.patch b/srcpkgs/gobject-introspection/patches/0001-Port-cross-compilation-support-to-meson.patch index 80c9e71ad57..ba6f21b43c6 100644 --- a/srcpkgs/gobject-introspection/patches/0001-Port-cross-compilation-support-to-meson.patch +++ b/srcpkgs/gobject-introspection/patches/0001-Port-cross-compilation-support-to-meson.patch @@ -1,19 +1,5 @@ -From ea25a5a755bc839d5b504aac207f860ae68109bc Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 15 Nov 2018 15:10:05 +0100 -Subject: [PATCH] Port cross-compilation support to meson - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin - ---- - gir/meson.build | 59 ++++++++++++++++++++++++++++++++++------------- - meson.build | 4 +++- - meson_options.txt | 20 ++++++++++++++++ - 3 files changed, 66 insertions(+), 17 deletions(-) - -diff --git a/gir/meson.build b/gir/meson.build -index 1cb514a..f873068 100644 +diff --git gir/meson.build gir/meson.build +index 3d021bc..9852996 100644 --- a/gir/meson.build +++ b/gir/meson.build @@ -36,15 +36,27 @@ gir_files = [ @@ -86,7 +72,7 @@ index 1cb514a..f873068 100644 # Get the installed gio-unix header list ret = run_command(python, '-c', globber.format(join_paths(giounix_includedir, 'gio', '*.h'))) if ret.returncode() != 0 -@@ -416,15 +434,24 @@ gir_files += custom_target('gir-girepository', +@@ -420,16 +438,25 @@ gir_files += custom_target('gir-girepository', ] ) @@ -102,8 +88,9 @@ index 1cb514a..f873068 100644 + ] +endif + + typelibs = [] foreach gir : gir_files - custom_target('generate-typelib-@0@'.format(gir).underscorify(), + typelibs += custom_target('generate-typelib-@0@'.format(gir).underscorify(), input: gir, output: '@BASENAME@.typelib', depends: [gobject_gir, ], @@ -115,11 +102,11 @@ index 1cb514a..f873068 100644 install: true, install_dir: typelibdir, ) -diff --git a/meson.build b/meson.build -index 17acd82..e0bb495 100644 +diff --git meson.build meson.build +index 0ab2dc3..2544ff3 100644 --- a/meson.build +++ b/meson.build -@@ -81,7 +81,9 @@ libffi_dep = dependency('libffi', +@@ -163,7 +163,9 @@ endif subdir('girepository') subdir('tools') subdir('giscanner') @@ -130,12 +117,12 @@ index 17acd82..e0bb495 100644 subdir('examples') subdir('docs') subdir('tests') -diff --git a/meson_options.txt b/meson_options.txt -index ee6958d..b168142 100644 +diff --git meson_options.txt meson_options.txt +index 445a68a..a325511 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -25,3 +25,23 @@ option('python', type: 'string', value: 'python3', - option('gir-dir-prefix', type: 'string', + option('gir_dir_prefix', type: 'string', description: 'Intermediate prefix for gir installation under ${prefix}' ) + diff --git a/srcpkgs/gobject-introspection/patches/0008-g-ir-tools-respect-gir_dir_prefix.patch b/srcpkgs/gobject-introspection/patches/0008-g-ir-tools-respect-gir_dir_prefix.patch deleted file mode 100644 index c1800c46743..00000000000 --- a/srcpkgs/gobject-introspection/patches/0008-g-ir-tools-respect-gir_dir_prefix.patch +++ /dev/null @@ -1,64 +0,0 @@ -g-ir-tools: respect gir_dir_prefix - -Configure option gir_dir_prefix is used to configure install dir for -.gir files, so add its value to include file search paths. - -Upstream-Status: Accepted [https://gitlab.gnome.org/GNOME/gobject-introspection/commit/3fe995a] - -Signed-off-by: Kai Kang ---- - giscanner/transformer.py | 1 + - tests/warn/warningtester.py | 1 + - tools/g-ir-tool-template.in | 10 ++++++++++ - 6 files changed, 15 insertions(+), 2 deletions(-) - - g-ir-scanner: tools/g-ir-tool-template.in _giscanner.la Makefile - $(AM_V_GEN) sed $(TOOL_SUBSTITUTIONS) -e s,@TOOL_MODULE\@,scannermain, -e s,@TOOL_FUNCTION\@,scanner_main, $< > $@.tmp && mv $@.tmp $@ -diff --git a/giscanner/transformer.py b/giscanner/transformer.py -index 335e229f..2c412339 100644 ---- a/giscanner/transformer.py -+++ b/giscanner/transformer.py -@@ -184,6 +184,7 @@ None.""" - def _get_gi_data_dirs(self): - data_dirs = utils.get_system_data_dirs() - data_dirs.append(DATADIR) -+ data_dirs.append(GIRDIR) - if os.name != 'nt': - # For backwards compatibility, was always unconditionally added to the list. - data_dirs.append('/usr/share') -diff --git a/tests/warn/warningtester.py b/tests/warn/warningtester.py -index f17c8889..be5aec13 100644 ---- a/tests/warn/warningtester.py -+++ b/tests/warn/warningtester.py -@@ -18,6 +18,7 @@ sys.path.insert(0, path) - - # Not correct, but enough to get the tests going uninstalled - builtins.__dict__['DATADIR'] = path -+builtins.__dict__['GIRDIR'] = '' - - from giscanner.annotationparser import GtkDocCommentBlockParser - from giscanner.ast import Include, Namespace -diff --git a/tools/g-ir-tool-template.in b/tools/g-ir-tool-template.in -index ed33d16b..b9cf0911 100755 ---- a/tools/g-ir-tool-template.in -+++ b/tools/g-ir-tool-template.in -@@ -60,6 +60,16 @@ if not os.path.isdir(os.path.join(datadir, 'gir-1.0')): - - builtins.__dict__['DATADIR'] = datadir - -+# Respect gir_dir_prefix for meson and autotools -+girdir = '' -+# for meson -+if '@gir_dir_prefix@' and not '@gir_dir_prefix@'.startswith('@'): -+ girdir = os.path.abspath(os.path.join(filedir, '..', '@gir_dir_prefix@')) -+# for autotools -+elif '@GIR_DIR@' and not '@GIR_DIR@'.startswith('@'): -+ girdir = os.path.dirname(os.path.abspath('@GIR_DIR@')) -+builtins.__dict__['GIRDIR'] = girdir -+ - # Again, relative paths first so that the installation prefix is relocatable - pylibdir = os.path.abspath(os.path.join(filedir, '..', 'lib', 'gobject-introspection')) - --- -2.17.0 - diff --git a/srcpkgs/gobject-introspection/patches/fix-cross-tests.patch b/srcpkgs/gobject-introspection/patches/fix-cross-tests.patch new file mode 100644 index 00000000000..75c3804d6a6 --- /dev/null +++ b/srcpkgs/gobject-introspection/patches/fix-cross-tests.patch @@ -0,0 +1,311 @@ +diff --git tests/meson.build tests/meson.build +index 7e01595..813a1d1 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -45,13 +45,24 @@ test_install_dir = join_paths(get_option('datadir'), 'gobject-introspection-1.0' + + install_data(installed_sources, install_dir: test_install_dir) + ++if get_option('enable-host-gi') ++ ev_scanner_command = [ ++ 'g-ir-scanner', ++ ] ++else ++ ev_scanner_command = [ ++ python, ++ girscanner, ++ ] ++endif ++ ++ + # Generate everything.h and everything.c: + test_everything_files = custom_target('everything', + output: ['everything.h', 'everything.c'], + depends: typelibs, + command: [ +- python, +- girscanner, ++ ev_scanner_command, + '--generate-typelib-tests=Everything,@OUTPUT0@,@OUTPUT1@', + '--function-decoration=_GI_TEST_EXTERN', + '--include-first-in-src=config.h', +@@ -101,13 +112,7 @@ if glib_dep.type_name() == 'pkgconfig' + output: 'Everything-1.0.gir', + depends: [everything_lib] + typelibs, + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', +- '--reparse-validate', +- '--add-include-path', join_paths(meson.source_root(), 'gir'), +- '--add-include-path', join_paths(meson.build_root(), 'gir'), ++ scanner_command, + '--warn-all', + '--warn-error', + '--namespace=Everything', +@@ -125,13 +130,7 @@ if glib_dep.type_name() == 'pkgconfig' + output: 'GIMarshallingTests-1.0.gir', + depends: [gimarshallingtests_lib] + typelibs, + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', +- '--reparse-validate', +- '--add-include-path', join_paths(meson.source_root(), 'gir'), +- '--add-include-path', join_paths(meson.build_root(), 'gir'), ++ scanner_command, + '--warn-all', + '--warn-error', + '--namespace=GIMarshallingTests', +@@ -145,15 +144,25 @@ if glib_dep.type_name() == 'pkgconfig' + ] + ) + ++if get_option('enable-gi-cross-wrapper') != '' ++ gircompiler_command = [get_option('enable-gi-cross-wrapper'), gircompiler.full_path(), '-o', '@OUTPUT@', '@INPUT@', ++ '--includedir', meson.current_build_dir(), ++ '--includedir', meson.current_source_dir(), ++ ] ++else ++ gircompiler_command = [gircompiler, '-o', '@OUTPUT@', '@INPUT@', ++ '--includedir', meson.current_build_dir(), ++ '--includedir', join_paths(meson.build_root(), 'gir'), ++ ] ++endif ++ ++ + foreach gir : test_gir_files + test_typelibs += custom_target('generate-typelib-@0@'.format(gir).underscorify(), + input: gir, + output: '@BASENAME@.typelib', + depends: [gobject_gir, ], +- command: [gircompiler, '-o', '@OUTPUT@', '@INPUT@', +- '--includedir', join_paths(meson.build_root(), 'gir'), +- '--includedir', meson.current_build_dir() +- ], ++ command: gircompiler_command, + ) + endforeach + +diff --git tests/offsets/meson.build tests/offsets/meson.build +index ca1471f..3a86fb3 100644 +--- a/tests/offsets/meson.build ++++ b/tests/offsets/meson.build +@@ -18,13 +18,7 @@ if glib_dep.type_name() == 'pkgconfig' + output: 'Offsets-1.0.gir', + depends: [test_offsets_lib] + typelibs, + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', +- '--reparse-validate', +- '--add-include-path', join_paths(meson.source_root(), 'gir'), +- '--add-include-path', join_paths(meson.build_root(), 'gir'), ++ scanner_command, + '--warn-all', + '--warn-error', + '--namespace=Offsets', +@@ -43,10 +37,7 @@ if glib_dep.type_name() == 'pkgconfig' + input: test_offsets_gir, + output: '@BASENAME@.typelib', + depends: [gobject_gir, ], +- command: [gircompiler, '-o', '@OUTPUT@', '@INPUT@', +- '--includedir', join_paths(meson.build_root(), 'gir'), +- '--includedir', meson.current_build_dir() +- ], ++ command: gircompiler_command, + ) + + gitestoffsets_exe = executable('gitestoffsets', +diff --git tests/scanner/meson.build tests/scanner/meson.build +index 4210488..b311cfd 100644 +--- a/tests/scanner/meson.build ++++ b/tests/scanner/meson.build +@@ -99,25 +99,13 @@ regress_lib = shared_library('regress-1.0', + + python_path = run_command(python, ['-c', 'import sys; sys.stdout.write(sys.executable)']).stdout() + +-gircompiler_command = [ +- gircompiler, '-o', '@OUTPUT@', '@INPUT@', +- '--includedir', join_paths(meson.build_root(), 'gir'), +- '--includedir', meson.current_build_dir(), +-] +- + if glib_dep.type_name() == 'pkgconfig' + typedef_gir = custom_target('gir-typedef', + input: ['typedefs.c', 'typedefs.h'], + output: 'Typedefs-1.0.gir', + depends: [typedef_lib] + typelibs, + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', +- '--reparse-validate', +- '--add-include-path', join_paths(meson.source_root(), 'gir'), +- '--add-include-path', join_paths(meson.build_root(), 'gir'), ++ scanner_command, + '--warn-all', + '--warn-error', + '--namespace=Typedefs', +@@ -149,13 +137,7 @@ if glib_dep.type_name() == 'pkgconfig' + output: 'Bar-1.0.gir', + depends: [barapp_lib] + typelibs, + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', +- '--reparse-validate', +- '--add-include-path', join_paths(meson.source_root(), 'gir'), +- '--add-include-path', join_paths(meson.build_root(), 'gir'), ++ scanner_command, + '--warn-all', + '--warn-error', + '--namespace=Bar', +@@ -186,13 +168,7 @@ if glib_dep.type_name() == 'pkgconfig' + output: 'SLetter-1.0.gir', + depends: [sletter_lib] + typelibs, + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', +- '--reparse-validate', +- '--add-include-path', join_paths(meson.source_root(), 'gir'), +- '--add-include-path', join_paths(meson.build_root(), 'gir'), ++ scanner_command, + '--warn-all', + '--warn-error', + '--namespace=SLetter', +@@ -222,13 +198,7 @@ if glib_dep.type_name() == 'pkgconfig' + output: 'WarnLib-1.0.gir', + depends: [warnlib_lib] + typelibs, + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', +- '--reparse-validate', +- '--add-include-path', join_paths(meson.source_root(), 'gir'), +- '--add-include-path', join_paths(meson.build_root(), 'gir'), ++ scanner_command, + '--namespace=WarnLib', + '--nsversion=1.0', + '--include=Gio-2.0', +@@ -256,13 +226,7 @@ if glib_dep.type_name() == 'pkgconfig' + output: 'Utility-1.0.gir', + depends: [utility_lib] + typelibs, + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', +- '--reparse-validate', +- '--add-include-path', join_paths(meson.source_root(), 'gir'), +- '--add-include-path', join_paths(meson.build_root(), 'gir'), ++ scanner_command, + '--warn-all', + '--warn-error', + '--namespace=Utility', +@@ -292,13 +256,7 @@ if glib_dep.type_name() == 'pkgconfig' + output: 'GtkFrob-1.0.gir', + depends: [gtkfrob_lib] + typelibs, + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', +- '--reparse-validate', +- '--add-include-path', join_paths(meson.source_root(), 'gir'), +- '--add-include-path', join_paths(meson.build_root(), 'gir'), ++ scanner_command, + '--warn-all', + '--warn-error', + '--namespace=GtkFrob', +@@ -329,13 +287,7 @@ if glib_dep.type_name() == 'pkgconfig' + output: 'GetType-1.0.gir', + depends: [gettype_lib] + typelibs, + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', +- '--reparse-validate', +- '--add-include-path', join_paths(meson.source_root(), 'gir'), +- '--add-include-path', join_paths(meson.build_root(), 'gir'), ++ scanner_command, + '--namespace=GetType', + '--nsversion=1.0', + '--identifier-prefix=GetType', +@@ -365,10 +317,7 @@ if glib_dep.type_name() == 'pkgconfig' + output: 'Symbolfilter-1.0.gir', + depends: typelibs, + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', ++ scanner_command, + '--reparse-validate', + '--namespace=Symbolfilter', + '--nsversion=1.0', +@@ -391,12 +340,8 @@ if glib_dep.type_name() == 'pkgconfig' + output: 'Identfilter-1.0.gir', + depends: typelibs, + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', ++ scanner_command, + '--accept-unprefixed', +- '--reparse-validate', + '--namespace=Identfilter', + '--nsversion=1.0', + '--header-only', +@@ -418,13 +363,9 @@ if glib_dep.type_name() == 'pkgconfig' + output: 'Headeronly-1.0.gir', + depends: typelibs, + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', ++ scanner_command, + '--warn-all', + '--warn-error', +- '--reparse-validate', + '--namespace=Headeronly', + '--nsversion=1.0', + '--header-only', +@@ -452,13 +393,7 @@ if glib_dep.type_name() == 'pkgconfig' + output: 'Regress-1.0.gir', + depends: [regress_lib] + typelibs + [utility_gir], + command: [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', +- '--reparse-validate', +- '--add-include-path', join_paths(meson.source_root(), 'gir'), +- '--add-include-path', join_paths(meson.build_root(), 'gir'), ++ scanner_command, + '--add-include-path', meson.current_build_dir(), + '--namespace=Regress', + '--nsversion=1.0', +@@ -484,7 +419,10 @@ if glib_dep.type_name() == 'pkgconfig' + 'generate-typelib-regress', + input: regress_gir, + output: '@BASENAME@.typelib', +- command: gircompiler_command, ++ command: [ ++ gircompiler_command, ++ '--includedir', meson.current_build_dir(), ++ ] + ) + test_typelibs += regress_typelib + endif diff --git a/srcpkgs/gobject-introspection/template b/srcpkgs/gobject-introspection/template index e225444f9d4..07d0abbe16b 100644 --- a/srcpkgs/gobject-introspection/template +++ b/srcpkgs/gobject-introspection/template @@ -1,7 +1,7 @@ # Template file for 'gobject-introspection' pkgname=gobject-introspection -version=1.58.3 -revision=3 +version=1.60.0 +revision=1 build_style=meson pycompile_dirs="usr/lib/${pkgname}/giscanner" hostmakedepends="flex pkg-config" @@ -12,11 +12,16 @@ maintainer="Enno Boland " license="GPL-2.0-or-later, LGPL-2.1-or-later" homepage="https://wiki.gnome.org/Projects/GObjectIntrospection" distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz" -checksum=025b632bbd944dcf11fc50d19a0ca086b83baf92b3e34936d008180d28cdc3c8 +checksum=9efe4090cb59717126701e97062e784773f800b8d47af14c4d278ebf194df35d pycompile_version="$py3_ver" patch_args="-Np1" +case "$XBPS_TARGET_MACHINE" in + i686-musl|x86_64-musl) ;; + *-musl) broken="Errors out when building any package that uses gir" ;; +esac + if [ "$CROSS_BUILD" ]; then hostmakedepends+=" gobject-introspection qemu-user-static prelink-cross" configure_args+=" -Denable-host-gi=true @@ -25,11 +30,6 @@ if [ "$CROSS_BUILD" ]; then -Dpkgconfig-sysroot-path=${XBPS_CROSS_BASE}" fi -case "$XBPS_TARGET_MACHINE" in - i686-musl|x86_64-musl) ;; - *-musl) broken="Errors out when building any package that uses gir" ;; -esac - post_install() { # Install our wrappers system-wide, they are required for building all other # gobject-based packages.