Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[poco] update to 1.12.4 #27288

Merged
merged 14 commits into from
Oct 31, 2022
28 changes: 28 additions & 0 deletions ports/poco/0001-static-pcre.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
index f504bc1..226dadb 100644
--- a/Foundation/CMakeLists.txt
+++ b/Foundation/CMakeLists.txt
@@ -109,6 +109,23 @@ set_target_properties(Foundation
if(POCO_UNBUNDLED)
target_link_libraries(Foundation PUBLIC Pcre2::Pcre2 ZLIB::ZLIB)
target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED)
+ add_definitions(
+ -D_pcre2_utf8_table1=_poco_pcre2_utf8_table1
+ -D_pcre2_utf8_table1_size=_poco_pcre2_utf8_table1_size
+ -D_pcre2_utf8_table2=_poco_pcre2_utf8_table2
+ -D_pcre2_utf8_table3=_poco_pcre2_utf8_table3
+ -D_pcre2_utf8_table4=_poco_pcre2_utf8_table4
+ -D_pcre2_OP_lengths_8=_poco_pcre2_OP_lengths_8
+ -D_pcre2_callout_end_delims_8=_poco_pcre2_callout_end_delims_8
+ -D_pcre2_callout_start_delims_8=_poco_pcre2_callout_start_delims_8
+ -D_pcre2_hspace_list_8=_poco_pcre2_hspace_list_8
+ -D_pcre2_vspace_list_8=_poco_pcre2_vspace_list_8
+ -D_pcre2_ucp_gbtable_8=_poco_pcre2_ucp_gbtable_8
+ -D_pcre2_ucp_gentype_8=_poco_pcre2_ucp_gentype_8
+ -D_pcre2_utt_8=_poco_pcre2_utt_8
+ -D_pcre2_utt_names_8=_poco_pcre2_utt_names_8
+ -D_pcre2_utt_size_8=_poco_pcre2_utt_size_8
+ )
Comment on lines +9 to +25
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this to modify target Foundation? add_definitions acts globally, but IIUC only to target created after the command.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds definitions to the compiler command line for targets in the current directory, whether added before or after this command is invoked, and for the ones in sub-directories added after
https://cmake.org/cmake/help/latest/command/add_definitions.html

It only affects the current and child tress, so should be equivalent to a target_compile_definitions.

endif(POCO_UNBUNDLED)

target_include_directories(Foundation
98 changes: 49 additions & 49 deletions ports/poco/arm64_pcre.patch → ports/poco/0002-arm64-pcre.patch
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
diff --git a/Foundation/src/EventLogChannel.cpp b/Foundation/src/EventLogChannel.cpp
index 1f51296..c67b71b 100644
--- a/Foundation/src/EventLogChannel.cpp
+++ b/Foundation/src/EventLogChannel.cpp
@@ -11,6 +11,7 @@
// SPDX-License-Identifier: BSL-1.0
//
+#pragma comment(lib,"advapi32.lib")
#include "Poco/EventLogChannel.h"
#include "Poco/Message.h"
diff --git a/Foundation/src/utils.h b/Foundation/src/utils.h
index 0a222c7..0843315 100644
--- a/Foundation/src/utils.h
+++ b/Foundation/src/utils.h
@@ -91,7 +91,7 @@ int main(int argc, char** argv) {
//
// If it prints "correct" then the architecture should be here, in the "correct" section.
#if defined(_M_X64) || defined(__x86_64__) || \
- defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \
+ defined(__ARMEL__) || defined(_M_ARM) || defined(__arm__) || defined(__arm64__) || defined(_M_ARM64) || \
defined(__hppa__) || defined(__ia64__) || \
defined(__mips__) || \
defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
diff --git a/Net/src/Net.cpp b/Net/src/Net.cpp
index 1a75379..b4081fd 100644
--- a/Net/src/Net.cpp
+++ b/Net/src/Net.cpp
@@ -11,6 +11,7 @@
// SPDX-License-Identifier: BSL-1.0
//
+#pragma comment(lib,"advapi32.lib")
#include "Poco/Net/Net.h"
diff --git a/Util/src/WinRegistryKey.cpp b/Util/src/WinRegistryKey.cpp
index 7fd1a28..a07c5d2 100644
--- a/Util/src/WinRegistryKey.cpp
+++ b/Util/src/WinRegistryKey.cpp
@@ -11,6 +11,7 @@
// SPDX-License-Identifier: BSL-1.0
//
+#pragma comment(lib,"advapi32.lib")
#include "Poco/Util/WinRegistryKey.h"
#include "Poco/Exception.h"
diff --git a/Foundation/src/EventLogChannel.cpp b/Foundation/src/EventLogChannel.cpp
index f9a9fb1..b032f9d 100644
--- a/Foundation/src/EventLogChannel.cpp
+++ b/Foundation/src/EventLogChannel.cpp
@@ -11,6 +11,7 @@
// SPDX-License-Identifier: BSL-1.0
//

+#pragma comment(lib,"advapi32.lib")

#include "Poco/EventLogChannel.h"
#include "Poco/Message.h"
diff --git a/Foundation/src/utils.h b/Foundation/src/utils.h
index c9b6c00..710c199 100644
--- a/Foundation/src/utils.h
+++ b/Foundation/src/utils.h
@@ -129,7 +129,7 @@ int main(int argc, char** argv) {
//
// If it prints "correct" then the architecture should be here, in the "correct" section.
#if defined(_M_X64) || defined(__x86_64__) || \
- defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \
+ defined(__ARMEL__) || defined(_M_ARM) || defined(__arm__) || defined(__arm64__) || defined(_M_ARM64) || \
defined(__hppa__) || defined(__ia64__) || \
defined(__mips__) || \
defined(__loongarch__) || \
diff --git a/Net/src/Net.cpp b/Net/src/Net.cpp
index 1a75379..b4081fd 100644
--- a/Net/src/Net.cpp
+++ b/Net/src/Net.cpp
@@ -11,6 +11,7 @@
// SPDX-License-Identifier: BSL-1.0
//

+#pragma comment(lib,"advapi32.lib")

#include "Poco/Net/Net.h"

diff --git a/Util/src/WinRegistryKey.cpp b/Util/src/WinRegistryKey.cpp
index 7fd1a28..a07c5d2 100644
--- a/Util/src/WinRegistryKey.cpp
+++ b/Util/src/WinRegistryKey.cpp
@@ -11,6 +11,7 @@
// SPDX-License-Identifier: BSL-1.0
//

+#pragma comment(lib,"advapi32.lib")

#include "Poco/Util/WinRegistryKey.h"
#include "Poco/Exception.h"
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e05272..44dd7cb 100644
index c552091..f05f50c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,8 +82,6 @@ option(FORCE_OPENSSL "Force usage of OpenSSL even under windows" OFF)
@@ -90,8 +90,6 @@ option(FORCE_OPENSSL "Force usage of OpenSSL even under windows" OFF)

if(ENABLE_CRYPTO OR ENABLE_NETSSL OR ENABLE_JWT)
find_package(OpenSSL REQUIRED)
Expand All @@ -11,15 +11,13 @@ index 4e05272..44dd7cb 100644
endif()

if(OPENSSL_FOUND)
@@ -113,24 +111,19 @@ else()
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" OFF)
endif()
@@ -123,22 +121,20 @@ endif()

-if(ENABLE_DATA_MYSQL)
- find_package(MySQL REQUIRED)
if(ENABLE_DATA_MYSQL)
find_package(MySQL REQUIRED)
-else()
- find_package(MySQL)
-endif()
endif()
+option(ENABLE_DATA "Enable Data" OFF)
+option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" OFF)

Expand All @@ -44,7 +42,7 @@ index 4e05272..44dd7cb 100644
endif()

if(PostgreSQL_FOUND)
@@ -207,6 +200,9 @@ include(DefinePlatformSpecifc)
@@ -223,6 +219,9 @@ include(DefinePlatformSpecifc)
# Collect the built libraries and include dirs, the will be used to create the PocoConfig.cmake file
set(Poco_COMPONENTS "")

Expand All @@ -54,8 +52,8 @@ index 4e05272..44dd7cb 100644
if(ENABLE_TESTS)
add_subdirectory(CppUnit)
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
@@ -339,8 +335,11 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS)
list(APPEND Poco_COMPONENTS "Redis")
@@ -351,8 +350,11 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/Prometheus AND ENABLE_PROMETHEUS)
list(APPEND Poco_COMPONENTS "Prometheus")
endif()

-if(EXISTS ${PROJECT_SOURCE_DIR}/PDF AND ENABLE_PDF)
Expand All @@ -68,12 +66,12 @@ index 4e05272..44dd7cb 100644
list(APPEND Poco_COMPONENTS "PDF")
endif()

@@ -478,15 +477,6 @@ install(
@@ -492,15 +494,6 @@ install(
Devel
)

-if(POCO_UNBUNDLED)
- install(FILES cmake/FindPCRE.cmake
- install(FILES cmake/FindPCRE2.cmake
- DESTINATION "${PocoConfigPackageLocation}")
- install(FILES cmake/V39/FindEXPAT.cmake
- DESTINATION "${PocoConfigPackageLocation}/V39")
Expand All @@ -85,7 +83,7 @@ index 4e05272..44dd7cb 100644
message(STATUS "${PROJECT_NAME} package version: ${PROJECT_VERSION}")
if(BUILD_SHARED_LIBS)
diff --git a/Data/CMakeLists.txt b/Data/CMakeLists.txt
index 7d1e99e..9d0a85c 100644
index 0772af6..692fd2f 100644
--- a/Data/CMakeLists.txt
+++ b/Data/CMakeLists.txt
@@ -45,7 +45,7 @@ else(ENABLE_DATA_SQLITE)
Expand All @@ -98,11 +96,15 @@ index 7d1e99e..9d0a85c 100644
add_subdirectory(MySQL)
else()
diff --git a/Data/MySQL/CMakeLists.txt b/Data/MySQL/CMakeLists.txt
index f71b145..7034974 100644
index ce411cf..2791523 100644
--- a/Data/MySQL/CMakeLists.txt
+++ b/Data/MySQL/CMakeLists.txt
@@ -21,7 +21,7 @@ set_target_properties(DataMySQL
DEFINE_SYMBOL MySQL_EXPORTS
@@ -18,10 +18,10 @@ set_target_properties(DataMySQL
PROPERTIES
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
OUTPUT_NAME PocoDataMySQL
- DEFINE_SYMBOL MySQL_EXPORTS
+ DEFINE_SYMBOL MySQL_EXPORT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what this change is doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like an accident. I'll revert

)

-target_link_libraries(DataMySQL PUBLIC Poco::Data MySQL::client)
Expand All @@ -111,7 +113,7 @@ index f71b145..7034974 100644
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
diff --git a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h b/Data/MySQL/include/Poco/Data/MySQL/MySQL.h
index 6ddcd39..9e50803 100644
index 2386590..81b2c8e 100644
--- a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h
+++ b/Data/MySQL/include/Poco/Data/MySQL/MySQL.h
@@ -57,8 +57,6 @@
Expand All @@ -124,7 +126,7 @@ index 6ddcd39..9e50803 100644
#endif

diff --git a/Data/SQLite/CMakeLists.txt b/Data/SQLite/CMakeLists.txt
index b52e2c5..0dcfae2 100644
index 3a176d7..d8055cb 100644
--- a/Data/SQLite/CMakeLists.txt
+++ b/Data/SQLite/CMakeLists.txt
@@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h")
Expand All @@ -141,67 +143,10 @@ index b52e2c5..0dcfae2 100644

if(POCO_UNBUNDLED)
- target_link_libraries(DataSQLite PUBLIC SQLite::SQLite3)
+ target_link_libraries(DataSQLite PUBLIC unofficial::sqlite3::sqlite3)
+ target_link_libraries(DataSQLite PUBLIC unofficial::sqlite3::sqlite3)
target_compile_definitions(DataSQLite PUBLIC
POCO_UNBUNDLED
SQLITE_THREADSAFE=1
diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
index 6f5100f..c9fa2e5 100644
--- a/Foundation/CMakeLists.txt
+++ b/Foundation/CMakeLists.txt
@@ -35,7 +35,7 @@ POCO_MESSAGES(SRCS Logging src/pocomsg.mc)
# If POCO_UNBUNDLED is enabled we try to find the required packages
# The configuration will fail if the packages are not found
if(POCO_UNBUNDLED)
- find_package(PCRE REQUIRED)
+ find_package(unofficial-pcre CONFIG REQUIRED)
find_package(ZLIB REQUIRED)

#HACK: Unicode.cpp requires functions from these files. The can't be taken from the library
@@ -101,7 +101,7 @@ set_target_properties(Foundation
)

if(POCO_UNBUNDLED)
- target_link_libraries(Foundation PUBLIC Pcre::Pcre ZLIB::ZLIB)
+ target_link_libraries(Foundation PUBLIC unofficial::pcre::pcre ZLIB::ZLIB)
target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED)
add_definitions(
-D_pcre_utf8_table1=_poco_pcre_utf8_table1
diff --git a/Foundation/cmake/PocoFoundationConfig.cmake b/Foundation/cmake/PocoFoundationConfig.cmake
index 46c2d3f..af2e78c 100644
--- a/Foundation/cmake/PocoFoundationConfig.cmake
+++ b/Foundation/cmake/PocoFoundationConfig.cmake
@@ -2,7 +2,7 @@ if(@POCO_UNBUNDLED@)
include(CMakeFindDependencyMacro)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
find_dependency(ZLIB REQUIRED)
- find_dependency(PCRE REQUIRED)
+ find_dependency(unofficial-pcre REQUIRED)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/PocoFoundationTargets.cmake")
diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt
index 4fbf06f..793285a 100644
--- a/XML/CMakeLists.txt
+++ b/XML/CMakeLists.txt
@@ -20,7 +20,7 @@ endif()
# If POCO_UNBUNDLED is enabled we try to find the required packages
# The configuration will fail if the packages are not found
if(POCO_UNBUNDLED)
- find_package(EXPAT REQUIRED)
+ find_package(expat CONFIG REQUIRED)
else()
POCO_SOURCES(SRCS expat
src/xmlparse.cpp
@@ -50,7 +50,7 @@ target_include_directories(XML
)

if(POCO_UNBUNDLED)
- target_link_libraries(XML PUBLIC EXPAT::EXPAT)
+ target_link_libraries(XML PUBLIC expat::expat)
target_compile_definitions(XML PUBLIC POCO_UNBUNDLED)
else()
if(WIN32)
diff --git a/XML/cmake/PocoXMLConfig.cmake b/XML/cmake/PocoXMLConfig.cmake
index ef58207..4ed94ec 100644
--- a/XML/cmake/PocoXMLConfig.cmake
Expand All @@ -216,7 +161,7 @@ index ef58207..4ed94ec 100644

include("${CMAKE_CURRENT_LIST_DIR}/PocoXMLTargets.cmake")
diff --git a/cmake/PocoConfig.cmake.in b/cmake/PocoConfig.cmake.in
index 173eacd..936edf4 100644
index 173eacd..4864b32 100644
--- a/cmake/PocoConfig.cmake.in
+++ b/cmake/PocoConfig.cmake.in
@@ -8,6 +8,13 @@ if (NOT Poco_FIND_COMPONENTS)
Expand All @@ -225,7 +170,7 @@ index 173eacd..936edf4 100644

+include(CMakeFindDependencyMacro)
+find_dependency(ZLIB REQUIRED)
+find_dependency(unofficial-pcre REQUIRED)
+#find_dependency(unofficial-pcre REQUIRED)
+if(Poco_FIND_REQUIRED_XML)
+ find_dependency(expat CONFIG REQUIRED)
+endif()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
diff --git a/XML/include/Poco/XML/ParserEngine.h b/XML/include/Poco/XML/ParserEngine.h
index e0c8455..363654c 100644
--- a/XML/include/Poco/XML/ParserEngine.h
+++ b/XML/include/Poco/XML/ParserEngine.h
@@ -19,6 +19,7 @@
#include "Poco/XML/XML.h"
#if defined(POCO_UNBUNDLED)
+#include <expat_config.h>
#include <expat.h>
#else
#include "Poco/XML/expat.h"
diff --git a/XML/include/Poco/XML/ParserEngine.h b/XML/include/Poco/XML/ParserEngine.h
index e0c8455..363654c 100644
--- a/XML/include/Poco/XML/ParserEngine.h
+++ b/XML/include/Poco/XML/ParserEngine.h
@@ -19,6 +19,7 @@

#include "Poco/XML/XML.h"
#if defined(POCO_UNBUNDLED)
+#include <expat_config.h>
#include <expat.h>
#else
#include "Poco/XML/expat.h"
Loading