diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/poco | |
Diffstat (limited to 'vcpkg/ports/poco')
| -rw-r--r-- | vcpkg/ports/poco/0001-static-pcre.patch | 36 | ||||
| -rw-r--r-- | vcpkg/ports/poco/0002-arm64-pcre.patch | 49 | ||||
| -rw-r--r-- | vcpkg/ports/poco/0003-fix-dependency.patch | 205 | ||||
| -rw-r--r-- | vcpkg/ports/poco/0004-fix-feature-sqlite3.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/poco/0005-fix-error-c3861.patch | 12 | ||||
| -rw-r--r-- | vcpkg/ports/poco/0007-find-pcre2.patch | 80 | ||||
| -rw-r--r-- | vcpkg/ports/poco/0008-fix-mingw-compilation.patch | 40 | ||||
| -rw-r--r-- | vcpkg/ports/poco/0009-fix-zip-to-xml-dependency.patch | 22 | ||||
| -rw-r--r-- | vcpkg/ports/poco/portfile.cmake | 152 | ||||
| -rw-r--r-- | vcpkg/ports/poco/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/poco/vcpkg.json | 292 |
11 files changed, 905 insertions, 0 deletions
diff --git a/vcpkg/ports/poco/0001-static-pcre.patch b/vcpkg/ports/poco/0001-static-pcre.patch new file mode 100644 index 0000000..552c092 --- /dev/null +++ b/vcpkg/ports/poco/0001-static-pcre.patch @@ -0,0 +1,36 @@ +diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt +index d5f3b26..cb29e69 100644 +--- a/Foundation/CMakeLists.txt ++++ b/Foundation/CMakeLists.txt +@@ -101,6 +101,31 @@ set_target_properties(Foundation + if(POCO_UNBUNDLED) + target_link_libraries(Foundation PUBLIC Pcre2::Pcre2 ZLIB::ZLIB Utf8Proc::Utf8Proc) + 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 ++ -D_pcre2_unicode_version_8=_poco_pcre2_unicode_version_8 ++ -D_pcre2_ucd_caseless_sets_8=_poco_pcre2_ucd_caseless_sets_8 ++ -D_pcre2_ucd_digit_sets_8=_poco_pcre2_ucd_digit_sets_8 ++ -D_pcre2_ucd_script_sets_8=_poco_pcre2_ucd_script_sets_8 ++ -D_pcre2_ucd_boolprop_sets_8=_poco_pcre2_ucd_boolprop_sets_8 ++ -D_pcre2_ucd_records_8=_poco_pcre2_ucd_records_8 ++ -D_pcre2_ucd_stage1_8=_poco_pcre2_ucd_stage1_8 ++ -D_pcre2_ucd_stage2_8=_poco_pcre2_ucd_stage2_8 ++) + else() + target_compile_definitions(Foundation PUBLIC UTF8PROC_STATIC) + endif(POCO_UNBUNDLED) diff --git a/vcpkg/ports/poco/0002-arm64-pcre.patch b/vcpkg/ports/poco/0002-arm64-pcre.patch new file mode 100644 index 0000000..b5a48ce --- /dev/null +++ b/vcpkg/ports/poco/0002-arm64-pcre.patch @@ -0,0 +1,49 @@ +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" diff --git a/vcpkg/ports/poco/0003-fix-dependency.patch b/vcpkg/ports/poco/0003-fix-dependency.patch new file mode 100644 index 0000000..4939509 --- /dev/null +++ b/vcpkg/ports/poco/0003-fix-dependency.patch @@ -0,0 +1,205 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 861c27c..d2701ce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -80,8 +80,6 @@ option(ENABLE_NETSSL_WIN "Enable NetSSL Windows" OFF) + + if(ENABLE_CRYPTO OR ENABLE_NETSSL OR ENABLE_JWT) + find_package(OpenSSL REQUIRED) +-else() +- find_package(OpenSSL) + endif() + + if(OPENSSL_FOUND) +@@ -111,24 +109,19 @@ else() + option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" OFF) + endif() + +-if(ENABLE_DATA_MYSQL) +- find_package(MySQL REQUIRED) +-else() +- find_package(MySQL) +-endif() ++option(ENABLE_DATA "Enable Data" OFF) ++option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" OFF) + +-if(MYSQL_FOUND) +- option(ENABLE_DATA "Enable Data" ON) +- option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" ON) +-else() +- option(ENABLE_DATA "Enable Data" OFF) +- option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" OFF) ++if(ENABLE_DATA_MYSQL) ++ find_package(libmysql) ++ if (NOT libmysql_FOUND) ++ find_package(unofficial-libmariadb CONFIG REQUIRED) ++ set(MYSQL_LIBRARIES unofficial::libmariadb) ++ endif() + endif() + + if(ENABLE_DATA_POSTGRESQL) + find_package(PostgreSQL REQUIRED) +-else() +- find_package(PostgreSQL) + endif() + + if(PostgreSQL_FOUND) +@@ -266,6 +259,9 @@ include(DefinePlatformSpecific) + # Collect the built libraries and include dirs, the will be used to create the PocoConfig.cmake file + set(Poco_COMPONENTS "") + ++# Do not declare the link library in the code! ++add_definitions(-DPOCO_NO_AUTOMATIC_LIBS) ++ + if(ENABLE_TESTS) + add_subdirectory(CppUnit) + set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE) +@@ -398,8 +394,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) +- add_subdirectory(PDF) ++if(ENABLE_PDF) ++ include(SelectLibraryConfigurations) ++ find_library(PocoPDF_LIBRARY_RELEASE NAMES libhpdf) ++ find_library(PocoPDF_LIBRARY_DEBUG NAMES libhpdfd) ++ select_library_configurations(PocoPDF) + list(APPEND Poco_COMPONENTS "PDF") + endif() + +diff --git a/Data/CMakeLists.txt b/Data/CMakeLists.txt +index 95e5019..d7bd537 100644 +--- a/Data/CMakeLists.txt ++++ b/Data/CMakeLists.txt +@@ -73,7 +73,7 @@ else(ENABLE_DATA_SQLITE) + message(STATUS "SQLite Support Disabled") + endif() + +-if(MYSQL_FOUND AND ENABLE_DATA_MYSQL) ++if((unofficial-libmysql_FOUND OR unofficial-libmariadb_FOUND) AND ENABLE_DATA_MYSQL) + message(STATUS "MySQL Support Enabled") + add_subdirectory(MySQL) + else() +diff --git a/Data/MySQL/CMakeLists.txt b/Data/MySQL/CMakeLists.txt +index 0ea8701..3c8a426 100644 +--- a/Data/MySQL/CMakeLists.txt ++++ b/Data/MySQL/CMakeLists.txt +@@ -21,7 +21,7 @@ set_target_properties(DataMySQL + DEFINE_SYMBOL MySQL_EXPORTS + ) + +-target_link_libraries(DataMySQL PUBLIC Poco::Data MySQL::client) ++target_link_libraries(DataMySQL PUBLIC Poco::Data ${MYSQL_LIBRARIES}) + target_include_directories(DataMySQL + 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 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 @@ + #endif + #if defined(LIBMARIADB) + #pragma comment(lib, "libmariadb") +- #else +- #pragma comment(lib, "libmysql") + #endif + #endif + +diff --git a/Data/SQLite/CMakeLists.txt b/Data/SQLite/CMakeLists.txt +index 7141112..0c73beb 100644 +--- a/Data/SQLite/CMakeLists.txt ++++ b/Data/SQLite/CMakeLists.txt +@@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h") + POCO_HEADERS_AUTO(SQLITE_SRCS ${HDRS_G}) + + if(POCO_UNBUNDLED) +- find_package(SQLite3 REQUIRED) ++ find_package(unofficial-sqlite3 CONFIG REQUIRED) + else() + # sqlite3 + POCO_SOURCES(SQLITE_SRCS sqlite3 +@@ -39,7 +39,7 @@ target_include_directories(DataSQLite + ) + + if(POCO_UNBUNDLED) +- target_link_libraries(DataSQLite PUBLIC SQLite::SQLite3) ++ target_link_libraries(DataSQLite PUBLIC unofficial::sqlite3::sqlite3) + target_compile_definitions(DataSQLite PUBLIC + POCO_UNBUNDLED + SQLITE_THREADSAFE=1 +diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt +index cf66250..89e6c8f 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 ++++ b/XML/cmake/PocoXMLConfig.cmake +@@ -4,7 +4,7 @@ if(@POCO_UNBUNDLED@) + if(CMAKE_VERSION VERSION_LESS "3.10") + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V39") + endif() +- find_dependency(EXPAT REQUIRED) ++ find_dependency(expat CONFIG REQUIRED) + endif() + + include("${CMAKE_CURRENT_LIST_DIR}/PocoXMLTargets.cmake") +diff --git a/cmake/PocoConfig.cmake.in b/cmake/PocoConfig.cmake.in +index 173eacd..90f68fc 100644 +--- a/cmake/PocoConfig.cmake.in ++++ b/cmake/PocoConfig.cmake.in +@@ -8,6 +8,12 @@ if (NOT Poco_FIND_COMPONENTS) + return() + endif() + ++include(CMakeFindDependencyMacro) ++find_dependency(ZLIB REQUIRED) ++if(Poco_FIND_REQUIRED_XML) ++ find_dependency(expat CONFIG REQUIRED) ++endif() ++ + set(_Poco_FIND_PARTS_REQUIRED) + if (Poco_FIND_REQUIRED) + set(_Poco_FIND_PARTS_REQUIRED REQUIRED) +@@ -23,7 +29,7 @@ set(_Poco_NOTFOUND_MESSAGE) + + # Let components find each other, but don't overwrite CMAKE_PREFIX_PATH + set(_Poco_CMAKE_PREFIX_PATH_old ${CMAKE_PREFIX_PATH}) +-set(CMAKE_PREFIX_PATH ${_Poco_install_prefix}) ++set(CMAKE_PREFIX_PATH ${_Poco_install_prefix} ${CMAKE_PREFIX_PATH}) + + foreach(module ${Poco_FIND_COMPONENTS}) + find_package(Poco${module} +diff --git a/Foundation/cmake/PocoFoundationConfig.cmake b/Foundation/cmake/PocoFoundationConfig.cmake +index 82c5788..739adef 100644 +--- a/Foundation/cmake/PocoFoundationConfig.cmake ++++ b/Foundation/cmake/PocoFoundationConfig.cmake +@@ -3,7 +3,7 @@ if(@POCO_UNBUNDLED@) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + find_dependency(ZLIB REQUIRED) + find_dependency(PCRE2 REQUIRED) +- find_dependency(Utf8Proc REQUIRED) ++ find_dependency(unofficial-utf8proc REQUIRED) + endif() + + include("${CMAKE_CURRENT_LIST_DIR}/PocoFoundationTargets.cmake") diff --git a/vcpkg/ports/poco/0004-fix-feature-sqlite3.patch b/vcpkg/ports/poco/0004-fix-feature-sqlite3.patch new file mode 100644 index 0000000..1786c1f --- /dev/null +++ b/vcpkg/ports/poco/0004-fix-feature-sqlite3.patch @@ -0,0 +1,13 @@ +diff --git a/Data/SQLite/cmake/PocoDataSQLiteConfig.cmake b/Data/SQLite/cmake/PocoDataSQLiteConfig.cmake +index 5478bab..c5d6d6d 100644 +--- a/Data/SQLite/cmake/PocoDataSQLiteConfig.cmake ++++ b/Data/SQLite/cmake/PocoDataSQLiteConfig.cmake +@@ -5,7 +5,7 @@ if(@POCO_UNBUNDLED@) + if(CMAKE_VERSION VERSION_LESS "3.14") + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V313") + endif() +- find_dependency(SQLite3 REQUIRED) ++ find_dependency(unofficial-sqlite3 REQUIRED) + endif() + + include("${CMAKE_CURRENT_LIST_DIR}/PocoDataSQLiteTargets.cmake") diff --git a/vcpkg/ports/poco/0005-fix-error-c3861.patch b/vcpkg/ports/poco/0005-fix-error-c3861.patch new file mode 100644 index 0000000..36bcd9a --- /dev/null +++ b/vcpkg/ports/poco/0005-fix-error-c3861.patch @@ -0,0 +1,12 @@ +diff --git a/XML/src/ParserEngine.h b/XML/src/ParserEngine.h +index f74b553..c638778 100644 +--- a/XML/src/ParserEngine.h ++++ b/XML/src/ParserEngine.h +@@ -19,6 +19,7 @@ + + #include "Poco/XML/XML.h" + #if defined(POCO_UNBUNDLED) ++#include <expat_config.h> + #include <expat.h> + #else + #include "expat.h" diff --git a/vcpkg/ports/poco/0007-find-pcre2.patch b/vcpkg/ports/poco/0007-find-pcre2.patch new file mode 100644 index 0000000..638750b --- /dev/null +++ b/vcpkg/ports/poco/0007-find-pcre2.patch @@ -0,0 +1,80 @@ +diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt +index d8df9dc..fe2b000 100644 +--- a/Foundation/CMakeLists.txt ++++ b/Foundation/CMakeLists.txt +@@ -27,9 +27,12 @@ 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(PCRE2 REQUIRED) + find_package(ZLIB REQUIRED) +- find_package(Utf8Proc REQUIRED) ++ find_package(unofficial-utf8proc CONFIG REQUIRED) ++ include(SelectLibraryConfigurations) ++ find_library(PCRE2_LIBRARY_DEBUG NAMES pcre2-8d pcre2-8-staticd HINTS ${INSTALLED_LIB_PATH}) ++ find_library(PCRE2_LIBRARY_RELEASE NAMES pcre2-8 pcre2-8-static HINTS ${INSTALLED_LIB_PATH}) ++ select_library_configurations(PCRE2) + + #HACK: Unicode.cpp requires functions from these files. The can't be taken from the library + POCO_SOURCES(SRCS RegExp +@@ -99,7 +102,7 @@ set_target_properties(Foundation + ) + + if(POCO_UNBUNDLED) +- target_link_libraries(Foundation PUBLIC Pcre2::Pcre2 ZLIB::ZLIB Utf8Proc::Utf8Proc) ++ target_link_libraries(Foundation PUBLIC ${PCRE2_LIBRARY} ZLIB::ZLIB utf8proc) + target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED) + add_definitions( + -D_pcre2_utf8_table1=_poco_pcre2_utf8_table1 +diff --git a/cmake/FindPCRE2.cmake b/cmake/FindPCRE2.cmake +index e730f32..6e10df2 100644 +--- a/cmake/FindPCRE2.cmake ++++ b/cmake/FindPCRE2.cmake +@@ -54,7 +54,7 @@ Hints + include(FindPackageHandleStandardArgs) + + find_package(PkgConfig QUIET) +-pkg_check_modules(PC_PCRE2 QUIET pcre2) ++pkg_check_modules(PC_PCRE2 QUIET libpcre2-8) + + find_path(PCRE2_INCLUDE_DIR + NAMES pcre2.h +@@ -66,8 +66,8 @@ find_path(PCRE2_INCLUDE_DIR + DOC "Specify the include directory containing pcre2.h" + ) + +-find_library(PCRE2_LIBRARY +- NAMES pcre2-8 ++find_library(PCRE2_LIBRARY_DEBUG ++ NAMES pcre2-8d pcre2-8-staticd + HINTS + ${PCRE2_ROOT_DIR}/lib + ${PCRE2_ROOT_LIBRARY_DIRS} +@@ -76,6 +76,19 @@ find_library(PCRE2_LIBRARY + DOC "Specify the lib directory containing pcre2" + ) + ++find_library(PCRE2_LIBRARY_RELEASE ++ NAMES pcre2-8 pcre2-8-static ++ HINTS ++ ${PCRE2_ROOT_DIR}/lib ++ ${PCRE2_ROOT_LIBRARY_DIRS} ++ PATHS ++ ${PC_PCRE2_LIBRARY_DIRS} ++ DOC "Specify the lib directory containing pcre2" ++) ++ ++include(SelectLibraryConfigurations) ++select_library_configurations(PCRE2) ++ + set(PCRE2_VERSION ${PC_PCRE2_VERSION}) + + find_package_handle_standard_args(PCRE2 +@@ -87,7 +100,6 @@ find_package_handle_standard_args(PCRE2 + ) + + if(PCRE2_FOUND) +- set(PCRE2_LIBRARIES ${PCRE2_LIBRARY}) + set(PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR}) + set(PCRE2_DEFINITIONS ${PC_PCRE2_CFLAGS_OTHER}) + endif() diff --git a/vcpkg/ports/poco/0008-fix-mingw-compilation.patch b/vcpkg/ports/poco/0008-fix-mingw-compilation.patch new file mode 100644 index 0000000..97cda3a --- /dev/null +++ b/vcpkg/ports/poco/0008-fix-mingw-compilation.patch @@ -0,0 +1,40 @@ +diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt +index 41ba99936..b3986690f 100644 +--- a/Foundation/CMakeLists.txt ++++ b/Foundation/CMakeLists.txt +@@ -193,7 +193,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 +@@ -255,13 +258,8 @@ + #elif defined (__GNUC__) + #define POCO_COMPILER_GCC + #if __has_include(<cxxabi.h>) + #define POCO_HAVE_CXXABI_H + #endif +- #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) diff --git a/vcpkg/ports/poco/0009-fix-zip-to-xml-dependency.patch b/vcpkg/ports/poco/0009-fix-zip-to-xml-dependency.patch new file mode 100644 index 0000000..159c52a --- /dev/null +++ b/vcpkg/ports/poco/0009-fix-zip-to-xml-dependency.patch @@ -0,0 +1,22 @@ + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e88e5612a..23b4c992f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -459,12 +459,12 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/ActiveRecord/Compiler AND ENABLE_ACTIVERECORD_CO + list(APPEND Poco_COMPONENTS "ActiveRecordCompiler") + endif() + +-if(EXISTS ${PROJECT_SOURCE_DIR}/SevenZip AND ENABLE_SEVENZIP AND ENABLE_XML) ++if(EXISTS ${PROJECT_SOURCE_DIR}/SevenZip AND ENABLE_SEVENZIP) + add_subdirectory(SevenZip) + list(APPEND Poco_COMPONENTS "SevenZip") + endif() + +-if(EXISTS ${PROJECT_SOURCE_DIR}/Zip AND ENABLE_ZIP AND ENABLE_XML) ++if(EXISTS ${PROJECT_SOURCE_DIR}/Zip AND ENABLE_ZIP) + add_subdirectory(Zip) + list(APPEND Poco_COMPONENTS "Zip") + endif() diff --git a/vcpkg/ports/poco/portfile.cmake b/vcpkg/ports/poco/portfile.cmake new file mode 100644 index 0000000..0ad3dd3 --- /dev/null +++ b/vcpkg/ports/poco/portfile.cmake @@ -0,0 +1,152 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pocoproject/poco + REF "poco-${VERSION}-release" + SHA512 e192818a5f731ec6f6bddf062573d7bedfd15754157f145882c2c9d9bce497b92cf23f639f989d9e5605cb83029c4f303752cab655b525b5a5b5e5b704714725 + HEAD_REF devel + PATCHES + # Fix embedded copy of pcre in static linking mode + 0001-static-pcre.patch + # Add the support of arm64-windows + 0002-arm64-pcre.patch + 0003-fix-dependency.patch + 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 + # Should be removed once https://github.com/pocoproject/poco/issues/4947 is resolved + 0009-fix-zip-to-xml-dependency.patch +) + +file(REMOVE "${SOURCE_PATH}/Foundation/src/pcre2.h") +file(REMOVE "${SOURCE_PATH}/cmake/V39/FindEXPAT.cmake") +file(REMOVE "${SOURCE_PATH}/cmake/V313/FindSQLite3.cmake") +# vcpkg's PCRE2 does not provide a FindPCRE2, and the bundled one seems to work fine +# file(REMOVE "${SOURCE_PATH}/cmake/FindPCRE2.cmake") +file(REMOVE "${SOURCE_PATH}/XML/src/expat_config.h") +file(REMOVE "${SOURCE_PATH}/cmake/FindMySQL.cmake") + +# define Poco linkage type +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" POCO_MT) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + crypto ENABLE_CRYPTO + netssl ENABLE_NETSSL + pdf ENABLE_PDF + postgresql ENABLE_DATA_POSTGRESQL + encodings ENABLE_ENCODINGS + encodings-compiler ENABLE_ENCODINGS_COMPILER + xml ENABLE_XML + json ENABLE_JSON + mongodb ENABLE_MONGODB + redis ENABLE_REDIS + prometheus ENABLE_PROMETHEUS + util ENABLE_UTIL + net ENABLE_NET + zip ENABLE_ZIP + pocodoc ENABLE_POCODOC + pagecompiler ENABLE_PAGECOMPILER + pagecompiler-file2page ENABLE_PAGECOMPILER_FILE2PAGE + jwt ENABLE_JWT + data ENABLE_DATA + sqlite ENABLE_DATA_SQLITE + odbc ENABLE_DATA_ODBC + activerecord ENABLE_ACTIVERECORD + activerecord-compiler ENABLE_ACTIVERECORD_COMPILER + sevenzip ENABLE_SEVENZIP + cpp-parser ENABLE_CPPPARSER +) + +# POCO_ENABLE_NETSSL_WIN: +# Use the unreleased NetSSL_Win module instead of (OpenSSL) NetSSL. +# This is a variable which can be set in the triplet file. +if(POCO_ENABLE_NETSSL_WIN) + string(REPLACE "ENABLE_NETSSL" "ENABLE_NETSSL_WIN" FEATURE_OPTIONS "${FEATURE_OPTIONS}") + list(APPEND FEATURE_OPTIONS "-DENABLE_NETSSL:BOOL=OFF") +endif() + +if ("mysql" IN_LIST FEATURES OR "mariadb" IN_LIST FEATURES) + set(POCO_USE_MYSQL ON) +else() + set(POCO_USE_MYSQL OFF) +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + # force to use dependencies as external + -DPOCO_UNBUNDLED=ON + # Define linking feature + -DPOCO_MT=${POCO_MT} + -DENABLE_TESTS=OFF + -DENABLE_SAMPLES=OFF + # Allow enabling and disabling components done via features + -DPOCO_DISABLE_INTERNAL_OPENSSL=ON + -DENABLE_APACHECONNECTOR=OFF + -DENABLE_DATA_MYSQL=${POCO_USE_MYSQL} + MAYBE_UNUSED_VARIABLES # these are only used when if(MSVC) + POCO_DISABLE_INTERNAL_OPENSSL + POCO_MT +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +# Move apps to the tools folder +set(tools) +if (ENABLE_PAGECOMPILER) + list(APPEND tools "cpspc") +endif() +if (ENABLE_PAGECOMPILER_FILE2PAGE) + list(APPEND tools "f2cpsp") +endif() +if (ENABLE_POCODOC) + list(APPEND tools "PocoDoc") +endif() +if (ENABLE_ENCODINGS_COMPILER) + list(APPEND tools "tec") +endif() +if (ENABLE_ACTIVERECORD_COMPILER) + list(APPEND tools "poco-arc") +endif() +if (tools) + vcpkg_copy_tools(TOOL_NAMES ${tools} AUTO_CLEAN) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +# Copy additional include files not part of any libraries +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL") + file(COPY "${SOURCE_PATH}/Data/include" DESTINATION "${CURRENT_PACKAGES_DIR}") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/MySQL") + file(COPY "${SOURCE_PATH}/Data/MySQL/include" DESTINATION "${CURRENT_PACKAGES_DIR}") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/ODBC") + file(COPY "${SOURCE_PATH}/Data/ODBC/include" DESTINATION "${CURRENT_PACKAGES_DIR}") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/PostgreSQL") + file(COPY "${SOURCE_PATH}/Data/PostgreSQL/include" DESTINATION "${CURRENT_PACKAGES_DIR}") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/libpq") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/SQLite") + file(COPY "${SOURCE_PATH}/Data/SQLite/include" DESTINATION "${CURRENT_PACKAGES_DIR}") +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_cmake_config_fixup(CONFIG_PATH cmake) +else() + vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Poco) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/vcpkg/ports/poco/usage b/vcpkg/ports/poco/usage new file mode 100644 index 0000000..9adb344 --- /dev/null +++ b/vcpkg/ports/poco/usage @@ -0,0 +1,4 @@ +The package poco is compatible with built-in CMake targets:
+
+ find_package(Poco REQUIRED [COMPONENTS <libs>...])
+ target_link_libraries(main PRIVATE Poco::<libs>)
diff --git a/vcpkg/ports/poco/vcpkg.json b/vcpkg/ports/poco/vcpkg.json new file mode 100644 index 0000000..3ccf2b8 --- /dev/null +++ b/vcpkg/ports/poco/vcpkg.json @@ -0,0 +1,292 @@ +{ + "name": "poco", + "version": "1.14.1", + "port-version": 2, + "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", + "supports": "!uwp", + "dependencies": [ + "pcre2", + "utf8proc", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "activerecord": { + "description": "Simple and lightweight object-relational mapping (ORM) framework built on top of the POCO Data", + "dependencies": [ + "expat", + { + "name": "poco", + "default-features": false, + "features": [ + "data" + ] + } + ] + }, + "activerecord-compiler": { + "description": "Compiler for Simple and lightweight object-relational mapping (ORM) framework built on top of the POCO Data", + "dependencies": [ + { + "name": "poco", + "default-features": false, + "features": [ + "util", + "xml" + ] + } + ] + }, + "cpp-parser": { + "description": "POCO C++ parser" + }, + "crypto": { + "description": "Crypto support", + "dependencies": [ + "openssl" + ] + }, + "data": { + "description": "Database abstraction layer for POCO" + }, + "encodings": { + "description": "Encodings support for POCO" + }, + "encodings-compiler": { + "description": "Compiler for encodings support for POCO" + }, + "json": { + "description": "JSON support for POCO" + }, + "jwt": { + "description": "JWT support for POCO", + "dependencies": [ + { + "name": "poco", + "default-features": false, + "features": [ + "crypto", + "json" + ] + } + ] + }, + "mariadb": { + "description": "MariaDB support for POCO", + "dependencies": [ + "libmariadb", + { + "name": "poco", + "default-features": false, + "features": [ + "data" + ] + } + ] + }, + "mongodb": { + "description": "MongoDB support for POCO", + "dependencies": [ + { + "name": "poco", + "default-features": false, + "features": [ + "net" + ] + } + ] + }, + "mysql": { + "description": "Mysql support for POCO", + "dependencies": [ + "libmysql", + { + "name": "poco", + "default-features": false, + "features": [ + "data" + ] + } + ] + }, + "net": { + "description": "Network support for POCO" + }, + "netssl": { + "description": [ + "NetSSL support for POCO", + "By default, this feature uses the OpenSSL implementation. The `POCO_ENABLE_NETSSL_WIN` triplet variable can be used to switch to the NetSSL_Win module." + ], + "dependencies": [ + { + "name": "poco", + "default-features": false, + "features": [ + "crypto", + "net", + "util" + ] + } + ] + }, + "odbc": { + "description": "ODBC support for POCO", + "supports": "windows | osx | linux", + "dependencies": [ + { + "name": "poco", + "default-features": false, + "features": [ + "data" + ] + }, + { + "name": "unixodbc", + "platform": "osx | linux" + } + ] + }, + "pagecompiler": { + "description": "Command line tool that translates HTML files into C++ code", + "dependencies": [ + { + "name": "poco", + "default-features": false, + "features": [ + "net", + "util", + "xml" + ] + } + ] + }, + "pagecompiler-file2page": { + "description": "Command line tool that translates HTML files into C++ code", + "dependencies": [ + { + "name": "poco", + "default-features": false, + "features": [ + "net", + "util", + "xml" + ] + } + ] + }, + "pdf": { + "description": "Haru support for POCO", + "dependencies": [ + "libharu", + { + "name": "poco", + "default-features": false, + "features": [ + "util", + "xml" + ] + } + ] + }, + "pocodoc": { + "description": "POCO documentation generator", + "dependencies": [ + { + "name": "poco", + "default-features": false, + "features": [ + "cpp-parser", + "data", + "sqlite", + "util", + "xml" + ] + } + ] + }, + "postgresql": { + "description": "PostgreSQL support for POCO", + "dependencies": [ + "libpqxx", + { + "name": "poco", + "default-features": false, + "features": [ + "data" + ] + } + ] + }, + "prometheus": { + "description": "Prometheus support for POCO", + "dependencies": [ + { + "name": "poco", + "default-features": false, + "features": [ + "net" + ] + } + ] + }, + "redis": { + "description": "Redis support for POCO", + "dependencies": [ + { + "name": "poco", + "default-features": false, + "features": [ + "net" + ] + } + ] + }, + "sevenzip": { + "description": "Support for parsing and creating 7Zip files" + }, + "sqlite": { + "description": "SQLite support for POCO", + "dependencies": [ + { + "name": "poco", + "default-features": false, + "features": [ + "data" + ] + }, + "sqlite3" + ] + }, + "util": { + "description": "Utility support library for POCO", + "dependencies": [ + { + "name": "poco", + "default-features": false, + "features": [ + "json", + "xml" + ] + } + ] + }, + "xml": { + "description": "XML support for POCO", + "dependencies": [ + "expat" + ] + }, + "zip": { + "description": "Support for parsing and creating Zip files" + } + } +} |