vp-build/srcpkgs/colord/patches/add-introspection-switch.patch

200 lines
4.3 KiB
Diff

--- lib/colord/meson.build
+++ lib/colord/meson.build
@@ -146,61 +146,63 @@ pkgg.generate(
description : 'colord is a system daemon for managing color devices',
)
-libcolord_girtarget = gnome.generate_gir(colord,
- sources : [
- 'cd-client.c',
- 'cd-client.h',
- 'cd-client-sync.c',
- 'cd-client-sync.h',
- 'cd-color.c',
- 'cd-color.h',
- 'cd-edid.c',
- 'cd-edid.h',
- 'cd-device.c',
- 'cd-device.h',
- 'cd-device-sync.c',
- 'cd-device-sync.h',
- 'cd-enum.c',
- 'cd-enum.h',
- 'cd-icc.c',
- 'cd-icc.h',
- 'cd-it8.c',
- 'cd-it8.h',
- 'cd-math.c',
- 'cd-math.h',
- 'cd-profile.c',
- 'cd-profile.h',
- 'cd-profile-sync.c',
- 'cd-profile-sync.h',
- 'cd-sensor.c',
- 'cd-sensor.h',
- 'cd-sensor-sync.c',
- 'cd-sensor-sync.h',
- 'cd-spectrum.c',
- 'cd-spectrum.h',
- ],
- nsversion : '1.0',
- namespace : 'Colord',
- symbol_prefix : 'cd',
- identifier_prefix : 'Cd',
- export_packages : 'colord',
- extra_args : [
- '--c-include=colord.h',
- ],
- link_with : colordprivate,
- dependencies : [
- gio,
- glib,
- lcms,
- ],
- includes : [
- 'Gio-2.0',
- 'GObject-2.0',
- ],
- install : true
-)
-libcolord_gir = libcolord_girtarget[0]
-libcolord_typelib = libcolord_girtarget[1]
+if get_option('introspection')
+ libcolord_girtarget = gnome.generate_gir(colord,
+ sources : [
+ 'cd-client.c',
+ 'cd-client.h',
+ 'cd-client-sync.c',
+ 'cd-client-sync.h',
+ 'cd-color.c',
+ 'cd-color.h',
+ 'cd-edid.c',
+ 'cd-edid.h',
+ 'cd-device.c',
+ 'cd-device.h',
+ 'cd-device-sync.c',
+ 'cd-device-sync.h',
+ 'cd-enum.c',
+ 'cd-enum.h',
+ 'cd-icc.c',
+ 'cd-icc.h',
+ 'cd-it8.c',
+ 'cd-it8.h',
+ 'cd-math.c',
+ 'cd-math.h',
+ 'cd-profile.c',
+ 'cd-profile.h',
+ 'cd-profile-sync.c',
+ 'cd-profile-sync.h',
+ 'cd-sensor.c',
+ 'cd-sensor.h',
+ 'cd-sensor-sync.c',
+ 'cd-sensor-sync.h',
+ 'cd-spectrum.c',
+ 'cd-spectrum.h',
+ ],
+ nsversion : '1.0',
+ namespace : 'Colord',
+ symbol_prefix : 'cd',
+ identifier_prefix : 'Cd',
+ export_packages : 'colord',
+ extra_args : [
+ '--c-include=colord.h',
+ ],
+ link_with : colordprivate,
+ dependencies : [
+ gio,
+ glib,
+ lcms,
+ ],
+ includes : [
+ 'Gio-2.0',
+ 'GObject-2.0',
+ ],
+ install : true
+ )
+ libcolord_gir = libcolord_girtarget[0]
+ libcolord_typelib = libcolord_girtarget[1]
+endif
if get_option('vapi')
gnome.generate_vapi('colord',
--- lib/colorhug/meson.build
+++ lib/colorhug/meson.build
@@ -73,36 +73,38 @@ pkgg.generate(
description : 'ColorHug is a simple display hardware colorimeter',
)
-libcolorhug_gir = gnome.generate_gir(colorhug,
- sources : [
- 'ch-common.c',
- 'ch-common.h',
- 'ch-device.c',
- 'ch-device.h',
- 'ch-device-queue.c',
- 'ch-device-queue.h',
- 'ch-hash.c',
- 'ch-hash.h',
- ],
- nsversion : '1.0',
- namespace : 'Colorhug',
- symbol_prefix : 'ch',
- identifier_prefix : 'Ch',
- export_packages : 'colorhug',
- link_with : colorhug,
- dependencies : [
- gio,
- glib,
- lcms,
- ],
- includes : [
- 'Gio-2.0',
- 'GObject-2.0',
- 'GUsb-1.0',
- libcolord_gir,
- ],
- install : true
-)
+if get_option('introspection')
+ libcolorhug_gir = gnome.generate_gir(colorhug,
+ sources : [
+ 'ch-common.c',
+ 'ch-common.h',
+ 'ch-device.c',
+ 'ch-device.h',
+ 'ch-device-queue.c',
+ 'ch-device-queue.h',
+ 'ch-hash.c',
+ 'ch-hash.h',
+ ],
+ nsversion : '1.0',
+ namespace : 'Colorhug',
+ symbol_prefix : 'ch',
+ identifier_prefix : 'Ch',
+ export_packages : 'colorhug',
+ link_with : colorhug,
+ dependencies : [
+ gio,
+ glib,
+ lcms,
+ ],
+ includes : [
+ 'Gio-2.0',
+ 'GObject-2.0',
+ 'GUsb-1.0',
+ libcolord_gir,
+ ],
+ install : true
+ )
+endif
if get_option('tests')
testdatadir = join_paths(meson.source_root(), 'data', 'tests')
--- meson_options.txt
+++ meson_options.txt
@@ -14,3 +14,4 @@ option('daemon_user', type : 'string', value : 'root', description : 'User for r
option('pnp_ids', type : 'string', value : '', description : 'Location of pnp.ids if hwdb is not available')
option('man', type : 'boolean', value : true, description : 'Generate man pages')
option('docs', type : 'boolean', value : true, description : 'Generate documentation')
+option('introspection', type : 'boolean', value : true, description : 'Generation gobject-introspection related files')