void-packages/srcpkgs/xorg-server/patches/meson-fontrootdir.patch
Đoàn Trần Công Danh 3353bf4722 srcpkgs/x*: 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

26 lines
957 B
Diff

--- a/meson.build
+++ b/meson.build
@@ -122,8 +122,11 @@
dfp = get_option('default_font_path')
if dfp == ''
- fontutil_dep = dependency('fontutil')
- fontrootdir = fontutil_dep.get_pkgconfig_variable('fontrootdir')
+ fontrootdir = get_option('font_root_dir')
+ if fontrootdir == ''
+ fontutil_dep = dependency('fontutil')
+ fontrootdir = fontutil_dep.get_pkgconfig_variable('fontrootdir')
+ endif
default_font_path = ','.join([
join_paths(fontrootdir, 'misc'),
join_paths(fontrootdir, 'TTF'),
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -24,6 +24,7 @@
option('module_dir', type: 'string', value: 'xorg/modules',
description: 'X.Org modules directory (absolute or relative to the directory specified by the libdir option)')
option('default_font_path', type: 'string')
+option('font_root_dir', type: 'string')
option('glx', type: 'boolean', value: true)
option('xdmcp', type: 'boolean', value: true)