aboutsummaryrefslogtreecommitdiff
path: root/ports/zlib
diff options
context:
space:
mode:
authorMatthew Oliver <protogonoi@gmail.com>2020-08-19 05:58:14 +1000
committerGitHub <noreply@github.com>2020-08-18 12:58:14 -0700
commit272269583c80a4ba626d405e79a88a2ddd6d950d (patch)
treeaca2bd4c6ea94d1656e983492752ea33c2b0bb1e /ports/zlib
parentbc8807963282a6b01f0e7ba94b732c5ec028d6a1 (diff)
downloadvcpkg-272269583c80a4ba626d405e79a88a2ddd6d950d.tar.gz
vcpkg-272269583c80a4ba626d405e79a88a2ddd6d950d.zip
[ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. (#11277)
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
Diffstat (limited to 'ports/zlib')
-rw-r--r--ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch53
-rw-r--r--ports/zlib/CONTROL2
-rw-r--r--ports/zlib/portfile.cmake1
3 files changed, 55 insertions, 1 deletions
diff --git a/ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch b/ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch
new file mode 100644
index 000000000..8fe2b2f5a
--- /dev/null
+++ b/ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch
@@ -0,0 +1,53 @@
+diff --git a/zconf.h.cmakein b/zconf.h.cmakein
+index a7f24cc..a1b359b 100644
+--- a/zconf.h.cmakein
++++ b/zconf.h.cmakein
+@@ -434,11 +434,19 @@ typedef uLong FAR uLongf;
+ #endif
+
+ #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
+-# define Z_HAVE_UNISTD_H
++# if ~(~HAVE_UNISTD_H + 0) == 0 && ~(~HAVE_UNISTD_H + 1) == 1
++# define Z_HAVE_UNISTD_H
++# elif HAVE_UNISTD_H != 0
++# define Z_HAVE_UNISTD_H
++# endif
+ #endif
+
+ #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
+-# define Z_HAVE_STDARG_H
++# if ~(~HAVE_STDARG_H + 0) == 0 && ~(~HAVE_STDARG_H + 1) == 1
++# define Z_HAVE_STDARG_H
++# elif HAVE_STDARG_H != 0
++# define Z_HAVE_STDARG_H
++# endif
+ #endif
+
+ #ifdef STDC
+diff --git a/zconf.h.in b/zconf.h.in
+index 5e1d68a..32f53c8 100644
+--- a/zconf.h.in
++++ b/zconf.h.in
+@@ -432,11 +432,19 @@ typedef uLong FAR uLongf;
+ #endif
+
+ #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
+-# define Z_HAVE_UNISTD_H
++# if ~(~HAVE_UNISTD_H + 0) == 0 && ~(~HAVE_UNISTD_H + 1) == 1
++# define Z_HAVE_UNISTD_H
++# elif HAVE_UNISTD_H != 0
++# define Z_HAVE_UNISTD_H
++# endif
+ #endif
+
+ #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
+-# define Z_HAVE_STDARG_H
++# if ~(~HAVE_STDARG_H + 0) == 0 && ~(~HAVE_STDARG_H + 1) == 1
++# define Z_HAVE_STDARG_H
++# elif HAVE_STDARG_H != 0
++# define Z_HAVE_STDARG_H
++# endif
+ #endif
+
+ #ifdef STDC
+
diff --git a/ports/zlib/CONTROL b/ports/zlib/CONTROL
index 3196577b5..9a79b2e7b 100644
--- a/ports/zlib/CONTROL
+++ b/ports/zlib/CONTROL
@@ -1,5 +1,5 @@
Source: zlib
Version: 1.2.11
-Port-Version: 8
+Port-Version: 9
Homepage: https://www.zlib.net/
Description: A compression library
diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake
index 14faef4c8..6277d5b0a 100644
--- a/ports/zlib/portfile.cmake
+++ b/ports/zlib/portfile.cmake
@@ -12,6 +12,7 @@ vcpkg_extract_source_archive_ex(
REF ${VERSION}
PATCHES
"cmake_dont_build_more_than_needed.patch"
+ "0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch"
"add_debug_postfix_on_mingw.patch"
)