Skip to content

Commit

Permalink
Switch from zlib to zlib-ng
Browse files Browse the repository at this point in the history
Use zlib-ng (in zlib-compat mode) as a better-optimized alternative.

Signed-off-by: Benjamin Gilbert <[email protected]>
  • Loading branch information
bgilbert committed Sep 28, 2024
1 parent 934cc2c commit f3f0ae2
Show file tree
Hide file tree
Showing 4 changed files with 1,234 additions and 6 deletions.
8 changes: 4 additions & 4 deletions common/software.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,10 @@ def _sqlite3_license(proj: Project) -> tuple[str, str]:
remove_dirs=['doc', 'tests'],
),
Project(
id='zlib',
display='zlib',
licenses=['README'],
remove_dirs=['contrib', 'doc', 'examples'],
id='zlib-ng',
display='zlib-ng',
licenses=['LICENSE.md'],
remove_dirs=['doc', 'test'],
),
Project(
id='zstd',
Expand Down
10 changes: 8 additions & 2 deletions deps/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,19 @@ add_global_arguments(
language : ['c', 'cpp'],
)

meson.override_dependency(
'zlib',
subproject(
'zlib-ng',
default_options : ['tests=disabled', 'zlib-compat=true'],
).get_variable('zlib_ng_dep'),
)

if not all_systems and system == 'darwin'
cc = meson.get_compiler('c')
# [dependency name, library name, version] or
# [dependency name, library name, header with version, version define]
overrides = [
# zlib is handled automatically by dependency()
# no define for libffi version; pick a value that will pass the checks
['libffi', 'ffi', '3.0.0'],
['libxml-2.0', 'xml2', 'libxml/xmlversion.h', 'LIBXML_DOTTED_VERSION'],
Expand Down Expand Up @@ -43,7 +50,6 @@ if not all_systems and system == 'darwin'
language : ['c', 'cpp'],
)
else
subproject('zlib')
subproject(
'libffi',
default_options : ['tests=false'],
Expand Down
Loading

0 comments on commit f3f0ae2

Please sign in to comment.