From c5cf7a77773022d440c5115f88bb9046a9b65533 Mon Sep 17 00:00:00 2001 From: "Vivek (FAIR) Pai" Date: Thu, 25 Jan 2024 02:13:59 -0800 Subject: [PATCH] upgrade zlib to 1.3.1 Summary: X-link: https://github.com/facebookincubator/zstrong/pull/673 Zlib's latest version is 1.3.1 - switch to that Reviewed By: chadaustin Differential Revision: D53005300 fbshipit-source-id: 191c9022c1ee288a6f117763428a9a85db54ed8f --- build/fbcode_builder/manifests/zlib | 6 ++--- .../zlib_dont_build_more_than_needed.patch | 26 ++++++++++--------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/build/fbcode_builder/manifests/zlib b/build/fbcode_builder/manifests/zlib index 86647fc9..dda100aa 100644 --- a/build/fbcode_builder/manifests/zlib +++ b/build/fbcode_builder/manifests/zlib @@ -12,10 +12,10 @@ zlib-devel zlib-static [download] -url = https://zlib.net/zlib-1.3.tar.gz -sha256 = ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e +url = https://zlib.net/zlib-1.3.1.tar.gz +sha256 = 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 [build] builder = cmake -subdir = zlib-1.3 +subdir = zlib-1.3.1 patchfile = zlib_dont_build_more_than_needed.patch diff --git a/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch b/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch index 919f4ec8..2ef11571 100644 --- a/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch +++ b/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch @@ -1,28 +1,30 @@ -diff -Naur ../zlib-1.2.13/CMakeLists.txt ./CMakeLists.txt ---- ../zlib-1.2.13/CMakeLists.txt 2022-10-12 22:06:55.000000000 -0700 -+++ ./CMakeLists.txt 2022-10-14 14:50:28.000000000 -0700 -@@ -147,8 +147,7 @@ +diff -Naur ../zlib-1.3.1/CMakeLists.txt ./CMakeLists.txt +--- ../zlib-1.3.1/CMakeLists.txt 2024-01-22 10:32:37.000000000 -0800 ++++ ./CMakeLists.txt 2024-01-23 13:14:09.870289968 -0800 +@@ -149,10 +149,8 @@ set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) 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_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +-target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) set_target_properties(zlib PROPERTIES SOVERSION 1) - -@@ -165,7 +164,7 @@ - + +@@ -169,7 +167,7 @@ + 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) + if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") endif() -@@ -175,7 +174,7 @@ +@@ -179,7 +177,7 @@ endif() - + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) - install(TARGETS zlib zlibstatic + install(TARGETS zlib