summaryrefslogtreecommitdiff
path: root/x11-toolkits/pango/files/patch-tests_meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'x11-toolkits/pango/files/patch-tests_meson.build')
-rw-r--r--x11-toolkits/pango/files/patch-tests_meson.build92
1 files changed, 92 insertions, 0 deletions
diff --git a/x11-toolkits/pango/files/patch-tests_meson.build b/x11-toolkits/pango/files/patch-tests_meson.build
new file mode 100644
index 000000000000..0d78b0d26961
--- /dev/null
+++ b/x11-toolkits/pango/files/patch-tests_meson.build
@@ -0,0 +1,92 @@
+--- tests/meson.build.orig 2018-04-07 12:00:40.000000000 +0200
++++ tests/meson.build 2018-05-10 12:09:26.358132000 +0200
+@@ -2,8 +2,10 @@
+ '-DSRCDIR=@0@'.format(meson.current_source_dir()),
+ ]
+
+-if xft_dep.found()
+- test_cflags += [ '-DHAVE_X', '-DHAVE_XFT' ]
++if get_option('xft')
++ if xft_dep.found()
++ test_cflags += [ '-DHAVE_X', '-DHAVE_XFT' ]
++ endif
+ endif
+
+ if host_system == 'windows'
+@@ -85,15 +87,18 @@
+ installed_test_datadir = join_paths(pango_datadir, 'installed-tests', 'pango')
+ installed_test_bindir = join_paths(pango_libexecdir, 'installed-tests', 'pango')
+
+-install_data(installed_test_data, install_dir: installed_test_bindir)
+-install_data(installed_test_layouts_data, install_dir: join_paths(installed_test_bindir, 'layouts'))
+-install_data(installed_test_markups_data, install_dir: join_paths(installed_test_bindir, 'markups'))
++if get_option('enable_installed_tests')
++ install_data(installed_test_data, install_dir: installed_test_bindir)
++ install_data(installed_test_layouts_data, install_dir: join_paths(installed_test_bindir, 'layouts'))
++ install_data(installed_test_markups_data, install_dir: join_paths(installed_test_bindir, 'markups'))
++endif
+
+ python = import('python3').find_python()
+ gen_installed_test = files([ 'gen-installed-test.py' ])
+ gen_all_unicode = files([ 'gen-all-unicode.py' ])
+
+-custom_target('all-unicode',
++if get_option('enable_installed_tests')
++ custom_target('all-unicode',
+ output: 'all-unicode.txt',
+ command: [
+ python, gen_all_unicode, '@OUTPUT@'
+@@ -101,29 +106,30 @@
+ install: true,
+ install_dir: installed_test_bindir)
+
+-foreach t: tests
+- name = t[0]
+- src = t.get(1, [ '@0@.c'.format(name) ])
+- deps = t.get(2, [ libpango_dep ])
++ foreach t: tests
++ name = t[0]
++ src = t.get(1, [ '@0@.c'.format(name) ])
++ deps = t.get(2, [ libpango_dep ])
+
+- custom_target(name + '.test',
+- output: name + '.test',
+- command: [
+- python, gen_installed_test,
+- installed_test_bindir,
+- name,
+- '@OUTDIR@',
+- ],
+- install: true,
+- install_dir: installed_test_datadir)
++ custom_target(name + '.test',
++ output: name + '.test',
++ command: [
++ python, gen_installed_test,
++ installed_test_bindir,
++ name,
++ '@OUTDIR@',
++ ],
++ install: true,
++ install_dir: installed_test_datadir)
+
+- bin = executable(name, src,
+- dependencies: deps,
+- include_directories: root_inc,
+- c_args: common_cflags + pango_debug_cflags + test_cflags,
+- cpp_args: common_cppflags + pango_debug_cflags + test_cflags,
+- install: true,
+- install_dir: installed_test_bindir)
++ bin = executable(name, src,
++ dependencies: deps,
++ include_directories: root_inc,
++ c_args: common_cflags + pango_debug_cflags + test_cflags,
++ cpp_args: common_cppflags + pango_debug_cflags + test_cflags,
++ install: true,
++ install_dir: installed_test_bindir)
+
+- test(name, bin, env: test_env)
+-endforeach
++ test(name, bin, env: test_env)
++ endforeach
++endif