From e3de264082829f345e63dac9a55f373af6ea4564 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 10 Jul 2019 10:09:38 -0700 Subject: [PATCH 1/2] [liblzma] Patch headers to fix https://github.com/OpenTTD/OpenTTD/pull/7614 --- ports/liblzma/CONTROL | 2 +- ports/liblzma/portfile.cmake | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ports/liblzma/CONTROL b/ports/liblzma/CONTROL index 967b3b16c877ee..1148fbb52ac4ad 100644 --- a/ports/liblzma/CONTROL +++ b/ports/liblzma/CONTROL @@ -1,4 +1,4 @@ Source: liblzma -Version: 5.2.4-2 +Version: 5.2.4-3 Homepage: https://github.com/xz-mirror/xz Description: Compression library with an API similar to that of zlib. diff --git a/ports/liblzma/portfile.cmake b/ports/liblzma/portfile.cmake index e7260309ba7c46..8d0a2262816289 100644 --- a/ports/liblzma/portfile.cmake +++ b/ports/liblzma/portfile.cmake @@ -70,9 +70,13 @@ set(LZMA_FOUND TRUE CACHE BOOL \"\") set(LIBLZMA_FOUND TRUE CACHE BOOL \"\") ") -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(APPEND ${CURRENT_PACKAGES_DIR}/share/liblzma/LibLZMAConfig.cmake "add_definitions(-DLZMA_API_STATIC)") +file(READ ${CURRENT_PACKAGES_DIR}/include/lzma.h _contents) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(LZMA_API_STATIC)" "1" _contents "${_contents}") +else() + string(REPLACE "defined(LZMA_API_STATIC)" "0" _contents "${_contents}") endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/lzma.h "${_contents}") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) From 6d46e3a66f9fa0d62ef3132435994ba1990bb94e Mon Sep 17 00:00:00 2001 From: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com> Date: Mon, 29 Jun 2020 23:48:39 -0700 Subject: [PATCH 2/2] Bump the version in CONTROL file --- ports/liblzma/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/liblzma/CONTROL b/ports/liblzma/CONTROL index 465efb05472240..f770d15458e931 100644 --- a/ports/liblzma/CONTROL +++ b/ports/liblzma/CONTROL @@ -1,4 +1,4 @@ Source: liblzma -Version: 5.2.4-5 +Version: 5.2.4-6 Homepage: https://github.com/xz-mirror/xz Description: Compression library with an API similar to that of zlib.