subprojects/zlib: Improve meson.build, emulating configure script (#3759)
* subprojects/zlib: Improve meson.build, emulating configure script * Update zlib to 1.3
This commit is contained in:
parent
762feed1b6
commit
f0c932f2cf
2 changed files with 24 additions and 16 deletions
|
|
@ -1,22 +1,30 @@
|
|||
project('zlib', 'c', version : '1.2.13', license : 'zlib')
|
||||
project('zlib', 'c', version : '1.3', license : 'zlib')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
link_args = []
|
||||
compile_args = []
|
||||
if cc.get_id() == 'msvc'
|
||||
add_project_arguments('-D_CRT_SECURE_NO_DEPRECATE',
|
||||
'-D_CRT_NONSTDC_NO_DEPRECATE', language : 'c')
|
||||
else
|
||||
if cc.get_argument_syntax() == 'msvc'
|
||||
add_project_arguments(
|
||||
'-D_CRT_SECURE_NO_DEPRECATE',
|
||||
'-D_CRT_NONSTDC_NO_DEPRECATE',
|
||||
language : 'c')
|
||||
elif cc.get_argument_syntax() == 'gcc'
|
||||
# Don't spam consumers of this wrap with these warnings
|
||||
compile_args += cc.get_supported_arguments(['-Wno-implicit-fallthrough',
|
||||
'-Wno-implicit-function-declaration'])
|
||||
if cc.get_id() == 'gcc' and host_machine.system() != 'windows'
|
||||
vflag = '-Wl,--version-script,@0@/zlib.map'.format(meson.current_source_dir())
|
||||
link_args += [vflag]
|
||||
compile_args += cc.get_supported_arguments('-Wno-implicit-fallthrough')
|
||||
if host_machine.system() not in ['windows', 'darwin']
|
||||
link_args += '-Wl,--version-script,@0@/zlib.map'.format(meson.current_source_dir())
|
||||
endif
|
||||
endif
|
||||
|
||||
if cc.has_header('unistd.h')
|
||||
compile_args += '-DHAVE_UNISTD_H'
|
||||
endif
|
||||
|
||||
if cc.has_header('stdarg.h')
|
||||
compile_args += '-DHAVE_STDARG_H'
|
||||
endif
|
||||
|
||||
src = files([
|
||||
'adler32.c',
|
||||
'crc32.c',
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
[wrap-file]
|
||||
directory = zlib-1.2.13
|
||||
source_url = https://raw.githubusercontent.com/rizinorg/fallback-repo/main/zlib-1.2.13.tar.gz
|
||||
source_filename = zlib-1.2.13.tar.gz
|
||||
source_hash = b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30
|
||||
patch_directory = zlib-1.2.13
|
||||
source_fallback_url = https://zlib.net/fossils/zlib-1.2.13.tar.gz
|
||||
directory = zlib-1.3
|
||||
source_url = https://raw.githubusercontent.com/rizinorg/fallback-repo/main/zlib-1.3.tar.gz
|
||||
source_filename = zlib-1.3.tar.gz
|
||||
source_hash = ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e
|
||||
patch_directory = zlib-1.3
|
||||
source_fallback_url = https://zlib.net/fossils/zlib-1.3.tar.gz
|
||||
|
|
|
|||
Loading…
Reference in a new issue