diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2020-07-29 15:57:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-29 15:57:24 -0700 |
| commit | b93fa7a1b44a9290b9bdbb8ee7419cbda6fc20fa (patch) | |
| tree | 59deb11e4e18e4abd7491895bff2c4560eadf7f5 | |
| parent | a2d3782198a715a3ded943a86d9dd8f7ff95abf7 (diff) | |
| download | vcpkg-b93fa7a1b44a9290b9bdbb8ee7419cbda6fc20fa.tar.gz vcpkg-b93fa7a1b44a9290b9bdbb8ee7419cbda6fc20fa.zip | |
[liblzma] Patch headers to fix https://github.com/OpenTTD/OpenTTD/pull/7614 (#7226)
* [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>
| -rw-r--r-- | ports/liblzma/CONTROL | 1 | ||||
| -rw-r--r-- | ports/liblzma/portfile.cmake | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ports/liblzma/CONTROL b/ports/liblzma/CONTROL index e95b13c3c..dc9d0fda8 100644 --- a/ports/liblzma/CONTROL +++ b/ports/liblzma/CONTROL @@ -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. diff --git a/ports/liblzma/portfile.cmake b/ports/liblzma/portfile.cmake index acc0dbaaa..c29dbafed 100644 --- a/ports/liblzma/portfile.cmake +++ b/ports/liblzma/portfile.cmake @@ -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) |
