Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/gobject-introspection/files/, dev-libs/gobject-introspection/
Date: Tue, 18 Jan 2022 22:25:21
Message-Id: 1642544705.b1cf68faebc69cf8ce20b257bb7e6b185bfac279.sam@gentoo
1 commit: b1cf68faebc69cf8ce20b257bb7e6b185bfac279
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 18 22:25:05 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 18 22:25:05 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1cf68fa
7
8 dev-libs/gobject-introspection: fix build with meson 0.61
9
10 Closes: https://bugs.gentoo.org/831427
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../gobject-introspection-1.70.0-meson-0.61.patch | 220 +++++++++++++++++++++
14 .../gobject-introspection-1.70.0.ebuild | 6 +-
15 2 files changed, 225 insertions(+), 1 deletion(-)
16
17 diff --git a/dev-libs/gobject-introspection/files/gobject-introspection-1.70.0-meson-0.61.patch b/dev-libs/gobject-introspection/files/gobject-introspection-1.70.0-meson-0.61.patch
18 new file mode 100644
19 index 000000000000..df1663116ccd
20 --- /dev/null
21 +++ b/dev-libs/gobject-introspection/files/gobject-introspection-1.70.0-meson-0.61.patch
22 @@ -0,0 +1,220 @@
23 +https://gitlab.gnome.org/GNOME/gobject-introspection/-/commit/effb1e09dee263cdac4ec593e8caf316e6f01fe2.patch
24 +https://bugs.gentoo.org/831427
25 +
26 +From effb1e09dee263cdac4ec593e8caf316e6f01fe2 Mon Sep 17 00:00:00 2001
27 +From: Emmanuele Bassi <ebassi@×××××.org>
28 +Date: Tue, 11 Jan 2022 15:51:10 +0000
29 +Subject: [PATCH] build: Avoid the doctemplates hack
30 +MIME-Version: 1.0
31 +Content-Type: text/plain; charset=UTF-8
32 +Content-Transfer-Encoding: 8bit
33 +
34 +The hack that copies the doctemplates directory into the build
35 +directory has stopped working with newer versions of Meson; while it's
36 +possible to copy files, custom_target() cannot depend on a directory.
37 +Additionally, the dependency has always been broken.
38 +
39 +Instead, we enumerate the template files—after all, it's not like they
40 +change a lot—and then we list them as dependencies for the test targets.
41 +
42 +Fixes: #414
43 +---
44 + giscanner/doctemplates/devdocs/meson.build | 19 +++++++
45 + giscanner/doctemplates/mallard/meson.build | 63 ++++++++++++++++++++++
46 + giscanner/meson.build | 14 ++---
47 + tests/scanner/meson.build | 24 +++++----
48 + 4 files changed, 98 insertions(+), 22 deletions(-)
49 + create mode 100644 giscanner/doctemplates/devdocs/meson.build
50 + create mode 100644 giscanner/doctemplates/mallard/meson.build
51 +
52 +diff --git a/giscanner/doctemplates/devdocs/meson.build b/giscanner/doctemplates/devdocs/meson.build
53 +new file mode 100644
54 +index 00000000..2037182a
55 +--- /dev/null
56 ++++ b/giscanner/doctemplates/devdocs/meson.build
57 +@@ -0,0 +1,19 @@
58 ++doc_templates += files([
59 ++ 'Gjs/_doc.tmpl',
60 ++ 'Gjs/_index.tmpl',
61 ++ 'Gjs/_method.tmpl',
62 ++ 'Gjs/_methods.tmpl',
63 ++ 'Gjs/_properties.tmpl',
64 ++ 'Gjs/_signals.tmpl',
65 ++ 'Gjs/_staticmethods.tmpl',
66 ++ 'Gjs/_vfuncs.tmpl',
67 ++ 'Gjs/base.tmpl',
68 ++ 'Gjs/callback.tmpl',
69 ++ 'Gjs/class.tmpl',
70 ++ 'Gjs/default.tmpl',
71 ++ 'Gjs/enum.tmpl',
72 ++ 'Gjs/function.tmpl',
73 ++ 'Gjs/interface.tmpl',
74 ++ 'Gjs/method.tmpl',
75 ++ 'Gjs/namespace.tmpl',
76 ++])
77 +diff --git a/giscanner/doctemplates/mallard/meson.build b/giscanner/doctemplates/mallard/meson.build
78 +new file mode 100644
79 +index 00000000..5fe4e2af
80 +--- /dev/null
81 ++++ b/giscanner/doctemplates/mallard/meson.build
82 +@@ -0,0 +1,63 @@
83 ++base_templates = files([
84 ++ 'base.tmpl',
85 ++ 'class.tmpl',
86 ++ 'namespace.tmpl',
87 ++])
88 ++
89 ++c_templates = files([
90 ++ 'C/callback.tmpl',
91 ++ 'C/class.tmpl',
92 ++ 'C/constructor.tmpl',
93 ++ 'C/default.tmpl',
94 ++ 'C/enum.tmpl',
95 ++ 'C/field.tmpl',
96 ++ 'C/function.tmpl',
97 ++ 'C/interface.tmpl',
98 ++ 'C/method.tmpl',
99 ++ 'C/namespace.tmpl',
100 ++ 'C/property.tmpl',
101 ++ 'C/record.tmpl',
102 ++ 'C/signal.tmpl',
103 ++ 'C/vfunc.tmpl',
104 ++])
105 ++
106 ++gjs_templates = files([
107 ++ 'Gjs/callback.tmpl',
108 ++ 'Gjs/class.tmpl',
109 ++ 'Gjs/constructor.tmpl',
110 ++ 'Gjs/default.tmpl',
111 ++ 'Gjs/enum.tmpl',
112 ++ 'Gjs/field.tmpl',
113 ++ 'Gjs/function.tmpl',
114 ++ 'Gjs/interface.tmpl',
115 ++ 'Gjs/method.tmpl',
116 ++ 'Gjs/namespace.tmpl',
117 ++ 'Gjs/property.tmpl',
118 ++ 'Gjs/record.tmpl',
119 ++ 'Gjs/signal.tmpl',
120 ++ 'Gjs/vfunc.tmpl',
121 ++])
122 ++
123 ++py_templates = files([
124 ++ 'Python/callback.tmpl',
125 ++ 'Python/class.tmpl',
126 ++ 'Python/constructor.tmpl',
127 ++ 'Python/default.tmpl',
128 ++ 'Python/enum.tmpl',
129 ++ 'Python/field.tmpl',
130 ++ 'Python/function.tmpl',
131 ++ 'Python/interface.tmpl',
132 ++ 'Python/method.tmpl',
133 ++ 'Python/namespace.tmpl',
134 ++ 'Python/property.tmpl',
135 ++ 'Python/record.tmpl',
136 ++ 'Python/signal.tmpl',
137 ++ 'Python/vfunc.tmpl',
138 ++])
139 ++
140 ++doc_templates += [
141 ++ base_templates,
142 ++ c_templates,
143 ++ gjs_templates,
144 ++ py_templates,
145 ++]
146 +diff --git a/giscanner/meson.build b/giscanner/meson.build
147 +index 41edcd44..3d7dc678 100644
148 +--- a/giscanner/meson.build
149 ++++ b/giscanner/meson.build
150 +@@ -53,17 +53,9 @@ configure_file(input : '../girepository/gdump.c',
151 +
152 + install_subdir('doctemplates', install_dir: giscannerdir)
153 +
154 +-# XXX: this doesn't track the input, but there is nothing to copy many files
155 +-# in meson.
156 +-doc_templates = custom_target('copy-templates',
157 +- input : 'doctemplates',
158 +- output : 'doctemplates',
159 +- command : [
160 +- python, '-c',
161 +- 'import sys, shutil;' +
162 +- 'shutil.rmtree(sys.argv[2], ignore_errors=True);' +
163 +- 'shutil.copytree(sys.argv[1], sys.argv[2])',
164 +- '@INPUT@', '@OUTPUT@'])
165 ++doc_templates = []
166 ++subdir('doctemplates/devdocs')
167 ++subdir('doctemplates/mallard')
168 +
169 + flex = find_program('flex', 'win_flex')
170 + bison = find_program('bison', 'win_bison')
171 +diff --git a/tests/scanner/meson.build b/tests/scanner/meson.build
172 +index 5176b957..b81b3fd5 100644
173 +--- a/tests/scanner/meson.build
174 ++++ b/tests/scanner/meson.build
175 +@@ -525,19 +525,26 @@ foreach gir : test_girs
176 + endforeach
177 +
178 + if has_girdoctool and glib_dep.type_name() == 'pkgconfig'
179 ++ doctool_env = environment()
180 ++ doctool_env.set('srcdir', meson.current_source_dir())
181 ++ doctool_env.set('builddir', meson.current_build_dir())
182 ++
183 + foreach language : ['C', 'Python', 'Gjs']
184 + regress_docs = custom_target(
185 + 'generate-docs-' + language,
186 + input: regress_gir,
187 +- depends: [doc_templates],
188 ++ depend_files: doc_templates,
189 + build_by_default: not cairo_deps_found,
190 ++ env: doctool_env,
191 + output: 'Regress-1.0-' + language,
192 + command: [
193 + python, girdoctool,
194 + '--add-include-path=' + join_paths(build_root, 'gir'),
195 + '--add-include-path=' + meson.current_build_dir(),
196 + '--language', language,
197 +- '@INPUT@', '-o', '@OUTPUT@'],
198 ++ '--templates-dir=' + join_paths(meson.current_source_dir(), '../../giscanner/doctemplates'),
199 ++ '@INPUT@', '-o', '@OUTPUT@',
200 ++ ],
201 + )
202 +
203 + if cairo_deps_found
204 +@@ -546,10 +553,7 @@ if has_girdoctool and glib_dep.type_name() == 'pkgconfig'
205 + python,
206 + args: [gi_tester, 'Regress-1.0-' + language],
207 + depends: [regress_docs],
208 +- env: [
209 +- 'srcdir=' + meson.current_source_dir(),
210 +- 'builddir=' + meson.current_build_dir(),
211 +- ],
212 ++ env: doctool_env,
213 + )
214 + endif
215 + endforeach
216 +@@ -557,9 +561,10 @@ if has_girdoctool and glib_dep.type_name() == 'pkgconfig'
217 + regress_sections = custom_target(
218 + 'generate-docs-sections',
219 + input: regress_gir,
220 +- depends: [doc_templates],
221 ++ depend_files: [doc_templates],
222 + build_by_default: not cairo_deps_found,
223 + output: 'Regress-1.0-sections.txt',
224 ++ env: doctool_env,
225 + command: [
226 + python, girdoctool,
227 + '--add-include-path=' + join_paths(build_root, 'gir'),
228 +@@ -574,10 +579,7 @@ if has_girdoctool and glib_dep.type_name() == 'pkgconfig'
229 + python,
230 + args: [gi_tester, 'Regress-1.0-sections.txt'],
231 + depends: [regress_sections],
232 +- env: [
233 +- 'srcdir=' + meson.current_source_dir(),
234 +- 'builddir=' + meson.current_build_dir(),
235 +- ],
236 ++ env: doctool_env,
237 + )
238 + endif
239 + endif
240 +--
241 +GitLab
242 +
243
244 diff --git a/dev-libs/gobject-introspection/gobject-introspection-1.70.0.ebuild b/dev-libs/gobject-introspection/gobject-introspection-1.70.0.ebuild
245 index fed69d6f20c8..ee6705aed0e9 100644
246 --- a/dev-libs/gobject-introspection/gobject-introspection-1.70.0.ebuild
247 +++ b/dev-libs/gobject-introspection/gobject-introspection-1.70.0.ebuild
248 @@ -1,4 +1,4 @@
249 -# Copyright 1999-2021 Gentoo Authors
250 +# Copyright 1999-2022 Gentoo Authors
251 # Distributed under the terms of the GNU General Public License v2
252
253 EAPI=7
254 @@ -48,6 +48,10 @@ DEPEND="${RDEPEND}
255 )
256 "
257
258 +PATCHES=(
259 + "${FILESDIR}"/${P}-meson-0.61.patch
260 +)
261 +
262 pkg_setup() {
263 python-single-r1_pkg_setup
264 }