[meson] Add subproject fallbacks for 'libpng' and 'zlib'.

* subprojects/libpng.wrap, subprojects/zlib.wrap: New files.

* meson.build: Updated.
This commit is contained in:
Tim-Philipp Müller 2021-01-17 15:50:08 +00:00 committed by Werner Lemberg
parent d69d9c2397
commit bb42afbda0
4 changed files with 33 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2021-03-07 Tim-Philipp Müller <tim@centricular.com>
[meson] Add subproject fallbacks for 'libpng' and 'zlib'.
* subprojects/libpng.wrap, subprojects/zlib.wrap: New files.
* meson.build: Updated.
2021-03-07 Xavier Claessens <xavier.claessens@collabora.com>
[meson] Make it work with Windows.

View File

@ -229,8 +229,7 @@ ftoption_command = process_header_command
# GZip support
zlib_dep = dependency('zlib', required: get_option('zlib'),
fallback: ['zlib', 'zlib_dep'])
zlib_dep = dependency('zlib', required: get_option('zlib'), fallback: 'zlib')
if zlib_dep.found()
ftoption_command += [
'--enable=FT_CONFIG_OPTION_USE_ZLIB',
@ -251,7 +250,7 @@ if bzip2_dep.found()
endif
# PNG support
libpng_dep = dependency('libpng', required: get_option('png'))
libpng_dep = dependency('libpng', required: get_option('png'), fallback: 'libpng')
if libpng_dep.found()
ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_PNG']
ft2_deps += [libpng_dep]

11
subprojects/libpng.wrap Normal file
View File

@ -0,0 +1,11 @@
[wrap-file]
directory = libpng-1.6.37
source_url = https://github.com/glennrp/libpng/archive/v1.6.37.tar.gz
source_filename = libpng-1.6.37.tar.gz
source_hash = ca74a0dace179a8422187671aee97dd3892b53e168627145271cad5b5ac81307
patch_url = https://wrapdb.mesonbuild.com/v1/projects/libpng/1.6.37/3/get_zip
patch_filename = libpng-1.6.37-3-wrap.zip
patch_hash = 6c9f32fd9150b3a96ab89be52af664e32207e10aa9f5fb9aa015989ee2dd7100
[provide]
libpng = libpng_dep

12
subprojects/zlib.wrap Normal file
View File

@ -0,0 +1,12 @@
[wrap-file]
directory = zlib-1.2.11
source_url = http://zlib.net/fossils/zlib-1.2.11.tar.gz
source_filename = zlib-1.2.11.tar.gz
source_hash = c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
patch_url = https://wrapdb.mesonbuild.com/v1/projects/zlib/1.2.11/5/get_zip
patch_filename = zlib-1.2.11-5-wrap.zip
patch_hash = 728c8e24acbc2e6682fbd950fec39e2fc77528af361adb87259f8a8511434004
[provide]
zlib = zlib_dep