freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master 09195a8: * meson.build: Fix zlib support.


From: Werner Lemberg
Subject: [freetype2] master 09195a8: * meson.build: Fix zlib support.
Date: Mon, 2 Aug 2021 07:05:04 -0400 (EDT)

branch: master
commit 09195a82a4a39afb0f8281563f48ce4493455b4e
Author: Werner Lemberg <wl@gnu.org>
Commit: Werner Lemberg <wl@gnu.org>

    * meson.build: Fix zlib support.
    
    This commit synchronizes zlib support with both autotools and cmake: If no
    external zlib is found (or intentionally disabled on the command line), use
    the internal zlib by undefining `FT_CONFIG_OPTION_SYSTEM_ZLIB` without
    modifying `FT_CONFIG_OPTION_USE_ZLIB`.
    
    Also improve summary output.
    
    Problem reported by Moazin.
---
 meson.build | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/meson.build b/meson.build
index 5bfa188..5efb33d 100644
--- a/meson.build
+++ b/meson.build
@@ -87,7 +87,7 @@ foreach mod: ft_main_modules
   ft2_sources += 'src/@0@/@1@.c'.format(mod, source)
 endforeach
 
-# NOTE: The `gzip` and `bzip2` aux modules are handled through options.
+# NOTE: The `bzip2` aux module is handled through options.
 ft_aux_modules = run_command(python_exe,
   files('builds/meson/parse_modules_cfg.py'),
   '--format=aux-modules',
@@ -101,7 +101,9 @@ foreach auxmod: ft_aux_modules
     source = 'ftcache'
   elif auxmod == 'lzw'
     source = 'ftlzw'
-  elif auxmod == 'gzip' or auxmod == 'bzip2'
+  elif auxmod == 'gzip'
+    source = 'ftgzip'
+  elif auxmod == 'bzip2'
     # Handled through options instead, see below.
     continue
   endif
@@ -243,20 +245,16 @@ process_header_command = [python_exe,
 ftoption_command = process_header_command
 
 
-# GZip support
+# external GZip support
 zlib_dep = dependency('zlib',
   required: get_option('zlib'),
   fallback: 'zlib')
 
 if zlib_dep.found()
-  ftoption_command += [
-    '--enable=FT_CONFIG_OPTION_USE_ZLIB',
-    '--enable=FT_CONFIG_OPTION_SYSTEM_ZLIB',
-  ]
-  ft2_sources += files(['src/gzip/ftgzip.c',])
+  ftoption_command += ['--enable=FT_CONFIG_OPTION_SYSTEM_ZLIB']
   ft2_deps += [zlib_dep]
 else
-  ftoption_command += ['--disable=FT_CONFIG_OPTION_USE_ZLIB']
+  ftoption_command += ['--disable=FT_CONFIG_OPTION_SYSTEM_ZLIB']
 endif
 
 # BZip2 support
@@ -400,11 +398,13 @@ gen_docs = custom_target('freetype2 reference 
documentation',
 
 
 summary({'OS': host_machine.system(),
-         'Zlib': zlib_dep.found() ? 'yes' : 'no',
+        }, section: 'Operating System')
+
+summary({'Zlib': zlib_dep.found() ? 'external' : 'internal',
          'Bzip2': bzip2_dep.found() ? 'yes' : 'no',
          'Png': libpng_dep.found() ? 'yes' : 'no',
          'Harfbuzz': harfbuzz_dep.found() ? 'yes' : 'no',
          'Brotli': brotli_dep.found() ? 'yes' : 'no',
-        }, section: 'Configuration Options Summary:')
+        }, section: 'Used Libraries')
 
 # EOF



reply via email to

[Prev in Thread] Current Thread [Next in Thread]