sync with OpenBSD -current
This commit is contained in:
parent
4b49aefbb1
commit
1fd36b57f8
945 changed files with 81965 additions and 59988 deletions
125
dist/fontconfig/meson.build
vendored
125
dist/fontconfig/meson.build
vendored
|
@ -1,6 +1,6 @@
|
|||
project('fontconfig', 'c',
|
||||
version: '2.14.1',
|
||||
meson_version : '>= 0.57.0',
|
||||
version: '2.15.0',
|
||||
meson_version : '>= 0.60.0',
|
||||
default_options: [ 'buildtype=debugoptimized'],
|
||||
)
|
||||
|
||||
|
@ -30,7 +30,7 @@ freetype_dep = dependency('freetype2', method: 'pkg-config', version: freetype_r
|
|||
# Give another shot using CMake
|
||||
if not freetype_dep.found()
|
||||
freetype_dep = dependency('freetype', method: 'cmake', version: freetype_req_cmake,
|
||||
fallback: ['freetype2', 'freetype_dep'])
|
||||
fallback: ['freetype2', 'freetype_dep'], default_options: 'werror=false')
|
||||
endif
|
||||
|
||||
# Linking expat should not be so difficult... see: https://github.com/mesonbuild/meson/issues/10516
|
||||
|
@ -209,6 +209,20 @@ if cc.links(files('meson-cc-tests/solaris-atomic-operations.c'), name: 'Solaris
|
|||
endif
|
||||
|
||||
|
||||
# Check iconv support
|
||||
iconv_dep = []
|
||||
found_iconv = 0
|
||||
if host_machine.system() != 'windows'
|
||||
iconv_dep = dependency('iconv', required: get_option('iconv'))
|
||||
found_iconv = iconv_dep.found().to_int()
|
||||
else
|
||||
if get_option('iconv').enabled()
|
||||
warning('-Diconv was set but this is not functional on Windows.')
|
||||
endif
|
||||
endif
|
||||
conf.set('USE_ICONV', found_iconv)
|
||||
deps += [iconv_dep]
|
||||
|
||||
prefix = get_option('prefix')
|
||||
|
||||
fonts_conf = configuration_data()
|
||||
|
@ -288,7 +302,7 @@ endif
|
|||
|
||||
fc_baseconfigdir = get_option('baseconfig-dir')
|
||||
if fc_baseconfigdir in ['default', 'yes', 'no']
|
||||
fc_baseconfigdir = prefix / get_option('sysconfdir') / 'fonts'
|
||||
fc_baseconfigdir = prefix / get_option('sysconfdir') / 'fonts'
|
||||
endif
|
||||
|
||||
fc_configdir = get_option('config-dir')
|
||||
|
@ -315,45 +329,39 @@ if fc_configdir.startswith(fc_baseconfigdir + '/')
|
|||
fonts_conf.set('CONFIGDIR', fc_configdir.split(fc_baseconfigdir + '/')[1])
|
||||
endif
|
||||
|
||||
# It will automatically fallback to subproject if not found on system
|
||||
gperf = find_program('gperf')
|
||||
gperf = find_program('gperf', required: false)
|
||||
gperf_len_type = ''
|
||||
|
||||
sh = find_program('sh', required : false)
|
||||
|
||||
if not sh.found() # host_machine.system() == 'windows' or not sh.found()
|
||||
# TODO: This is not always correct
|
||||
if cc.get_id() == 'msvc'
|
||||
gperf_len_type = 'size_t'
|
||||
else
|
||||
gperf_len_type = 'unsigned'
|
||||
endif
|
||||
else
|
||||
if gperf.found()
|
||||
gperf_test_format = '''
|
||||
#include <string.h>
|
||||
const char * in_word_set(const char *, @0@);
|
||||
@1@
|
||||
'''
|
||||
gperf_snippet_format = 'echo foo,bar | @0@ -L ANSI-C'
|
||||
gperf_snippet = run_command(sh, '-c', gperf_snippet_format.format(gperf.full_path()),
|
||||
check: true)
|
||||
gperf_test = gperf_test_format.format('size_t', gperf_snippet.stdout())
|
||||
gperf_snippet = run_command(gperf, '-L', 'ANSI-C', files('meson-cc-tests/gperf.txt'),
|
||||
check: true).stdout()
|
||||
|
||||
if cc.compiles(gperf_test)
|
||||
gperf_len_type = 'size_t'
|
||||
else
|
||||
gperf_test = gperf_test_format.format('unsigned', gperf_snippet.stdout())
|
||||
if cc.compiles(gperf_test)
|
||||
gperf_len_type = 'unsigned'
|
||||
else
|
||||
error('unable to determine gperf len type')
|
||||
foreach type : ['size_t', 'unsigned']
|
||||
if cc.compiles(gperf_test_format.format(type, gperf_snippet))
|
||||
gperf_len_type = type
|
||||
break
|
||||
endif
|
||||
endforeach
|
||||
|
||||
if gperf_len_type == ''
|
||||
error('unable to determine gperf len type')
|
||||
endif
|
||||
else
|
||||
# Fallback to subproject
|
||||
gperf = find_program('gperf')
|
||||
# assume if we are compiling from the wrap, the size is just size_t
|
||||
gperf_len_type = 'size_t'
|
||||
endif
|
||||
|
||||
message('gperf len type is @0@'.format(gperf_len_type))
|
||||
|
||||
conf.set('FC_GPERF_SIZE_T', gperf_len_type,
|
||||
description : 'The type of gperf "len" parameter')
|
||||
description : 'The type of gperf "len" parameter')
|
||||
|
||||
conf.set('_GNU_SOURCE', true)
|
||||
|
||||
|
@ -376,16 +384,16 @@ fcstdint_h = configure_file(
|
|||
makealias = files('src/makealias.py')[0]
|
||||
|
||||
alias_headers = custom_target('alias_headers',
|
||||
output: ['fcalias.h', 'fcaliastail.h'],
|
||||
input: ['fontconfig/fontconfig.h', 'src/fcdeprecate.h', 'fontconfig/fcprivate.h'],
|
||||
command: [python3, makealias, join_paths(meson.current_source_dir(), 'src'), '@OUTPUT@', '@INPUT@'],
|
||||
)
|
||||
output: ['fcalias.h', 'fcaliastail.h'],
|
||||
input: ['fontconfig/fontconfig.h', 'src/fcdeprecate.h', 'fontconfig/fcprivate.h'],
|
||||
command: [python3, makealias, join_paths(meson.current_source_dir(), 'src'), '@OUTPUT@', '@INPUT@'],
|
||||
)
|
||||
|
||||
ft_alias_headers = custom_target('ft_alias_headers',
|
||||
output: ['fcftalias.h', 'fcftaliastail.h'],
|
||||
input: ['fontconfig/fcfreetype.h'],
|
||||
command: [python3, makealias, join_paths(meson.current_source_dir(), 'src'), '@OUTPUT@', '@INPUT@']
|
||||
)
|
||||
output: ['fcftalias.h', 'fcftaliastail.h'],
|
||||
input: ['fontconfig/fcfreetype.h'],
|
||||
command: [python3, makealias, join_paths(meson.current_source_dir(), 'src'), '@OUTPUT@', '@INPUT@']
|
||||
)
|
||||
|
||||
tools_man_pages = []
|
||||
|
||||
|
@ -426,14 +434,14 @@ endif
|
|||
configure_file(output: 'config.h', configuration: conf)
|
||||
|
||||
configure_file(output: 'fonts.conf',
|
||||
input: 'fonts.conf.in',
|
||||
configuration: fonts_conf,
|
||||
install_dir: fc_baseconfigdir,
|
||||
install: true)
|
||||
input: 'fonts.conf.in',
|
||||
configuration: fonts_conf,
|
||||
install_dir: fc_baseconfigdir,
|
||||
install: true)
|
||||
|
||||
install_data('fonts.dtd',
|
||||
install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'xml/fontconfig')
|
||||
)
|
||||
install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'xml/fontconfig')
|
||||
)
|
||||
|
||||
fc_headers = [
|
||||
'fontconfig/fontconfig.h',
|
||||
|
@ -447,20 +455,21 @@ install_headers(fc_headers, subdir: meson.project_name())
|
|||
doc_targets = get_variable('doc_targets', [])
|
||||
|
||||
summary({
|
||||
'Documentation': (doc_targets.length() > 0 ? doc_targets : false),
|
||||
'NLS': not get_option('nls').disabled(),
|
||||
'Tests': not get_option('tests').disabled(),
|
||||
'Tools': not get_option('tools').disabled(),
|
||||
}, section: 'General', bool_yn: true, list_sep: ', ')
|
||||
'Documentation': (doc_targets.length() > 0 ? doc_targets : false),
|
||||
'NLS': not get_option('nls').disabled(),
|
||||
'Tests': not get_option('tests').disabled(),
|
||||
'Tools': not get_option('tools').disabled(),
|
||||
'iconv': found_iconv == 1,
|
||||
}, section: 'General', bool_yn: true, list_sep: ', ')
|
||||
summary({
|
||||
'Hinting': preferred_hinting,
|
||||
'Font directories': fc_fonts_paths,
|
||||
'Additional font directories': fc_add_fonts,
|
||||
}, section: 'Defaults', bool_yn: true, list_sep: ', ')
|
||||
'Hinting': preferred_hinting,
|
||||
'Font directories': fc_fonts_paths,
|
||||
'Additional font directories': fc_add_fonts,
|
||||
}, 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: ', ')
|
||||
'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: ', ')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue