[meson] Make compatbile with 0.47.0
This commit is contained in:
parent
58209c86a0
commit
6e32145dc9
@ -78,7 +78,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run: apk update && apk add ragel gcc g++ glib-dev freetype-dev cairo-dev git py3-pip ninja
|
- run: apk update && apk add ragel gcc g++ glib-dev freetype-dev cairo-dev git py3-pip ninja
|
||||||
- run: pip3 install meson==0.49.0
|
- run: pip3 install meson==0.47.0
|
||||||
- run: meson build --buildtype=minsize
|
- run: meson build --buildtype=minsize
|
||||||
- run: ninja -Cbuild -j9
|
- run: ninja -Cbuild -j9
|
||||||
- run: meson test -Cbuild --print-errorlogs
|
- run: meson test -Cbuild --print-errorlogs
|
||||||
|
@ -52,8 +52,8 @@ endif
|
|||||||
|
|
||||||
gnome.gtkdoc('harfbuzz',
|
gnome.gtkdoc('harfbuzz',
|
||||||
main_sgml: 'harfbuzz-docs.xml',
|
main_sgml: 'harfbuzz-docs.xml',
|
||||||
src_dir: [meson.current_source_dir() / '..',
|
src_dir: [join_paths(meson.current_source_dir(), '..'),
|
||||||
meson.current_build_dir() / '..',
|
join_paths(meson.current_build_dir(), '..'),
|
||||||
],
|
],
|
||||||
scan_args: ['--deprecated-guards=HB_DISABLE_DEPRECATED',
|
scan_args: ['--deprecated-guards=HB_DISABLE_DEPRECATED',
|
||||||
'--ignore-decorators=HB_EXTERN',
|
'--ignore-decorators=HB_EXTERN',
|
||||||
|
18
meson.build
18
meson.build
@ -1,5 +1,5 @@
|
|||||||
project('harfbuzz', 'c', 'cpp',
|
project('harfbuzz', 'c', 'cpp',
|
||||||
meson_version: '>= 0.49.0',
|
meson_version: '>= 0.47.0',
|
||||||
version: '2.7.0',
|
version: '2.7.0',
|
||||||
default_options: [
|
default_options: [
|
||||||
'cpp_eh=none', # Just to support msvc, we are passing -fno-rtti also anyway
|
'cpp_eh=none', # Just to support msvc, we are passing -fno-rtti also anyway
|
||||||
@ -348,12 +348,16 @@ if not get_option('tests').disabled()
|
|||||||
subdir('test')
|
subdir('test')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (not get_option('benchmark').disabled() and
|
# get_option('wrap_mode') isn't available in <0.49 and this
|
||||||
get_option('wrap_mode') != 'nodownload' and
|
# is just an internal tool
|
||||||
host_machine.system() != 'windows' and
|
if meson.version().version_compare('>=0.49')
|
||||||
not meson.is_subproject() and
|
if (not get_option('benchmark').disabled() and
|
||||||
not meson.is_cross_build())
|
get_option('wrap_mode') != 'nodownload' and
|
||||||
subdir('perf')
|
host_machine.system() != 'windows' and
|
||||||
|
not meson.is_subproject() and
|
||||||
|
not meson.is_cross_build())
|
||||||
|
subdir('perf')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if not get_option('docs').disabled()
|
if not get_option('docs').disabled()
|
||||||
|
@ -24,4 +24,4 @@ benchmark('perf', executable('perf', 'perf.cc',
|
|||||||
include_directories: [incconfig, incsrc],
|
include_directories: [incconfig, incsrc],
|
||||||
link_with: [libharfbuzz],
|
link_with: [libharfbuzz],
|
||||||
install: false,
|
install: false,
|
||||||
), workdir: meson.current_source_dir() / '..', timeout: 100)
|
), workdir: join_paths(meson.current_source_dir(), '..'), timeout: 100)
|
||||||
|
@ -488,21 +488,20 @@ if get_option('tests').enabled()
|
|||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
compiled_tests = {
|
compiled_tests = {
|
||||||
|
'test-algs': ['test-algs.cc', 'hb-static.cc'],
|
||||||
'test-array': 'test-array.cc',
|
'test-array': 'test-array.cc',
|
||||||
|
'test-iter': ['test-iter.cc', 'hb-static.cc'],
|
||||||
|
'test-meta': ['test-meta.cc', 'hb-static.cc'],
|
||||||
'test-number': ['test-number.cc', 'hb-number.cc'],
|
'test-number': ['test-number.cc', 'hb-number.cc'],
|
||||||
'test-ot-tag': 'hb-ot-tag.cc',
|
'test-ot-tag': 'hb-ot-tag.cc',
|
||||||
'test-unicode-ranges': 'test-unicode-ranges.cc',
|
'test-unicode-ranges': 'test-unicode-ranges.cc',
|
||||||
|
'test-bimap': ['test-bimap.cc', 'hb-static.cc'],
|
||||||
}
|
}
|
||||||
if cpp.get_id() != 'msvc'
|
|
||||||
# TODO: MSVC doesn't like these, fix them
|
|
||||||
compiled_tests += {
|
|
||||||
'test-algs': ['test-algs.cc', 'hb-static.cc'],
|
|
||||||
'test-bimap': ['test-bimap.cc', 'hb-static.cc'],
|
|
||||||
'test-iter': ['test-iter.cc', 'hb-static.cc'],
|
|
||||||
'test-meta': ['test-meta.cc', 'hb-static.cc'],
|
|
||||||
}
|
|
||||||
endif
|
|
||||||
foreach name, source : compiled_tests
|
foreach name, source : compiled_tests
|
||||||
|
if cpp.get_id() == 'msvc' and ['test-algs', 'test-bimap', 'test-iter', 'test-meta'].contains(name)
|
||||||
|
# TODO: MSVC doesn't like these, fix them
|
||||||
|
continue
|
||||||
|
endif
|
||||||
test(name, executable(name, source,
|
test(name, executable(name, source,
|
||||||
include_directories: incconfig,
|
include_directories: incconfig,
|
||||||
cpp_args: cpp_args + ['-DMAIN', '-UNDEBUG'],
|
cpp_args: cpp_args + ['-DMAIN', '-UNDEBUG'],
|
||||||
@ -577,7 +576,7 @@ cmake_config.set('have_gobject', have_gobject_string)
|
|||||||
configure_file(input: 'harfbuzz-config.cmake.in',
|
configure_file(input: 'harfbuzz-config.cmake.in',
|
||||||
output: 'harfbuzz-config.cmake',
|
output: 'harfbuzz-config.cmake',
|
||||||
configuration: cmake_config,
|
configuration: cmake_config,
|
||||||
install_dir: get_option('libdir') / 'cmake' / 'harfbuzz',
|
install_dir: join_paths(get_option('libdir'), 'cmake', 'harfbuzz'),
|
||||||
)
|
)
|
||||||
|
|
||||||
libharfbuzz_gobject_dep = null_dep
|
libharfbuzz_gobject_dep = null_dep
|
||||||
@ -615,7 +614,7 @@ if have_gobject
|
|||||||
output: 'hb-gobject-enums.h',
|
output: 'hb-gobject-enums.h',
|
||||||
command: [find_program('fix_get_types.py'), '@INPUT@', '@OUTPUT@'],
|
command: [find_program('fix_get_types.py'), '@INPUT@', '@OUTPUT@'],
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: get_option('prefix') / get_option('includedir') / meson.project_name(),
|
install_dir: join_paths(get_option('prefix'), get_option('includedir'), meson.project_name()),
|
||||||
)
|
)
|
||||||
|
|
||||||
hb_gobject_sources += [enum_c]
|
hb_gobject_sources += [enum_c]
|
||||||
|
@ -39,7 +39,7 @@ test('shape_fuzzer', find_program('run-shape-fuzzer-tests.py'),
|
|||||||
],
|
],
|
||||||
timeout: 60,
|
timeout: 60,
|
||||||
depends: [hb_shape_fuzzer_exe, libharfbuzz, libharfbuzz_subset],
|
depends: [hb_shape_fuzzer_exe, libharfbuzz, libharfbuzz_subset],
|
||||||
workdir: meson.current_build_dir() / '..' / '..',
|
workdir: join_paths(meson.current_build_dir(), '..', '..'),
|
||||||
env: env,
|
env: env,
|
||||||
suite: ['fuzzing', 'slow'],
|
suite: ['fuzzing', 'slow'],
|
||||||
)
|
)
|
||||||
@ -51,7 +51,7 @@ test('subset_fuzzer', find_program('run-subset-fuzzer-tests.py'),
|
|||||||
# as the tests are ran concurrently let's raise acceptable time here
|
# as the tests are ran concurrently let's raise acceptable time here
|
||||||
# ideally better to break and let meson handles them in parallel
|
# ideally better to break and let meson handles them in parallel
|
||||||
timeout: 300,
|
timeout: 300,
|
||||||
workdir: meson.current_build_dir() / '..' / '..',
|
workdir: join_paths(meson.current_build_dir(), '..', '..'),
|
||||||
env: env,
|
env: env,
|
||||||
suite: ['fuzzing', 'slow'],
|
suite: ['fuzzing', 'slow'],
|
||||||
)
|
)
|
||||||
@ -60,7 +60,7 @@ test('draw_fuzzer', find_program('run-draw-fuzzer-tests.py'),
|
|||||||
args: [
|
args: [
|
||||||
hb_draw_fuzzer_exe,
|
hb_draw_fuzzer_exe,
|
||||||
],
|
],
|
||||||
workdir: meson.current_build_dir() / '..' / '..',
|
workdir: join_paths(meson.current_build_dir(), '..', '..'),
|
||||||
env: env,
|
env: env,
|
||||||
suite: ['fuzzing'],
|
suite: ['fuzzing'],
|
||||||
)
|
)
|
||||||
|
@ -14,10 +14,10 @@ foreach file_name : in_house_tests
|
|||||||
test(test_name, shaping_run_tests_py,
|
test(test_name, shaping_run_tests_py,
|
||||||
args: [
|
args: [
|
||||||
hb_shape,
|
hb_shape,
|
||||||
meson.current_source_dir() / 'data' / 'in-house' / 'tests' / file_name,
|
join_paths(meson.current_source_dir(), 'data', 'in-house', 'tests', file_name),
|
||||||
],
|
],
|
||||||
env: env,
|
env: env,
|
||||||
workdir: meson.current_build_dir() / '..' / '..',
|
workdir: join_paths(meson.current_build_dir(), '..', '..'),
|
||||||
suite: ['shaping', 'in-house'],
|
suite: ['shaping', 'in-house'],
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
@ -28,10 +28,10 @@ foreach file_name : aots_tests
|
|||||||
test(test_name, shaping_run_tests_py,
|
test(test_name, shaping_run_tests_py,
|
||||||
args: [
|
args: [
|
||||||
hb_shape,
|
hb_shape,
|
||||||
meson.current_source_dir() / 'data' / 'aots' / 'tests' / file_name,
|
join_paths(meson.current_source_dir(), 'data', 'aots', 'tests', file_name),
|
||||||
],
|
],
|
||||||
env: env,
|
env: env,
|
||||||
workdir: meson.current_build_dir() / '..' / '..',
|
workdir: join_paths(meson.current_build_dir(), '..', '..'),
|
||||||
suite: ['shaping', 'aots'],
|
suite: ['shaping', 'aots'],
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
@ -42,10 +42,10 @@ foreach file_name : text_rendering_tests
|
|||||||
test(test_name, shaping_run_tests_py,
|
test(test_name, shaping_run_tests_py,
|
||||||
args: [
|
args: [
|
||||||
hb_shape,
|
hb_shape,
|
||||||
meson.current_source_dir() / 'data' / 'text-rendering-tests' / 'tests' / file_name,
|
join_paths(meson.current_source_dir(), 'data', 'text-rendering-tests', 'tests', file_name),
|
||||||
],
|
],
|
||||||
env: env,
|
env: env,
|
||||||
workdir: meson.current_build_dir() / '..' / '..',
|
workdir: join_paths(meson.current_build_dir(), '..', '..'),
|
||||||
suite: ['shaping', 'text-rendering-tests'],
|
suite: ['shaping', 'text-rendering-tests'],
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
@ -32,12 +32,12 @@ foreach t : tests
|
|||||||
test(t, run_test,
|
test(t, run_test,
|
||||||
args: [
|
args: [
|
||||||
hb_subset,
|
hb_subset,
|
||||||
meson.current_source_dir() / 'data' / 'tests' / fname,
|
join_paths(meson.current_source_dir(), 'data', 'tests', fname),
|
||||||
],
|
],
|
||||||
# as the tests are ran concurrently let's raise acceptable time here
|
# as the tests are ran concurrently let's raise acceptable time here
|
||||||
# ideally better to break and let meson handles them in parallel
|
# ideally better to break and let meson handles them in parallel
|
||||||
timeout: 500,
|
timeout: 500,
|
||||||
workdir: meson.current_build_dir() / '..' / '..',
|
workdir: join_paths(meson.current_build_dir(), '..', '..'),
|
||||||
suite: ['subset', 'slow'],
|
suite: ['subset', 'slow'],
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
Loading…
Reference in New Issue
Block a user