Skip to content

Commit

Permalink
[poco] Fix mingw compilation (#42330)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTolstoyevski authored Nov 25, 2024
1 parent 2bf7865 commit 242ad16
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 1 deletion.
38 changes: 38 additions & 0 deletions ports/poco/0008-fix-mingw-compilation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
index 41ba99936..b3986690f 100644
--- a/Foundation/CMakeLists.txt
+++ b/Foundation/CMakeLists.txt
@@ -189,7 +189,6 @@ if(MINGW)
_WIN32
MINGW32
WINVER=0x500
- ODBCVER=0x0300
POCO_THREAD_STACK_SIZE
)
endif()
diff --git a/Foundation/include/Poco/Platform.h b/Foundation/include/Poco/Platform.h
index 7a4e7e2fb..8caa6de06 100644
--- a/Foundation/include/Poco/Platform.h
+++ b/Foundation/include/Poco/Platform.h
@@ -244,6 +244,9 @@
#define POCO_NO_FPENVIRONMENT
#endif

+#if defined (__MINGW32__) || defined (__MINGW64__)
+ #define POCO_COMPILER_MINGW
+#endif

#if defined(__clang__)
#define POCO_COMPILER_CLANG
@@ -253,11 +256,6 @@
#elif defined (__GNUC__)
#define POCO_COMPILER_GCC
#define POCO_HAVE_CXXABI_H
- #if defined (__MINGW32__) || defined (__MINGW64__)
- #define POCO_COMPILER_MINGW
- #endif
-#elif defined (__MINGW32__) || defined (__MINGW64__)
- #define POCO_COMPILER_MINGW
#elif defined (__INTEL_COMPILER) || defined(__ICC) || defined(__ECC) || defined(__ICL)
#define POCO_COMPILER_INTEL
#elif defined (__SUNPRO_CC)
2 changes: 2 additions & 0 deletions ports/poco/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ vcpkg_from_github(
0004-fix-feature-sqlite3.patch
0005-fix-error-c3861.patch
0007-find-pcre2.patch
# MSYS2 repo was used as a source. Thanks MSYS2 team: https://github.com/msys2/MINGW-packages/blob/6e7fba42b7f50e1111b7c0ef50048832243b0ac4/mingw-w64-poco/001-fix-build-on-mingw.patch
0008-fix-mingw-compilation.patch
)

file(REMOVE "${SOURCE_PATH}/Foundation/src/pcre2.h")
Expand Down
1 change: 1 addition & 0 deletions ports/poco/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "poco",
"version": "1.13.3",
"port-version": 1,
"description": "Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems.",
"homepage": "https://github.com/pocoproject/poco",
"license": "BSL-1.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7106,7 +7106,7 @@
},
"poco": {
"baseline": "1.13.3",
"port-version": 0
"port-version": 1
},
"podofo": {
"baseline": "0.10.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/poco.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "431894de75b90a806a64bcb289b6ad81d5c98a4c",
"version": "1.13.3",
"port-version": 1
},
{
"git-tree": "161e940e8c25d09dd731462771d84cbe78743643",
"version": "1.13.3",
Expand Down

0 comments on commit 242ad16

Please sign in to comment.