From 9e80334e7ce1ed8f561ed0ff0890396954921dc5 Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Tue, 18 Jun 2024 22:34:27 +0300 Subject: [PATCH] [liblzma] Update to version 5.6.2. (#39024) --- ports/liblzma/add_support_ios.patch | 20 -------------------- ports/liblzma/build-tools.patch | 19 +++++++++---------- ports/liblzma/fix_config_include.patch | 12 ------------ ports/liblzma/portfile.cmake | 10 +++++----- ports/liblzma/vcpkg.json | 5 ++--- ports/liblzma/win_output_name.patch | 10 ++++++---- versions/baseline.json | 2 +- versions/l-/liblzma.json | 5 +++++ 8 files changed, 28 insertions(+), 55 deletions(-) delete mode 100644 ports/liblzma/add_support_ios.patch delete mode 100644 ports/liblzma/fix_config_include.patch diff --git a/ports/liblzma/add_support_ios.patch b/ports/liblzma/add_support_ios.patch deleted file mode 100644 index 79741639b6..0000000000 --- a/ports/liblzma/add_support_ios.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 52439b3..0b5e371 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -574,6 +574,7 @@ if(HAVE_GETOPT_LONG) - - install(TARGETS xzdec - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" -+ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" - COMPONENT xzdec) - - if(UNIX) -@@ -701,6 +702,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG) - - install(TARGETS xz - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" -+ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" - COMPONENT xz) - - if(UNIX) diff --git a/ports/liblzma/build-tools.patch b/ports/liblzma/build-tools.patch index 759345ef23..12926a9358 100644 --- a/ports/liblzma/build-tools.patch +++ b/ports/liblzma/build-tools.patch @@ -1,20 +1,19 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 03b8301..820d08e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -584,6 +584,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config.cmake" - COMPONENT liblzma_Development) - +@@ -1484,7 +1484,7 @@ function(my_install_man COMPONENT SRC_FILE LINK_NAMES) + endif() + endfunction() +- +if(BUILD_TOOLS) ############################################################################# - # getopt_long + # libgnu (getopt_long) ############################################################################# -@@ -793,6 +794,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG) - endforeach() - endif() +@@ -1982,6 +1982,7 @@ if(UNIX) + my_install_man(scripts_Documentation src/scripts/xzless.1 "${XZLESS_LINKS}") endif() + +endif() - ############################################################################# + # Documentation diff --git a/ports/liblzma/fix_config_include.patch b/ports/liblzma/fix_config_include.patch deleted file mode 100644 index 91dc4c13ba..0000000000 --- a/ports/liblzma/fix_config_include.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 34c6aca00..7b3708ab2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -413,6 +413,7 @@ if(WIN32) - if(BUILD_SHARED_LIBS) - # Add the Windows resource file for liblzma.dll. - target_sources(liblzma PRIVATE src/liblzma/liblzma_w32res.rc) -+ target_include_directories(liblzma PRIVATE windows/vs2019) - - set_target_properties(liblzma PROPERTIES - LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc" diff --git a/ports/liblzma/portfile.cmake b/ports/liblzma/portfile.cmake index 0fdc38dfff..1bd72943ac 100644 --- a/ports/liblzma/portfile.cmake +++ b/ports/liblzma/portfile.cmake @@ -2,12 +2,10 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tukaani-project/xz REF "v${VERSION}" - SHA512 c28461123562564e030f3f733f078bc4c840e87598d9f4b718d4bca639120d8133f969c45d7bdc62f33f081d789ec0f14a1791fb7da18515682bfe3c0c7362e0 + SHA512 ec708bcddc64285b0c36b89c9e6413994af4c15bb6865a7bc243a048ce86afccd0df88d46d55aa23fb8071d137dcc19cf357117adc92f030919540f8993cacf9 HEAD_REF master PATCHES - fix_config_include.patch win_output_name.patch # Fix output name on Windows. Autotool build does not generate lib prefixed libraries on windows. - add_support_ios.patch # add install bundle info for support ios build-tools.patch ) @@ -29,10 +27,12 @@ vcpkg_cmake_configure( -DCREATE_XZ_SYMLINKS=OFF -DCREATE_LZMA_SYMLINKS=OFF -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT= # using flags from (vcpkg) toolchain + -DENABLE_NLS=OFF # nls is not supported by this port, yet MAYBE_UNUSED_VARIABLES CMAKE_MSVC_DEBUG_INFORMATION_FORMAT CREATE_XZ_SYMLINKS CREATE_LZMA_SYMLINKS + ENABLE_NLS ) vcpkg_cmake_install() vcpkg_copy_pdbs() @@ -41,7 +41,7 @@ set(exec_prefix "\${prefix}") set(libdir "\${prefix}/lib") set(includedir "\${prefix}/include") set(PACKAGE_URL https://tukaani.org/xz/) -set(PACKAGE_VERSION 5.4.3) +set(PACKAGE_VERSION "${VERSION}") if(NOT VCPKG_TARGET_IS_WINDOWS) set(PTHREAD_CFLAGS -pthread) endif() @@ -67,7 +67,7 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/man" ) -set(TOOLS xz xzdec) +set(TOOLS xz xzdec lzmadec lzmainfo) foreach(_tool IN LISTS TOOLS) if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/bin/${_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") list(REMOVE_ITEM TOOLS ${_tool}) diff --git a/ports/liblzma/vcpkg.json b/ports/liblzma/vcpkg.json index e9168357cc..364220e1c1 100644 --- a/ports/liblzma/vcpkg.json +++ b/ports/liblzma/vcpkg.json @@ -1,6 +1,6 @@ { "name": "liblzma", - "version": "5.4.4", + "version": "5.6.2", "description": "Compression library with an API similar to that of zlib.", "homepage": "https://tukaani.org/xz/", "license": null, @@ -16,8 +16,7 @@ ], "features": { "tools": { - "description": "Build tools", - "supports": "!windows, mingw" + "description": "Build tools" } } } diff --git a/ports/liblzma/win_output_name.patch b/ports/liblzma/win_output_name.patch index 9a845bdbae..91e155ac4e 100644 --- a/ports/liblzma/win_output_name.patch +++ b/ports/liblzma/win_output_name.patch @@ -1,17 +1,19 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0c6d4b7..62a824a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -868,8 +868,11 @@ set_target_properties(liblzma PROPERTIES +@@ -1273,10 +1273,14 @@ set_target_properties(liblzma PROPERTIES # It's liblzma.so or liblzma.dll, not libliblzma.so or lzma.dll. # Avoid the name lzma.dll because it would conflict with LZMA SDK. - PREFIX "" +- IMPORT_PREFIX "" + OUTPUT_NAME lzma ) + +if(WIN32 AND NOT MINGW) + set_target_properties(liblzma PROPERTIES RUNTIME_OUTPUT_NAME liblzma) +endif() - ++ ++ # Create liblzma-config-version.cmake. # + # FIXME: SameMajorVersion is correct for stable releases but it is wrong diff --git a/versions/baseline.json b/versions/baseline.json index e357bc2800..88bce0c748 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4633,7 +4633,7 @@ "port-version": 1 }, "liblzma": { - "baseline": "5.4.4", + "baseline": "5.6.2", "port-version": 0 }, "libmad": { diff --git a/versions/l-/liblzma.json b/versions/l-/liblzma.json index 4a245513ff..0cdcc63197 100644 --- a/versions/l-/liblzma.json +++ b/versions/l-/liblzma.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5d13d80adafad99c23899a3f7b60b32c2dae1e43", + "version": "5.6.2", + "port-version": 0 + }, { "git-tree": "b362003b452b95b7fef8577175651a7e33940f7f", "version": "5.6.0",