gobject-introspection/7c1178069f1c58a05ec56a94ca6ba124215a947b.patch
Bjørn Lie 8170335435 Accepting request 952232 from GNOME:Next
- Add upstream patches to fix build with meson 0.61.0 and newer:
  + 7c1178069f1c58a05ec56a94ca6ba124215a947b.patch
  + effb1e09dee263cdac4ec593e8caf316e6f01fe2.patch
  + 827494d6415b696a98fa195cbd883b50cc893bfc.patch

OBS-URL: https://build.opensuse.org/request/show/952232
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=227
2022-02-08 10:58:40 +00:00

86 lines
4.2 KiB
Diff

From 7c1178069f1c58a05ec56a94ca6ba124215a947b Mon Sep 17 00:00:00 2001
From: Emmanuele Bassi <ebassi@gnome.org>
Date: Tue, 11 Jan 2022 15:57:37 +0000
Subject: [PATCH] build: Do not use deprecated API
---
gir/meson.build | 18 +++++++++---------
tests/meson.build | 4 ++--
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/gir/meson.build b/gir/meson.build
index 5d646335..93b7e77d 100644
--- a/gir/meson.build
+++ b/gir/meson.build
@@ -98,8 +98,8 @@ glib_command = scanner_command + [
if dep_type == 'pkgconfig'
glib_command += ['--external-library', '--pkg=glib-2.0']
- glib_libdir = get_option('gi_cross_pkgconfig_sysroot_path') + glib_dep.get_pkgconfig_variable('libdir')
- glib_incdir = get_option('gi_cross_pkgconfig_sysroot_path') + join_paths(glib_dep.get_pkgconfig_variable('includedir'), 'glib-2.0')
+ glib_libdir = get_option('gi_cross_pkgconfig_sysroot_path') + glib_dep.get_variable(pkgconfig: 'libdir')
+ glib_incdir = get_option('gi_cross_pkgconfig_sysroot_path') + join_paths(glib_dep.get_variable(pkgconfig: 'includedir'), 'glib-2.0')
glib_libincdir = join_paths(glib_libdir, 'glib-2.0', 'include')
glib_files += join_paths(glib_incdir, 'gobject', 'glib-types.h')
glib_files += join_paths(glib_libincdir, 'glibconfig.h')
@@ -133,8 +133,8 @@ elif dep_type == 'internal'
# We know exactly what headers will be installed, so just fetch that
glib_subproject = subproject('glib')
- glibproj_sourcedir = join_paths(meson.source_root(), subprojdir, 'glib')
- glibproj_builddir = join_paths(meson.build_root(), subprojdir, 'glib')
+ glibproj_sourcedir = join_paths(meson.project_source_root(), subprojdir, 'glib')
+ glibproj_builddir = join_paths(meson.project_build_root(), subprojdir, 'glib')
glib_files += join_paths(glibproj_sourcedir, 'gobject', 'glib-types.h')
@@ -184,13 +184,13 @@ elif dep_type == 'internal'
# XXX: We need include paths to all glib dependencies too. We assume that the
# dependencies are only libffi and proxy-libintl, and that they are used as
# subprojects. In the worst case we add paths to non-existent directories.
- ffi_incdir = join_paths(meson.build_root(), subprojdir, 'libffi', 'include')
+ ffi_incdir = join_paths(meson.project_build_root(), subprojdir, 'libffi', 'include')
glib_includes += ['-I' + ffi_incdir]
- intl_incdir = join_paths(meson.source_root(), subprojdir, 'proxy-libintl')
+ intl_incdir = join_paths(meson.project_source_root(), subprojdir, 'proxy-libintl')
glib_includes += ['-I' + intl_incdir]
- ffi_libdir = join_paths(meson.build_root(), subprojdir, 'libffi', 'src')
- intl_libdir = join_paths(meson.build_root(), subprojdir, 'proxy-libintl')
+ ffi_libdir = join_paths(meson.project_build_root(), subprojdir, 'libffi', 'src')
+ intl_libdir = join_paths(meson.project_build_root(), subprojdir, 'proxy-libintl')
glib_libpaths = [
'-L' + ffi_libdir,
'-L' + intl_libdir,
@@ -412,7 +412,7 @@ if giounix_dep.found()
dep_type = giounix_dep.type_name()
if dep_type == 'pkgconfig'
gio_command += ['--pkg=gio-unix-2.0']
- giounix_includedir = get_option('gi_cross_pkgconfig_sysroot_path') + join_paths(giounix_dep.get_pkgconfig_variable('includedir'), 'gio-unix-2.0')
+ giounix_includedir = get_option('gi_cross_pkgconfig_sysroot_path') + join_paths(giounix_dep.get_variable(pkgconfig: 'includedir'), 'gio-unix-2.0')
# Get the installed gio-unix header list
ret = run_command(python, '-c', globber.format(join_paths(giounix_includedir, 'gio', '*.h')))
if ret.returncode() != 0
diff --git a/tests/meson.build b/tests/meson.build
index 48981c60..abb51f58 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,4 +1,4 @@
-sub_build_root = join_paths(meson.build_root(), 'subprojects')
+sub_build_root = join_paths(meson.project_build_root(), 'subprojects')
test_env_common_path = []
if glib_dep.type_name() == 'internal' and host_system == 'windows'
test_env_common_path += [
@@ -13,7 +13,7 @@ endif
if libffi_dep.type_name() == 'internal' and host_system == 'windows'
test_env_common_path += [join_paths(sub_build_root, 'libffi', 'src')]
endif
-test_env_common_pypath = [meson.build_root()]
+test_env_common_pypath = [meson.project_build_root()]
test_regress_sources = files('scanner/regress.c')
--
GitLab