void-packages/srcpkgs/colord/patches/add-introspection-switch.patch
Đoàn Trần Công Danh c987560802 srcpkgs/c*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

50 lines
1.7 KiB
Diff

diff --git lib/colord/meson.build lib/colord/meson.build
index 61f0518..9f7a246 100644
--- a/lib/colord/meson.build
+++ b/lib/colord/meson.build
@@ -146,6 +146,7 @@ pkgg.generate(
description : 'colord is a system daemon for managing color devices',
)
+if get_option('introspection')
libcolord_girtarget = gnome.generate_gir(colord,
sources : [
'cd-client.c',
@@ -202,6 +203,7 @@ libcolord_girtarget = gnome.generate_gir(colord,
)
libcolord_gir = libcolord_girtarget[0]
libcolord_typelib = libcolord_girtarget[1]
+endif
if get_option('vapi')
gnome.generate_vapi('colord',
diff --git lib/colorhug/meson.build lib/colorhug/meson.build
index 03aefb7..b6d2624 100644
--- a/lib/colorhug/meson.build
+++ b/lib/colorhug/meson.build
@@ -73,6 +73,7 @@ pkgg.generate(
description : 'ColorHug is a simple display hardware colorimeter',
)
+if get_option('introspection')
libcolorhug_gir = gnome.generate_gir(colorhug,
sources : [
'ch-common.c',
@@ -107,6 +108,7 @@ libcolorhug_gir = gnome.generate_gir(colorhug,
],
install : true
)
+endif
if get_option('tests')
testdatadir = join_paths(meson.source_root(), 'data', 'tests')
diff --git meson_options.txt meson_options.txt
index 52af113..6661e16 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -15,3 +15,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')