Debian Codegraph @

debian/patches/clutter-meson-Produce-all-Clutter-gir-files.patch

raw
1 From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <[email protected]>
2 Date: Fri, 10 Mar 2023 07:59:16 +0100
3 Subject: clutter/meson: Produce all Clutter gir files
4
5 ---
6 clutter/meson.build | 101 +++++++++++++++++++++++++++++++++++++++++++++-------
7 1 file changed, 89 insertions(+), 12 deletions(-)
8
9 diff --git a/clutter/meson.build b/clutter/meson.build
10 index 2bbea81..fa35984 100644
11 --- a/clutter/meson.build
12 +++ b/clutter/meson.build
13 @@ -328,7 +328,7 @@ clutter_version_h.set('CLUTTER_MAJOR_VERSION', clutter_major_version)
14 clutter_version_h.set('CLUTTER_MINOR_VERSION', clutter_minor_version)
15 clutter_version_h.set('CLUTTER_MICRO_VERSION', clutter_micro_version)
16 clutter_version_h.set('CLUTTER_VERSION', meson.project_version())
17 -configure_file(
18 +clutter_version_header = configure_file(
19 input: 'clutter-version.h.in',
20 output: 'clutter-version.h',
21 configuration: clutter_version_h,
22 @@ -375,7 +375,7 @@ clutter_config += '#define CLUTTER_INPUT_NULL "null"'
23
24 clutter_config_h = configuration_data()
25 clutter_config_h.set('CLUTTER_CONFIG_DEFINES', '\n'.join(clutter_config))
26 -configure_file(
27 +clutter_config_header = configure_file(
28 input: 'clutter-config.h.in',
29 output: 'clutter-config.h',
30 configuration: clutter_config_h,
31 @@ -439,7 +439,7 @@ if enabled_backends.contains('x11')
32
33 backend_deps += x11_deps
34
35 - backend_sources += [
36 + x11_sources = [
37 'x11/clutter-backend-x11.c',
38 'x11/clutter-device-manager-core-x11.c',
39 'x11/clutter-event-x11.c',
40 @@ -451,27 +451,31 @@ if enabled_backends.contains('x11')
41 ]
42
43 if build_xi2
44 - backend_sources += [
45 + x11_sources += [
46 'x11/clutter-device-manager-xi2.c',
47 'x11/clutter-input-device-xi2.c',
48 ]
49 endif
50
51 - backend_sources += [
52 + x11_sources += [
53 'x11/xsettings/xsettings-client.c',
54 'x11/xsettings/xsettings-common.c',
55 ]
56
57 - install_headers([
58 - 'x11/clutter-x11.h',
59 - 'x11/clutter-x11-texture-pixmap.h',
60 + x11_headers = [
61 + 'x11/clutter-x11.h',
62 + 'x11/clutter-x11-texture-pixmap.h',
63
64 - 'x11/clutter-glx.h',
65 - 'x11/clutter-glx-texture-pixmap.h',
66 - ],
67 + 'x11/clutter-glx.h',
68 + 'x11/clutter-glx-texture-pixmap.h',
69 + ]
70 +
71 + install_headers(x11_headers,
72 install_dir: join_paths(clutter_full_includedir, 'x11'),
73 )
74
75 + backend_sources += x11_sources
76 +
77 backend_pc_files += [
78 [ 'clutter-x11-@0@'.format(clutter_api_version), 'Clutter (X11)', x11_deps ],
79 [ 'clutter-glx-@0@'.format(clutter_api_version), 'Clutter (X11)', x11_deps ],
80 @@ -483,14 +487,16 @@ if enabled_backends.contains('gdk')
81
82 backend_deps += gdk_dep
83
84 - backend_sources += [
85 + gdk_sources = [
86 'gdk/clutter-backend-gdk.c',
87 'gdk/clutter-device-manager-gdk.c',
88 'gdk/clutter-event-gdk.c',
89 'gdk/clutter-input-device-gdk.c',
90 'gdk/clutter-master-clock-gdk.c',
91 'gdk/clutter-stage-gdk.c',
92 + 'gdk/clutter-gdk.h',
93 ]
94 + backend_sources += gdk_sources
95
96 backend_pc_files += [
97 [ 'clutter-gdk-@0@'.format(clutter_api_version), 'Clutter (GDK)', [gdk_dep] ],
98 @@ -753,6 +759,8 @@ libclutter = library(
99 )
100
101 introspected_sources = [
102 + clutter_config_header,
103 + clutter_version_header,
104 clutter_public_headers,
105 sources,
106 clutter_deprecated_headers,
107 @@ -783,6 +791,75 @@ if get_option('introspection')
108 '-DCLUTTER_COMPILATION=1',
109 ],
110 )
111 +
112 + libclutter_gir_target = libclutter_gir[0]
113 +
114 + gnome.generate_gir(
115 + libclutter,
116 + sources: cally_sources + cally_headers,
117 + namespace: 'Cally',
118 + nsversion: clutter_api_version,
119 + export_packages: 'cally-' + clutter_api_version,
120 + includes: libclutter_gir_target,
121 + header: 'cally/cally.h',
122 + install: true,
123 + extra_args: [
124 + '--quiet',
125 + '-DCLUTTER_COMPILATION=1',
126 + ],
127 + )
128 +
129 + if enabled_backends.contains('x11')
130 +
131 + glx_clutter_glx_texture = custom_target(
132 + 'glx-clutter-glx-texture-pixmap.h',
133 + output : 'clutter-glx-texture-pixmap.h',
134 + input : 'x11/clutter-glx-texture-pixmap.h',
135 + command : [
136 + 'sh', '-c',
137 + 'mkdir $1/glx && cp -v $2 $1/glx/$(basename $3) && touch $3', '--',
138 + '@OUTDIR@', '@INPUT@', '@OUTPUT@'],
139 + )
140 +
141 + gnome.generate_gir(
142 + libclutter,
143 + sources: x11_sources + x11_headers + glx_clutter_glx_texture,
144 + namespace: 'ClutterX11',
145 + nsversion: clutter_api_version,
146 + export_packages: 'clutter-x11-' + clutter_api_version,
147 + includes: [
148 + libclutter_gir_target,
149 + 'xlib-2.0',
150 + ],
151 + header: 'clutter/x11/clutter-x11.h',
152 + install: true,
153 + extra_args: [
154 + '-I' + meson.current_source_dir() / '..',
155 + '--quiet',
156 + '-DCLUTTER_COMPILATION=1',
157 + ],
158 + )
159 + endif
160 +
161 + if (enabled_backends.contains('gdk'))
162 + gnome.generate_gir(
163 + libclutter,
164 + sources: gdk_sources,
165 + namespace: 'ClutterGdk',
166 + nsversion: clutter_api_version,
167 + export_packages: 'clutter-gdk-' + clutter_api_version,
168 + includes: [
169 + libclutter_gir_target,
170 + 'Gdk-3.0',
171 + ],
172 + header: 'clutter/gdk/clutter-gdk.h',
173 + install: true,
174 + extra_args: [
175 + '--quiet',
176 + '-DCLUTTER_COMPILATION=1',
177 + ],
178 + )
179 + endif
180 else
181 libclutter_gir = []
182 endif