[PATCH xserver] meson: Add option to set default font path (v2)
Adam Jackson
ajax at redhat.com
Tue Mar 27 16:24:37 UTC 2018
The autotools build gets this from some macros in fontutil, but they're
just wrappers around pkgconfig.
v2: Use same default as autotools (Keith Packard)
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
include/meson.build | 2 +-
meson.build | 18 +++++++++++++++++-
meson_options.txt | 1 +
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/include/meson.build b/include/meson.build
index 69aea80955..c64af59f5c 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -87,8 +87,8 @@ conf_data.set_quoted('SERVER_MISC_CONFIG_PATH', serverconfigdir)
conf_data.set_quoted('PROJECTROOT', get_option('prefix'))
conf_data.set_quoted('SYSCONFDIR', join_paths(get_option('prefix'), get_option('sysconfdir')))
conf_data.set_quoted('SUID_WRAPPER_DIR', join_paths(get_option('prefix'), get_option('libexecdir')))
+conf_data.set_quoted('COMPILEDDEFAULTFONTPATH', default_font_path)
-# XXX: Stopped enumerating at COMPILEDEFAULTFONTPATH
conf_data.set('XORG_VERSION_CURRENT', release)
conf_data.set('HASXDMAUTH', get_option('xdm-auth-1'))
diff --git a/meson.build b/meson.build
index 47b87b5e61..99fa4ed9d0 100644
--- a/meson.build
+++ b/meson.build
@@ -118,6 +118,22 @@ if xkb_bin_dir == ''
endif
endif
+dfp = get_option('default_font_path')
+if dfp == ''
+ fontutil_dep = dependency('fontutil')
+ fontrootdir = fontutil_dep.get_pkgconfig_variable('fontrootdir')
+ default_font_path = ','.join([
+ join_paths(fontrootdir, 'misc'),
+ join_paths(fontrootdir, 'TTF'),
+ join_paths(fontrootdir, 'OTF'),
+ join_paths(fontrootdir, 'Type1'),
+ join_paths(fontrootdir, '75dpi'),
+ join_paths(fontrootdir, '100dpi'),
+ ])
+else
+ default_font_path = dfp
+endif
+
hal_option = get_option('hal')
glamor_option = get_option('glamor')
@@ -493,7 +509,7 @@ manpage_config.set('modulepath', join_paths(get_option('prefix'), module_dir))
# wtf doesn't this work
# manpage_config.set('suid_wrapper_dir', join_paths(get_option('prefix'), libexecdir))
manpage_config.set('suid_wrapper_dir', join_paths(get_option('prefix'), 'libexec'))
-manpage_config.set('default_font_path', 'catalogue:/etc/X11/fontpath.d:built-ins')
+manpage_config.set('default_font_path', default_font_path)
# Include must come first, as it sets up dix-config.h
subdir('include')
diff --git a/meson_options.txt b/meson_options.txt
index dede8562a3..ce1ae80bd4 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -21,6 +21,7 @@ option('builder_string', type: 'string', description: 'Additional builder string
option('log_dir', type: 'string')
option('module_dir', type: 'string',
description: 'X.Org modules directory')
+option('default_font_path', type: 'string')
option('glx', type: 'boolean', value: true)
option('xdmcp', type: 'boolean', value: true)
--
2.16.2
More information about the xorg-devel
mailing list