From 9413a3d96d27b8b28bb2118568d60b9aa5685ae6 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Fri, 19 Dec 2025 23:59:05 +0800 Subject: [PATCH] zlib: update to 1.3.2 Release Notes: https://github.com/madler/zlib/blob/v1.3.2/ChangeLog We also switch package tarball source to GitHub repository releases to avoid package hash mismatch after the zstd upgrade. The 005-* patch was suppressed by the upstream commit 15ba5055a935 ("CMake: Adapt pkgconfig-file to the GnuInstallDirs layout.") This patch also adjust the zlib.pc file path as it was changed in the latest release. The mipsel_24kc 'zlib' package size will increase by about 1 kB. Signed-off-by: Shiji Yang Link: https://github.com/openwrt/openwrt/pull/21228 Signed-off-by: Hauke Mehrtens --- package/libs/zlib/Makefile | 13 ++--- ...rcefiles-in-patch-002-to-buildsystem.patch | 57 +++++++++---------- .../005-relative-pkg-config-paths.patch | 14 ----- 3 files changed, 32 insertions(+), 52 deletions(-) delete mode 100644 package/libs/zlib/patches/005-relative-pkg-config-paths.patch diff --git a/package/libs/zlib/Makefile b/package/libs/zlib/Makefile index 87a5715f89..b192b6dcf7 100644 --- a/package/libs/zlib/Makefile +++ b/package/libs/zlib/Makefile @@ -8,13 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zlib -PKG_VERSION:=1.3.1 +PKG_VERSION:=1.3.2 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/madler/zlib -PKG_SOURCE_VERSION:=51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf -PKG_MIRROR_HASH:=6558577038f4839057fad93afb295bf32e84dc9bd2c33512d40a5eab6d4889ef +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://github.com/madler/zlib/releases/download/v$(PKG_VERSION) +PKG_HASH:=d7a0654783a4da529d1bb793b7ad9c3318020af77667bcae35f95d0e42a792f3 PKG_LICENSE:=Zlib PKG_LICENSE_FILES:=LICENSE @@ -71,7 +70,7 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} \ $(1)/usr/lib/ mkdir -p $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/zlib.pc \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/zlib.pc \ $(1)/usr/lib/pkgconfig/ endef @@ -91,7 +90,7 @@ define Package/zlib-dev/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.a $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/zlib.pc \ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/zlib.pc \ $(1)/usr/lib/pkgconfig/ endef diff --git a/package/libs/zlib/patches/004-attach-sourcefiles-in-patch-002-to-buildsystem.patch b/package/libs/zlib/patches/004-attach-sourcefiles-in-patch-002-to-buildsystem.patch index 5181dcf419..582e48245e 100644 --- a/package/libs/zlib/patches/004-attach-sourcefiles-in-patch-002-to-buildsystem.patch +++ b/package/libs/zlib/patches/004-attach-sourcefiles-in-patch-002-to-buildsystem.patch @@ -1,9 +1,9 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -93,34 +93,67 @@ set(ZLIB_PUBLIC_HDRS - ${CMAKE_CURRENT_BINARY_DIR}/zconf.h - zlib.h - ) +@@ -121,33 +121,64 @@ configure_file(${zlib_BINARY_DIR}/zconf. + + set(ZLIB_PUBLIC_HDRS ${zlib_BINARY_DIR}/zconf.h zlib.h) + -set(ZLIB_PRIVATE_HDRS - crc32.h - deflate.h @@ -13,8 +13,20 @@ - inflate.h - inftrees.h - trees.h -- zutil.h --) +- zutil.h) ++if(ARMv8) ++ set(ZLIB_PRIVATE_HDRS ++ crc32.h ++ deflate.h ++ gzguts.h ++ inffast.h ++ inffixed.h ++ inflate.h ++ inftrees.h ++ trees.h ++ zutil.h ++ contrib/arm/chunkcopy.h) + -set(ZLIB_SRCS - adler32.c - compress.c @@ -30,22 +42,7 @@ - inffast.c - trees.c - uncompr.c -- zutil.c --) -+ -+if(ARMv8) -+ set(ZLIB_PRIVATE_HDRS -+ crc32.h -+ deflate.h -+ gzguts.h -+ inffast.h -+ inffixed.h -+ inflate.h -+ inftrees.h -+ trees.h -+ zutil.h -+ contrib/arm/chunkcopy.h -+ ) +- zutil.c) + set(ZLIB_SRCS + adler32.c + compress.c @@ -61,9 +58,8 @@ + contrib/arm/inffast.c + trees.c + uncompr.c -+ zutil.c -+ ) -+ else() ++ zutil.c) ++else() + set(ZLIB_PRIVATE_HDRS + crc32.h + deflate.h @@ -73,8 +69,8 @@ + inflate.h + inftrees.h + trees.h -+ zutil.h -+ ) ++ zutil.h) ++ + set(ZLIB_SRCS + adler32.c + compress.c @@ -90,9 +86,8 @@ + inffast.c + trees.c + uncompr.c -+ zutil.c -+ ) ++ zutil.c) +endif() - if(NOT MINGW) - set(ZLIB_DLL_SRCS + if(WIN32) + set(zlib_static_suffix "s") diff --git a/package/libs/zlib/patches/005-relative-pkg-config-paths.patch b/package/libs/zlib/patches/005-relative-pkg-config-paths.patch deleted file mode 100644 index c86d19b412..0000000000 --- a/package/libs/zlib/patches/005-relative-pkg-config-paths.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/zlib.pc.cmakein -+++ b/zlib.pc.cmakein -@@ -1,8 +1,8 @@ - prefix=@CMAKE_INSTALL_PREFIX@ - exec_prefix=@CMAKE_INSTALL_PREFIX@ --libdir=@INSTALL_LIB_DIR@ --sharedlibdir=@INSTALL_LIB_DIR@ --includedir=@INSTALL_INC_DIR@ -+libdir=${exec_prefix}/lib -+sharedlibdir=${exec_prefix}/lib -+includedir=${prefix}/include - - Name: zlib - Description: zlib compression library