meson: add 'template-dir', 'baseconfig-dir', 'config-dir', and 'xml-dir' options
Fixes #244
This commit is contained in:
parent
6ae5623674
commit
0c7bb301f4
26
meson.build
26
meson.build
|
@ -281,11 +281,25 @@ if host_machine.system() != 'windows'
|
|||
deps += [thread_dep]
|
||||
endif
|
||||
|
||||
fc_templatedir = join_paths(prefix, get_option('datadir'), 'fontconfig/conf.avail')
|
||||
fc_baseconfigdir = join_paths(prefix, get_option('sysconfdir'), 'fonts')
|
||||
fc_configdir = join_paths(fc_baseconfigdir, 'conf.d')
|
||||
fc_xmldir = join_paths(prefix, get_option('datadir'), 'xml/fontconfig')
|
||||
fc_templatedir = get_option('template-dir')
|
||||
if fc_templatedir in ['default', 'yes', 'no']
|
||||
fc_templatedir = prefix / get_option('datadir') / 'fontconfig/conf.avail'
|
||||
endif
|
||||
|
||||
fc_baseconfigdir = get_option('baseconfig-dir')
|
||||
if fc_baseconfigdir in ['default', 'yes', 'no']
|
||||
fc_baseconfigdir = prefix / get_option('sysconfdir') / 'fonts'
|
||||
endif
|
||||
|
||||
fc_configdir = get_option('config-dir')
|
||||
if fc_configdir in ['default', 'yes', 'no']
|
||||
fc_configdir = fc_baseconfigdir / 'conf.d'
|
||||
endif
|
||||
|
||||
fc_xmldir = get_option('xml-dir')
|
||||
if fc_xmldir in ['default', 'yes', 'no']
|
||||
fc_xmldir = prefix / get_option('datadir') / 'xml/fontconfig'
|
||||
endif
|
||||
|
||||
conf.set_quoted('CONFIGDIR', fc_configdir)
|
||||
conf.set_quoted('FC_CACHEDIR', fc_cachedir)
|
||||
|
@ -444,4 +458,8 @@ summary({
|
|||
}, section: 'Defaults', bool_yn: true, list_sep: ', ')
|
||||
summary({
|
||||
'Cache directory': fc_cachedir,
|
||||
'Template directory': fc_templatedir,
|
||||
'Base config directory': fc_baseconfigdir,
|
||||
'Config directory': fc_configdir,
|
||||
'XML directory': fc_xmldir,
|
||||
}, section: 'Paths', bool_yn: true, list_sep: ', ')
|
||||
|
|
|
@ -27,3 +27,15 @@ option('additional-fonts-dirs', type: 'array', value: ['yes'],
|
|||
# Configuration paths
|
||||
option('cache-dir', type: 'string', value: 'default',
|
||||
description: 'Use DIR to store cache files (default=LOCALSTATEDIR/cache/fontconfig)')
|
||||
|
||||
option('template-dir', type: 'string', value: 'default',
|
||||
description: 'Use DIR to store the configuration template files (default=DATADIR/fontconfig/conf.avail)')
|
||||
|
||||
option('baseconfig-dir', type: 'string', value: 'default',
|
||||
description: 'Use DIR to store the base configuration files (default=SYSCONFDIR/fonts)')
|
||||
|
||||
option('config-dir', type: 'string', value: 'default',
|
||||
description: 'Use DIR to store active configuration files (default=BASECONFIGDIR/conf.d)')
|
||||
|
||||
option('xml-dir', type: 'string', value: 'default',
|
||||
description: 'Use DIR to store XML schema files (default=DATADIR/xml/fontconfig)')
|
||||
|
|
Loading…
Reference in New Issue