-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Xerces-C to 3.2.4 and zlib 1.2.13 (#500)
IB-7569, microsoft/vcpkg#27226 Signed-off-by: Raul Metsma <raul@metsma.ee> Signed-off-by: Raul Metsma <raul@metsma.ee>
- Loading branch information
Showing
10 changed files
with
313 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
patches/vcpkg-ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
17 changes: 17 additions & 0 deletions
17
patches/vcpkg-ports/zlib/0002-skip-building-examples.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index b412dc7..f46c8e6 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -194,6 +194,7 @@ endif() | ||
# Example binaries | ||
#============================================================================ | ||
|
||
+if (0) | ||
add_executable(example test/example.c) | ||
target_link_libraries(example zlib) | ||
add_test(example example) | ||
@@ -211,3 +212,4 @@ if(HAVE_OFF64_T) | ||
target_link_libraries(minigzip64 zlib) | ||
set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") | ||
endif() | ||
+endif() |
53 changes: 53 additions & 0 deletions
53
patches/vcpkg-ports/zlib/0003-build-static-or-shared-not-both.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index f46c8e6..6fa5575 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -121,9 +121,11 @@ set(ZLIB_SRCS | ||
) | ||
|
||
if(NOT MINGW) | ||
+ if(BUILD_SHARED_LIBS) | ||
set(ZLIB_DLL_SRCS | ||
win32/zlib1.rc # If present will override custom build rule below. | ||
) | ||
+ endif() | ||
endif() | ||
|
||
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION | ||
@@ -144,13 +146,16 @@ if(MINGW) | ||
-I ${CMAKE_CURRENT_BINARY_DIR} | ||
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj | ||
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) | ||
+ if(BUILD_SHARED_LIBS) | ||
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) | ||
+ endif() | ||
endif(MINGW) | ||
|
||
-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) | ||
-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) | ||
+add_library(zlib ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) | ||
+if (BUILD_SHARED_LIBS) | ||
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) | ||
set_target_properties(zlib PROPERTIES SOVERSION 1) | ||
+endif() | ||
|
||
if(NOT CYGWIN) | ||
# This property causes shared libraries on Linux to have the full version | ||
@@ -165,7 +170,7 @@ endif() | ||
|
||
if(UNIX) | ||
# On unix-like platforms the library is almost always called libz | ||
- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) | ||
+ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) | ||
if(NOT APPLE) | ||
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") | ||
endif() | ||
@@ -175,7 +180,7 @@ elseif(BUILD_SHARED_LIBS AND WIN32) | ||
endif() | ||
|
||
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) | ||
- install(TARGETS zlib zlibstatic | ||
+ install(TARGETS zlib | ||
RUNTIME DESTINATION "${INSTALL_BIN_DIR}" | ||
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" | ||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) |
31 changes: 31 additions & 0 deletions
31
patches/vcpkg-ports/zlib/0004-android-and-mingw-fixes.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 6fa5575..7c345db 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -56,7 +56,7 @@ endif() | ||
# | ||
check_include_file(unistd.h Z_HAVE_UNISTD_H) | ||
|
||
-if(MSVC) | ||
+if(WIN32) | ||
set(CMAKE_DEBUG_POSTFIX "d") | ||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE) | ||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) | ||
@@ -133,7 +133,7 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) | ||
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" | ||
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents}) | ||
|
||
-if(MINGW) | ||
+if(MINGW AND NOT ANDROID) | ||
# This gets us DLL resource information when compiling on MinGW. | ||
if(NOT CMAKE_RC_COMPILER) | ||
set(CMAKE_RC_COMPILER windres.exe) | ||
@@ -149,7 +149,7 @@ if(MINGW) | ||
if(BUILD_SHARED_LIBS) | ||
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) | ||
endif() | ||
-endif(MINGW) | ||
+endif(MINGW AND NOT ANDROID) | ||
|
||
add_library(zlib ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) | ||
if (BUILD_SHARED_LIBS) |
Oops, something went wrong.