Skip to content

Commit

Permalink
[liblzma] Patch headers to fix OpenTTD/OpenTTD#7614
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0219-msft committed Aug 24, 2019
1 parent f97f927 commit e3de264
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
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-2
Version: 5.2.4-3
Homepage: https://github.com/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 @@ -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)

Expand Down

0 comments on commit e3de264

Please sign in to comment.