Skip to content

Commit 8321cde

Browse files
committed
meson wraps: replace zlib with zlib-ng
Faster. Signed-off-by: Rosen Penev <rosenp@gmail.com>
1 parent cd69bc5 commit 8321cde

File tree

3 files changed

+17
-22
lines changed

3 files changed

+17
-22
lines changed

meson.build

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ project(
22
'exiv2',
33
'cpp',
44
version: '1.0.0',
5-
meson_version: '>=0.54.1',
5+
meson_version: '>=0.60.0',
66
default_options: ['warning_level=0', 'cpp_std=c++20'],
77
)
88

@@ -87,18 +87,12 @@ if inih_dep.found()
8787
deps += inih_dep
8888
endif
8989

90-
zlib_dep = dependency('zlib', disabler: true, required: get_option('png'))
90+
zlib_dep = dependency('zlib-ng', 'zlib', disabler: true, required: get_option('png'))
9191
if zlib_dep.found()
9292
deps += zlib_dep
9393
endif
9494

95-
if meson.version().version_compare('>= 0.60')
96-
iconv_dep = dependency('iconv', required: get_option('iconv'))
97-
elif not get_option('iconv').disabled() and not cpp.links('#include <iconv.h>\nint main(){iconv_open("", "");}')
98-
iconv_dep = cpp.find_library('iconv', required: get_option('iconv'))
99-
else
100-
iconv_dep = get_option('iconv').disabled() ? dependency('', required: false) : declare_dependency()
101-
endif
95+
iconv_dep = dependency('iconv', required: get_option('iconv'))
10296
if iconv_dep.found()
10397
deps += iconv_dep
10498
endif

subprojects/zlib-ng.wrap

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[wrap-file]
2+
directory = zlib-ng-2.3.2
3+
source_url = https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.3.2.tar.gz
4+
source_filename = zlib-ng-2.3.2.tar.gz
5+
source_hash = 6a0561b50b8f5f6434a6a9e667a67026f2b2064a1ffa959c6b2dae320161c2a8
6+
source_fallback_url = https://wrapdb.mesonbuild.com/v2/zlib-ng_2.3.2-2/get_source/zlib-ng-2.3.2.tar.gz
7+
patch_filename = zlib-ng_2.3.2-2_patch.zip
8+
patch_url = https://wrapdb.mesonbuild.com/v2/zlib-ng_2.3.2-2/get_patch
9+
patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/zlib-ng_2.3.2-2/zlib-ng_2.3.2-2_patch.zip
10+
patch_hash = 43eff1d7f7948b0fa09237bcf08d7fc34378929eddf216897e9be5955506e35f
11+
wrapdb_version = 2.3.2-2
12+
13+
[provide]
14+
dependency_names = zlib-ng

subprojects/zlib.wrap

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)