diff --git a/ports/proj4/disable-projdb-with-arm-uwp.patch b/ports/proj4/disable-projdb-with-arm-uwp.patch deleted file mode 100644 index 411a398608..0000000000 --- a/ports/proj4/disable-projdb-with-arm-uwp.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7d736d129..93d7801dd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -269,7 +269,9 @@ endif() - ################################################################################ - include_directories(${PROJ_SOURCE_DIR}/src) - --add_subdirectory(data) -+if(BUILD_PROJ_DATABASE) -+ add_subdirectory(data) -+endif() - add_subdirectory(include) - add_subdirectory(src) - add_subdirectory(man) diff --git a/ports/proj4/fix-filemanager-uwp.patch b/ports/proj4/fix-filemanager-uwp.patch new file mode 100644 index 0000000000..14dba72c29 --- /dev/null +++ b/ports/proj4/fix-filemanager-uwp.patch @@ -0,0 +1,71 @@ +diff --git a/src/filemanager.cpp b/src/filemanager.cpp +index e6a9ed9..d85290b 100644 +--- a/src/filemanager.cpp ++++ b/src/filemanager.cpp +@@ -48,6 +48,12 @@ + + #include "proj_config.h" + ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) ++#define UWP 1 ++#else ++#define UWP 0 ++#endif ++ + #ifdef _WIN32 + #include + #include +@@ -692,10 +698,21 @@ std::unique_ptr FileWin32::open(PJ_CONTEXT *ctx, const char *filename, + ? FILE_ATTRIBUTE_READONLY + : FILE_ATTRIBUTE_NORMAL; + try { ++#if UWP ++ CREATEFILE2_EXTENDED_PARAMETERS extendedParameters; ++ ZeroMemory(&extendedParameters, sizeof(extendedParameters)); ++ extendedParameters.dwSize = sizeof(extendedParameters); ++ extendedParameters.dwFileAttributes = dwFlagsAndAttributes; ++ HANDLE hFile = CreateFile2( ++ UTF8ToWString(std::string(filename)).c_str(), dwDesiredAccess, ++ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, ++ dwCreationDisposition, &extendedParameters); ++#else // UWP + HANDLE hFile = CreateFileW( + UTF8ToWString(std::string(filename)).c_str(), dwDesiredAccess, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, nullptr, + dwCreationDisposition, dwFlagsAndAttributes, nullptr); ++#endif // UWP + return std::unique_ptr(hFile != INVALID_HANDLE_VALUE + ? new FileWin32(filename, ctx, hFile) + : nullptr); +@@ -1211,6 +1228,9 @@ const char *proj_context_get_user_writable_directory(PJ_CONTEXT *ctx, + wPath.resize(wcslen(wPath.data())); + path = NS_PROJ::WStringToUTF8(wPath); + #else ++#if UWP ++ if (false) { ++#else // UWP + wchar_t *wPath; + if (SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, nullptr, &wPath) == + S_OK) { +@@ -1218,6 +1238,7 @@ const char *proj_context_get_user_writable_directory(PJ_CONTEXT *ctx, + std::string str = NS_PROJ::WStringToUTF8(ws); + path = str; + CoTaskMemFree(wPath); ++#endif // UWP + #endif + } else { + const char *local_app_data = getenv("LOCALAPPDATA"); +@@ -1311,11 +1332,13 @@ static std::string pj_get_relative_share_proj_internal_no_check() { + #if defined(_WIN32) || defined(HAVE_LIBDL) + #ifdef _WIN32 + HMODULE hm = NULL; ++#if !UWP + if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | + GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, + (LPCSTR)&pj_get_relative_share_proj, &hm) == 0) { + return std::string(); + } ++#endif // UWP + + DWORD path_size = 1024; + diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake index c19e07b076..34fb1fd028 100644 --- a/ports/proj4/portfile.cmake +++ b/ports/proj4/portfile.cmake @@ -5,8 +5,8 @@ vcpkg_from_github( SHA512 e6e77266dcd70c939c16667c916cccab8de161221d2ef600cfca43382f50da2dc8d790561556b4416adbb4ac6fba939004e0cc936c278e0e808dc3566e9a70d4 HEAD_REF master PATCHES + fix-filemanager-uwp.patch fix-sqlite3-bin.patch - disable-projdb-with-arm-uwp.patch fix-win-output-name.patch fix-proj4-targets-cmake.patch tools-cmake.patch diff --git a/ports/proj4/vcpkg.json b/ports/proj4/vcpkg.json index 770896f9c5..b2d12fc001 100644 --- a/ports/proj4/vcpkg.json +++ b/ports/proj4/vcpkg.json @@ -1,7 +1,7 @@ { "name": "proj4", "version-semver": "7.2.1", - "port-version": 4, + "port-version": 5, "description": "PROJ.4 library for cartographic projections", "homepage": "https://github.com/OSGeo/PROJ", "dependencies": [ diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 0affebdd8e..eb7e7226d3 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -546,6 +546,8 @@ libcopp:arm64-windows=fail libcopp:arm-uwp=fail libcrafter:x86-windows=fail libcrafter:x64-windows=fail +libgeotiff:arm-uwp=fail +libgeotiff:x64-uwp=fail # Missing system libraries on linux to run/prepare autoconf libgpod:x64-linux=fail libgpod:x64-osx=fail @@ -1235,8 +1237,6 @@ popsift:x64-windows-static-md=fail portable-snippets:arm-uwp=fail pqp:arm-uwp=fail pqp:x64-uwp=fail -proj4:arm-uwp=fail -proj4:x64-uwp=fail protobuf-c:x86-windows=fail protobuf-c:x64-windows=fail protobuf-c:x64-windows-static=fail diff --git a/versions/baseline.json b/versions/baseline.json index 5035b32a7d..0f86cbcb51 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5134,7 +5134,7 @@ }, "proj4": { "baseline": "7.2.1", - "port-version": 4 + "port-version": 5 }, "prometheus-cpp": { "baseline": "0.12.3", diff --git a/versions/p-/proj4.json b/versions/p-/proj4.json index 077e213aa2..1c72aae292 100644 --- a/versions/p-/proj4.json +++ b/versions/p-/proj4.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "aa22133ae2355b540a2676402896abc323f26aa9", + "version-semver": "7.2.1", + "port-version": 5 + }, { "git-tree": "dee626b6811eafe58cf40fbceeb3cc28dfaf678c", "version-semver": "7.2.1",