From 88315f1a9ab6b7f023bc2a052f3f68c74fa1ffd3 Mon Sep 17 00:00:00 2001 From: Matthieu Penant Date: Wed, 24 Mar 2021 14:07:45 -0400 Subject: [PATCH 1/8] [zstd] update to 1.4.9 Fixes #16642 Update zstd to the latest version 1.4.9: https://github.com/facebook/zstd/releases/tag/v1.4.9 --- ports/zstd/0002-crosscompile-windows.patch | 12 ------------ ports/zstd/CONTROL | 5 ----- ports/zstd/fix_assert.patch | 13 ------------- ports/zstd/install_dll.patch | 12 ------------ ports/zstd/install_pkgpc.patch | 13 ------------- ports/zstd/portfile.cmake | 9 ++------- ports/zstd/vcpkg.json | 6 ++++++ 7 files changed, 8 insertions(+), 62 deletions(-) delete mode 100644 ports/zstd/0002-crosscompile-windows.patch delete mode 100644 ports/zstd/CONTROL delete mode 100644 ports/zstd/fix_assert.patch delete mode 100644 ports/zstd/install_dll.patch delete mode 100644 ports/zstd/install_pkgpc.patch create mode 100644 ports/zstd/vcpkg.json diff --git a/ports/zstd/0002-crosscompile-windows.patch b/ports/zstd/0002-crosscompile-windows.patch deleted file mode 100644 index c084da1ffa5c07..00000000000000 --- a/ports/zstd/0002-crosscompile-windows.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake b/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake -index 7adca875..8835d1c6 100644 ---- a/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake 2019-11-04 17:54:32.000000000 +0000 -+++ b/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake 2020-09-09 20:54:13.817515706 +0000 -@@ -52,7 +52,6 @@ - CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) - if( ${flag_var} ) - separate_arguments(${flag_var}) -- list(REMOVE_DUPLICATES ${flag_var}) - string(REPLACE ";" " " ${flag_var} "${${flag_var}}") - endif() - endforeach () diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL deleted file mode 100644 index f87e519c9ecf5f..00000000000000 --- a/ports/zstd/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: zstd -Version: 1.4.5 -Port-Version: 1 -Description: Zstandard - Fast real-time compression algorithm -Homepage: https://facebook.github.io/zstd/ diff --git a/ports/zstd/fix_assert.patch b/ports/zstd/fix_assert.patch deleted file mode 100644 index b7fa3dc8d8b554..00000000000000 --- a/ports/zstd/fix_assert.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lib/decompress/zstd_decompress.c b/lib/decompress/zstd_decompress.c -index be5c7cfc3..539190998 100644 ---- a/lib/decompress/zstd_decompress.c -+++ b/lib/decompress/zstd_decompress.c -@@ -721,7 +721,7 @@ static size_t ZSTD_decompressMultiFrame(ZSTD_DCtx* dctx, - decodedSize = ZSTD_decompressLegacy(dst, dstCapacity, src, frameSize, dict, dictSize); - if (ZSTD_isError(decodedSize)) return decodedSize; - -- assert(decodedSize <=- dstCapacity); -+ assert(decodedSize <= dstCapacity); - dst = (BYTE*)dst + decodedSize; - dstCapacity -= decodedSize; - diff --git a/ports/zstd/install_dll.patch b/ports/zstd/install_dll.patch deleted file mode 100644 index 569b481f1d33ed..00000000000000 --- a/ports/zstd/install_dll.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt -index 4274cbdd3..ea1b5f088 100644 ---- a/build/cmake/lib/CMakeLists.txt -+++ b/build/cmake/lib/CMakeLists.txt -@@ -163,6 +163,7 @@ install(TARGETS ${library_targets} - INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - ) - - # uninstall target diff --git a/ports/zstd/install_pkgpc.patch b/ports/zstd/install_pkgpc.patch deleted file mode 100644 index 4936f05f6bbce8..00000000000000 --- a/ports/zstd/install_pkgpc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt -index 666da60c1..4274cbdd3 100644 ---- a/build/cmake/lib/CMakeLists.txt -+++ b/build/cmake/lib/CMakeLists.txt -@@ -134,7 +134,7 @@ if (ZSTD_BUILD_STATIC) - OUTPUT_NAME ${STATIC_LIBRARY_BASE_NAME}) - endif () - --if (UNIX) -+if (1) - # pkg-config - set(PREFIX "${CMAKE_INSTALL_PREFIX}") - set(LIBDIR "${CMAKE_INSTALL_LIBDIR}") diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index 73cc2b18584a40..aaa1b91310137d 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -1,14 +1,9 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/zstd - REF b706286adbba780006a47ef92df0ad7a785666b6 # v1.4.5 - SHA512 1be43e8cc1dad9dd59036f86a7dd579b8fcbf16b3ebae62f38aa0397f45ab0eab2e97e924cede40428fa9125a2e5e567694bb04a0c9ec0c4275a79cd2ef8eb11 + REF v1.4.9 + SHA512 f529db9c094f9ae26428bf1fdfcc91c6d783d400980e0f0d802d2cf13c2be2931465ef568907e03841ff76a369a1447e7371f8799d8526edb9a513ba5c6db133 HEAD_REF dev - PATCHES - 0002-crosscompile-windows.patch - fix_assert.patch - install_pkgpc.patch - install_dll.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") diff --git a/ports/zstd/vcpkg.json b/ports/zstd/vcpkg.json new file mode 100644 index 00000000000000..9b684abe1c1919 --- /dev/null +++ b/ports/zstd/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "zstd", + "version": "1.4.9", + "description": "Zstandard - Fast real-time compression algorithm", + "homepage": "https://facebook.github.io/zstd/" +} \ No newline at end of file From 29b9277545eea801e337cc26b2384926256348c5 Mon Sep 17 00:00:00 2001 From: Matthieu Penant Date: Wed, 24 Mar 2021 14:08:03 -0400 Subject: [PATCH 2/8] update baseline / version --- versions/baseline.json | 4 ++-- versions/z-/zstd.json | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index bbbffb6f9ad0c2..d84a4d3a1605ac 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6473,8 +6473,8 @@ "port-version": 0 }, "zstd": { - "baseline": "1.4.5", - "port-version": 1 + "baseline": "1.4.9", + "port-version": 0 }, "zstr": { "baseline": "1.0.4", diff --git a/versions/z-/zstd.json b/versions/z-/zstd.json index a4417103611d4b..794b55ec8ba728 100644 --- a/versions/z-/zstd.json +++ b/versions/z-/zstd.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f4b7636d762d5f457c899b07117d4fbd000d4911", + "version": "1.4.9", + "port-version": 0 + }, { "git-tree": "b592e9dd5ab7aa6c1b46e0d23e0d31093edd73ca", "version-string": "1.4.5", From a224b1d188c34f0c4189783599839b2bb6ad0b8d Mon Sep 17 00:00:00 2001 From: Matthieu Penant Date: Wed, 24 Mar 2021 14:13:02 -0400 Subject: [PATCH 3/8] Update vcpkg.json --- ports/zstd/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/zstd/vcpkg.json b/ports/zstd/vcpkg.json index 9b684abe1c1919..d6048adab77d4c 100644 --- a/ports/zstd/vcpkg.json +++ b/ports/zstd/vcpkg.json @@ -3,4 +3,4 @@ "version": "1.4.9", "description": "Zstandard - Fast real-time compression algorithm", "homepage": "https://facebook.github.io/zstd/" -} \ No newline at end of file +} From 31a05fcec0c7aebe806b9289cd91d1e142ca5c6f Mon Sep 17 00:00:00 2001 From: Matthieu Penant Date: Wed, 24 Mar 2021 14:19:30 -0400 Subject: [PATCH 4/8] Update vcpkg.json apply suggested diff file --- ports/zstd/vcpkg.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/zstd/vcpkg.json b/ports/zstd/vcpkg.json index d6048adab77d4c..6ac7d4b521b5e0 100644 --- a/ports/zstd/vcpkg.json +++ b/ports/zstd/vcpkg.json @@ -1,6 +1,6 @@ -{ - "name": "zstd", - "version": "1.4.9", - "description": "Zstandard - Fast real-time compression algorithm", - "homepage": "https://facebook.github.io/zstd/" -} +{ + "name": "zstd", + "version": "1.4.9", + "description": "Zstandard - Fast real-time compression algorithm", + "homepage": "https://facebook.github.io/zstd/" +} From 36e9051f0a77ebf24d01d536aaa2427815c72d9d Mon Sep 17 00:00:00 2001 From: Matthieu Penant Date: Thu, 25 Mar 2021 09:06:11 -0400 Subject: [PATCH 5/8] attempt to fix build errors (missing file libzstd?) --- ports/zstd/install_pkgpc.patch | 14 ++++++++++++++ ports/zstd/portfile.cmake | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 ports/zstd/install_pkgpc.patch diff --git a/ports/zstd/install_pkgpc.patch b/ports/zstd/install_pkgpc.patch new file mode 100644 index 00000000000000..61c8a956a5e371 --- /dev/null +++ b/ports/zstd/install_pkgpc.patch @@ -0,0 +1,14 @@ +diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt +index 179c9762..f86efdbc 100644 +--- a/build/cmake/lib/CMakeLists.txt ++++ b/build/cmake/lib/CMakeLists.txt +@@ -134,7 +134,7 @@ if (ZSTD_BUILD_STATIC) + OUTPUT_NAME ${STATIC_LIBRARY_BASE_NAME}) + endif () + +-if (UNIX OR MINGW) ++if (1) + # pkg-config + set(PREFIX "${CMAKE_INSTALL_PREFIX}") + set(EXEC_PREFIX "\${prefix}") + \ No newline at end of file diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index aaa1b91310137d..b95231ccc532cf 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -4,6 +4,8 @@ vcpkg_from_github( REF v1.4.9 SHA512 f529db9c094f9ae26428bf1fdfcc91c6d783d400980e0f0d802d2cf13c2be2931465ef568907e03841ff76a369a1447e7371f8799d8526edb9a513ba5c6db133 HEAD_REF dev + PATCHES + install_pkgpc.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") From 58f2894309dc5ba14435d5cff71d34f11139371f Mon Sep 17 00:00:00 2001 From: Matthieu Penant Date: Thu, 25 Mar 2021 12:57:31 -0400 Subject: [PATCH 6/8] Update zstd.json --- versions/z-/zstd.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/z-/zstd.json b/versions/z-/zstd.json index 794b55ec8ba728..4934113bd2d9c8 100644 --- a/versions/z-/zstd.json +++ b/versions/z-/zstd.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "f4b7636d762d5f457c899b07117d4fbd000d4911", + "git-tree": "5f89a95f50f573b8370f633f5c4d6fb0e83525fc", "version": "1.4.9", "port-version": 0 }, From 16a7c676b3ea45cd8f26788f66fb3043410fe081 Mon Sep 17 00:00:00 2001 From: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Date: Tue, 30 Mar 2021 08:57:45 +0800 Subject: [PATCH 7/8] Update portfile.cmake --- ports/zstd/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index b95231ccc532cf..656ee5714a7657 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -5,7 +5,7 @@ vcpkg_from_github( SHA512 f529db9c094f9ae26428bf1fdfcc91c6d783d400980e0f0d802d2cf13c2be2931465ef568907e03841ff76a369a1447e7371f8799d8526edb9a513ba5c6db133 HEAD_REF dev PATCHES - install_pkgpc.patch + install_pkgpc.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") From 720a5b847700bc68da7a373b2dbb927df72842c9 Mon Sep 17 00:00:00 2001 From: Matthieu Penant Date: Tue, 30 Mar 2021 08:51:15 -0400 Subject: [PATCH 8/8] fix version --- versions/z-/zstd.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/z-/zstd.json b/versions/z-/zstd.json index 4934113bd2d9c8..8e7a2ef0f65768 100644 --- a/versions/z-/zstd.json +++ b/versions/z-/zstd.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "5f89a95f50f573b8370f633f5c4d6fb0e83525fc", + "git-tree": "3a0ffa2a8fe8246a3937d9f6a77d577e351dd445", "version": "1.4.9", "port-version": 0 },