Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[liblzma] Patch headers to fix https:/OpenTTD/OpenTTD/pull/7614 #7226

Merged
merged 5 commits into from
Jul 29, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/liblzma/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: liblzma
Version: 5.2.4-5
Version: 5.2.4-6
Homepage: https:/xz-mirror/xz
Description: Compression library with an API similar to that of zlib.
8 changes: 6 additions & 2 deletions ports/liblzma/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down