From f7562672f909d9cca8118659c017c552328796af Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Thu, 21 May 2020 17:01:04 +0430 Subject: [PATCH] [meson] Use / instead join_paths We need some of the very recent features of meson, let's use the new features also --- docs/meson.build | 4 ++-- meson.build | 2 +- src/meson.build | 8 ++++---- test/fuzzing/meson.build | 6 +++--- test/shaping/meson.build | 12 ++++++------ test/subset/meson.build | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/meson.build b/docs/meson.build index 355cedbf4..b39beec38 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -50,8 +50,8 @@ endif gnome.gtkdoc('harfbuzz', main_sgml: 'harfbuzz-docs.xml', - src_dir: [join_paths(meson.current_source_dir(), '..'), - join_paths(meson.current_build_dir(), '..'), + src_dir: [meson.current_source_dir() / '..', + meson.current_build_dir() / '..', ], scan_args: ['--deprecated-guards=HB_DISABLE_DEPRECATED', '--ignore-decorators=HB_EXTERN', diff --git a/meson.build b/meson.build index d3e3e35cd..47b7f5039 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('harfbuzz', 'c', 'cpp', - meson_version: '>= 0.47.0', + meson_version: '>= 0.53.0', default_options : ['cpp_std=c++11'], version: '2.6.6') diff --git a/src/meson.build b/src/meson.build index a519341b0..5cd05fe28 100644 --- a/src/meson.build +++ b/src/meson.build @@ -285,7 +285,7 @@ custom_target('hb-version.h', input: 'hb-version.h.in', output: 'hb-version.h', command: [find_program('gen-hb-version.py'), meson.project_version(), - '@INPUT@', join_paths(meson.current_source_dir(), 'hb-version.h')]) + '@INPUT@', meson.current_source_dir() / 'hb-version.h']) ragel = find_program('ragel', required: false) if not ragel.found() @@ -305,7 +305,7 @@ custom_target('harfbuzz.cc', build_by_default: true, output: 'harfbuzz.cc', command: [find_program('gen-harfbuzzcc.py'), - join_paths(meson.source_root(), '@OUTPUT@')] + + meson.source_root() / '@OUTPUT@'] + hb_base_sources + hb_glib_sources + hb_ft_sources + hb_graphite2_sources + hb_uniscribe_sources + hb_gdi_sources + hb_directwrite_sources + hb_coretext_sources) @@ -588,7 +588,7 @@ cmake_config.set('have_gobject', have_gobject ? 'true' : 'false') configure_file(input: 'harfbuzz-config.cmake.in', output: 'harfbuzz-config.cmake', configuration: cmake_config, - install_dir: join_paths(get_option('libdir'), 'cmake', 'harfbuzz')) + install_dir: get_option('libdir') / 'cmake' / 'harfbuzz') if have_gobject gnome = import('gnome') @@ -624,7 +624,7 @@ if have_gobject output: 'hb-gobject-enums.h', command: [python3, files('fix_get_types.py')[0], '@INPUT@', '@OUTPUT@'], install: true, - install_dir: join_paths(get_option('prefix'), get_option('includedir'), meson.project_name()), + install_dir: get_option('prefix') / get_option('includedir') / meson.project_name(), ) hb_gobject_sources += [enum_c] diff --git a/test/fuzzing/meson.build b/test/fuzzing/meson.build index df4a63562..c9bd2f909 100644 --- a/test/fuzzing/meson.build +++ b/test/fuzzing/meson.build @@ -27,7 +27,7 @@ test('shape_fuzzer', find_program('run-shape-fuzzer-tests.py'), hb_shape_fuzzer_exe, ], depends: [hb_shape_fuzzer_exe, libharfbuzz, libharfbuzz_subset], - workdir: join_paths(meson.current_build_dir(), '..', '..'), + workdir: meson.current_build_dir() / '..' / '..', env: env) test('subset_fuzzer', find_program('run-subset-fuzzer-tests.py'), @@ -37,12 +37,12 @@ test('subset_fuzzer', find_program('run-subset-fuzzer-tests.py'), # as the tests are ran concurrently let's raise acceptable time here # ideally better to break and let meson handles them in parallel timeout: 300, - workdir: join_paths(meson.current_build_dir(), '..', '..'), + workdir: meson.current_build_dir() / '..' / '..', env: env) test('draw_fuzzer', find_program('run-draw-fuzzer-tests.py'), args: [ hb_draw_fuzzer_exe, ], - workdir: join_paths(meson.current_build_dir(), '..', '..'), + workdir: meson.current_build_dir() / '..' / '..', env: env) diff --git a/test/shaping/meson.build b/test/shaping/meson.build index 5caf25bf7..2dcd9369b 100644 --- a/test/shaping/meson.build +++ b/test/shaping/meson.build @@ -276,9 +276,9 @@ foreach file_name : in_house_tests args: [ files('run-tests.py')[0], hb_shape, - join_paths(meson.current_source_dir(), 'data/in-house/tests', file_name), + meson.current_source_dir() / 'data' / 'in-house' / 'tests' / file_name, ], - workdir: join_paths(meson.current_build_dir(), '..', '..'), + workdir: meson.current_build_dir() / '..' / '..', ) endforeach @@ -289,9 +289,9 @@ foreach file_name : aots_tests args: [ files('run-tests.py')[0], hb_shape, - join_paths(meson.current_source_dir(), 'data/aots/tests', file_name), + meson.current_source_dir() / 'data' / 'aots' / 'tests' / file_name, ], - workdir: join_paths(meson.current_build_dir(), '..', '..'), + workdir: meson.current_build_dir() / '..' / '..', ) endforeach @@ -302,8 +302,8 @@ foreach file_name : text_rendering_tests args: [ files('run-tests.py')[0], hb_shape, - join_paths(meson.current_source_dir(), 'data/text-rendering-tests/tests', file_name), + meson.current_source_dir() / 'data' / 'text-rendering-tests' / 'tests' / file_name, ], - workdir: join_paths(meson.current_build_dir(), '..', '..'), + workdir: meson.current_build_dir() / '..' / '..', ) endforeach diff --git a/test/subset/meson.build b/test/subset/meson.build index 3f57b0fee..71e149e68 100644 --- a/test/subset/meson.build +++ b/test/subset/meson.build @@ -33,11 +33,11 @@ foreach t : tests test(t, run_test, args: [ hb_subset, - join_paths(meson.current_source_dir(), 'data', 'tests', fname), + meson.current_source_dir() / 'data' / 'tests' / fname, ], # as the tests are ran concurrently let's raise acceptable time here # ideally better to break and let meson handles them in parallel timeout: 500, - workdir: join_paths(meson.current_build_dir(), '..', '..'), + workdir: meson.current_build_dir() / '..' / '..', ) endforeach