* [liblzma] Patch headers to fix https://github.com/OpenTTD/OpenTTD/pull/7614

* Bump the version in CONTROL file

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
This commit is contained in:
Robert Schumacher 2020-07-29 15:57:24 -07:00 committed by GitHub
parent a2d3782198
commit b93fa7a1b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,5 @@
Source: liblzma
Version: 5.2.5
Port-Version: 1
Homepage: https://github.com/xz-mirror/xz
Description: Compression library with an API similar to that of zlib.

View File

@ -68,9 +68,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}")
if (VCPKG_BUILD_TYPE STREQUAL debug)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include)