diff options
| author | Alexander Karatarakis <alex@karatarakis.com> | 2018-08-14 14:21:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-14 14:21:55 -0700 |
| commit | d1853d9cc24cfe924c0e255fb4df7f763c8e83cf (patch) | |
| tree | d5565e04d378a14b04acb1e6a3a5c26fe8d5046f | |
| parent | e5616ee74de69e64890fcf50d910f6d8da101eaf (diff) | |
| parent | 61820777517d669e00fbdeb2368e156b66396b51 (diff) | |
| download | vcpkg-d1853d9cc24cfe924c0e255fb4df7f763c8e83cf.tar.gz vcpkg-d1853d9cc24cfe924c0e255fb4df7f763c8e83cf.zip | |
Merge pull request #3907 from aybe/liblzma-uwp
[liblzma] Enabled UWP builds
| -rw-r--r-- | ports/liblzma/enable-uwp-builds.patch | 26 | ||||
| -rw-r--r-- | ports/liblzma/portfile.cmake | 9 |
2 files changed, 31 insertions, 4 deletions
diff --git a/ports/liblzma/enable-uwp-builds.patch b/ports/liblzma/enable-uwp-builds.patch new file mode 100644 index 000000000..4551ce7b5 --- /dev/null +++ b/ports/liblzma/enable-uwp-builds.patch @@ -0,0 +1,26 @@ +diff --git a/src/common/tuklib_physmem.c b/src/common/tuklib_physmem.c
+index 4053ad0..c49db6d 100644
+--- a/src/common/tuklib_physmem.c
++++ b/src/common/tuklib_physmem.c
+@@ -79,6 +79,13 @@ tuklib_physmem(void)
+ uint64_t ret = 0;
+
+ #if defined(_WIN32) || defined(__CYGWIN__)
++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
++ MEMORYSTATUSEX ms;
++ ms.dwLength = sizeof(ms);
++ if(!GlobalMemoryStatusEx(&ms))
++ return 0;
++ return ms.ullTotalPhys;
++#else
+ if ((GetVersion() & 0xFF) >= 5) {
+ // Windows 2000 and later have GlobalMemoryStatusEx() which
+ // supports reporting values greater than 4 GiB. To keep the
+@@ -107,6 +114,7 @@ tuklib_physmem(void)
+ GlobalMemoryStatus(&meminfo);
+ ret = meminfo.dwTotalPhys;
+ }
++#endif
+
+ #elif defined(__OS2__)
+ unsigned long mem;
diff --git a/ports/liblzma/portfile.cmake b/ports/liblzma/portfile.cmake index 81c43a0f8..f6b037c43 100644 --- a/ports/liblzma/portfile.cmake +++ b/ports/liblzma/portfile.cmake @@ -1,7 +1,3 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() - include(vcpkg_common_functions) vcpkg_from_github( @@ -12,6 +8,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/v5.2.3-b3437cea7b + PATCHES "${CMAKE_CURRENT_LIST_DIR}/enable-uwp-builds.patch" +) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( |
