summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2021-01-17 15:50:08 +0000
committerWerner Lemberg <wl@gnu.org>2021-03-07 17:54:21 +0100
commitbb42afbda084b0ac5b017f454fd1b262a94805dd (patch)
treef093dbcf8acddcde5f1ed198af0a99ce6702bb9b
parentd69d9c2397afc86e95fef48226364723e14d506c (diff)
downloadfreetype2-bb42afbda084b0ac5b017f454fd1b262a94805dd.tar.gz
[meson] Add subproject fallbacks for 'libpng' and 'zlib'.
* subprojects/libpng.wrap, subprojects/zlib.wrap: New files. * meson.build: Updated.
-rw-r--r--ChangeLog8
-rw-r--r--meson.build5
-rw-r--r--subprojects/libpng.wrap11
-rw-r--r--subprojects/zlib.wrap12
4 files changed, 33 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5b0aab449..c0e2511b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/meson.build b/meson.build
index 93b489487..c3984569f 100644
--- a/meson.build
+++ b/meson.build
@@ -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]
diff --git a/subprojects/libpng.wrap b/subprojects/libpng.wrap
new file mode 100644
index 000000000..599045ba8
--- /dev/null
+++ b/subprojects/libpng.wrap
@@ -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
diff --git a/subprojects/zlib.wrap b/subprojects/zlib.wrap
new file mode 100644
index 000000000..ce20fb053
--- /dev/null
+++ b/subprojects/zlib.wrap
@@ -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
+