You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.2 KiB

  1. From 40c5681ab92e7db1298273ccf3c816e6a1498260 Mon Sep 17 00:00:00 2001
  2. From: Werner Lemberg <wl@gnu.org>
  3. Date: Mon, 26 Oct 2020 18:09:56 +0100
  4. Subject: [PATCH] * meson.build: Fix 'harfbuzz' and 'brotli' build options
  5. (#59347).
  6. Without this patch, 'harfbuzz' and 'brotli' are always required.
  7. Patch submitted anonymously in Savannah bug report.
  8. ---
  9. meson.build | 12 ++++++++----
  10. 1 file changed, 8 insertions(+), 4 deletions(-)
  11. --- a/meson.build
  12. +++ b/meson.build
  13. @@ -267,13 +267,17 @@ ft2_deps += [libpng_dep]
  14. harfbuzz_dep = dependency('harfbuzz',
  15. version: '>= 1.8.0',
  16. required: get_option('harfbuzz'))
  17. -ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_HARFBUZZ']
  18. -ft2_deps += [harfbuzz_dep]
  19. +if harfbuzz_dep.found()
  20. + ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_HARFBUZZ']
  21. + ft2_deps += [harfbuzz_dep]
  22. +endif
  23. # Brotli decompression support
  24. brotli_dep = dependency('libbrotlidec', required: get_option('brotli'))
  25. -ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_BROTLI']
  26. -ft2_deps += [brotli_dep]
  27. +if brotli_dep.found()
  28. + ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_BROTLI']
  29. + ft2_deps += [brotli_dep]
  30. +endif
  31. # We can now generate `ftoption.h`.
  32. ftoption_h = custom_target('ftoption.h',