Skip to content

Commit

Permalink
[liblzma] Update to 5.4.0 (microsoft#28250)
Browse files Browse the repository at this point in the history
* [liblzma] Update to 5.2.9

* Update to 5.4.0
  • Loading branch information
dg0yt authored Jan 5, 2023
1 parent 35ca0b2 commit e9e1c40
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 55 deletions.
9 changes: 3 additions & 6 deletions ports/liblzma/add_support_ios.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 52439b3..0b5e371 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -526,6 +526,7 @@ if(HAVE_GETOPT_LONG)
@@ -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)
@@ -653,6 +654,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG)
@@ -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)

install(FILES src/xz/xz.1
--
2.30.1 (Apple Git-130)

if(UNIX)
14 changes: 8 additions & 6 deletions ports/liblzma/build-tools.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cddbccb..63c8f3d 100644
index 03b8301..820d08e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -492,6 +492,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblzmaConfig.cmake"
@@ -584,6 +584,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config.cmake"
COMPONENT liblzma_Development)


+if(BUILD_TOOLS)
#############################################################################
# getopt_long
#############################################################################
@@ -663,3 +664,4 @@ if(NOT MSVC AND HAVE_GETOPT_LONG)
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
COMPONENT xz)
@@ -793,6 +794,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG)
endforeach()
endif()
endif()
+endif()
\ No newline at end of file


#############################################################################
26 changes: 0 additions & 26 deletions ports/liblzma/enable-uwp-builds.patch

This file was deleted.

6 changes: 3 additions & 3 deletions ports/liblzma/fix_config_include.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 34c6aca00..7b3708ab2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -401,6 +401,7 @@ if(WIN32)
@@ -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)

# Export the public API symbols with __declspec(dllexport).
target_compile_definitions(liblzma PRIVATE DLL_EXPORT)
set_target_properties(liblzma PROPERTIES
LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
17 changes: 11 additions & 6 deletions ports/liblzma/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
vcpkg_from_github(
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
vcpkg_from_sourceforge(
OUT_SOURCE_PATH SOURCE_PATH
REPO xz-mirror/xz
REF v5.2.5
SHA512 686f01cfe33e2194766a856c48668c661b25eee194a443524f87ce3f866e0eb54914075b4e00185921516c5211db8cd5d2658f4b91f4a3580508656f776f468e
HEAD_REF master
REPO lzmautils
FILENAME "xz-${VERSION}.tar.xz"
SHA512 0ef70c8803d86b731fa55bc017401609a4c2ee34244c1e561075941571c4954905b9fd65f40daf00043fc9aca7712fa8407a66d5e0097eaa834718c41dc518d5
PATCHES
enable-uwp-builds.patch
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
Expand All @@ -20,6 +19,12 @@ vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DBUILD_TESTING=OFF
-DCREATE_XZ_SYMLINKS=OFF
-DCREATE_LZMA_SYMLINKS=OFF
MAYBE_UNUSED_VARIABLES
CREATE_XZ_SYMLINKS
CREATE_LZMA_SYMLINKS
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
Expand Down
5 changes: 2 additions & 3 deletions ports/liblzma/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"name": "liblzma",
"version-semver": "5.2.5",
"port-version": 6,
"version-semver": "5.4.0",
"description": "Compression library with an API similar to that of zlib.",
"homepage": "https://github.com/xz-mirror/xz",
"homepage": "https://tukaani.org/xz/",
"license": null,
"dependencies": [
{
Expand Down
6 changes: 3 additions & 3 deletions ports/liblzma/win_output_name.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index e80b524..cddbccb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -429,8 +429,11 @@ set_target_properties(liblzma PROPERTIES
@@ -462,8 +462,11 @@ 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.
Expand All @@ -13,5 +13,5 @@ index e80b524..cddbccb 100644
+ set_target_properties(liblzma PROPERTIES RUNTIME_OUTPUT_NAME liblzma)
+endif()

# Create liblzmaConfigVersion.cmake.
#
# Create liblzma-config-version.cmake. We use this spelling instead of
# liblzmaConfig.cmake to make find_package work in case insensitive manner
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3981,8 +3981,8 @@
"port-version": 1
},
"liblzma": {
"baseline": "5.2.5",
"port-version": 6
"baseline": "5.4.0",
"port-version": 0
},
"libmad": {
"baseline": "0.15.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/liblzma.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7f68b43357432668f87f545cf20d141f0ee2724b",
"version-semver": "5.4.0",
"port-version": 0
},
{
"git-tree": "96b6aac6211ad3fd3da29508a519c3cd5f09716d",
"version-semver": "5.2.5",
Expand Down

0 comments on commit e9e1c40

Please sign in to comment.