diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2019-11-22 09:47:40 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-22 09:47:40 -0800 |
| commit | 45f4b820e5743b89bca3508ba2028cdd5d8bbd17 (patch) | |
| tree | f874a8c4a7392309bdbb86447288597ec0a4a281 /ports/poco | |
| parent | 62d67d3bf8eeff1afa8009041fd08b8822676b7b (diff) | |
| parent | 8831e8f25f1ff6546ee4a5291b91d599421637b3 (diff) | |
| download | vcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.tar.gz vcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.zip | |
Merge branch 'master' into vcpkg_nuget
Diffstat (limited to 'ports/poco')
| -rw-r--r-- | ports/poco/CONTROL | 8 | ||||
| -rw-r--r-- | ports/poco/find_pcre.patch | 35 | ||||
| -rw-r--r-- | ports/poco/fix_foundation_link.patch | 24 | ||||
| -rw-r--r-- | ports/poco/include_pcre.patch | 24 | ||||
| -rw-r--r-- | ports/poco/portfile.cmake | 75 | ||||
| -rw-r--r-- | ports/poco/static_pcre.patch | 53 | ||||
| -rw-r--r-- | ports/poco/unbundled_pdf.patch | 17 | ||||
| -rw-r--r-- | ports/poco/use-vcpkg-libharu.patch | 18 |
8 files changed, 145 insertions, 109 deletions
diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index 4503529c6..9ea94f496 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,6 +1,6 @@ Source: poco -Version: 2.0.0-pre-1 -Build-Depends: expat, libpq, pcre, sqlite3, zlib +Version: 1.9.2-1 +Build-Depends: expat, libpq, pcre, sqlite3, zlib, libpng 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 @@ -15,3 +15,7 @@ Description: MariaDB support for POCO Feature: postgresql Build-Depends: libpqxx Description: PostgreSQL support for POCO + +Feature: pdf +Build-Depends: libharu +Description: Haru support for POCO diff --git a/ports/poco/find_pcre.patch b/ports/poco/find_pcre.patch index 1a07882bc..3b73ae4f1 100644 --- a/ports/poco/find_pcre.patch +++ b/ports/poco/find_pcre.patch @@ -1,13 +1,22 @@ -diff --git a/cmake/FindPCRE.cmake b/cmake/FindPCRE.cmake
-index 41a99cb..77f3a42 100644
---- a/cmake/FindPCRE.cmake
-+++ b/cmake/FindPCRE.cmake
-@@ -14,7 +14,7 @@ ENDIF (PCRE_INCLUDE_DIRS)
-
- FIND_PATH(PCRE_INCLUDE_DIR pcre.h)
-
--SET(PCRE_NAMES pcre)
-+SET(PCRE_NAMES pcred pcre)
- FIND_LIBRARY(PCRE_LIBRARY NAMES ${PCRE_NAMES} )
-
- # handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if
+diff --git a/cmake/FindPCRE.cmake b/cmake/FindPCRE.cmake +index 41a99cb..b1acb32 100644 +--- a/cmake/FindPCRE.cmake ++++ b/cmake/FindPCRE.cmake +@@ -14,9 +14,15 @@ ENDIF (PCRE_INCLUDE_DIRS) + + FIND_PATH(PCRE_INCLUDE_DIR pcre.h) + +-SET(PCRE_NAMES pcre) ++if (WIN32) ++include(SelectLibraryConfigurations) ++find_library(PCRE_LIBRARY_RELEASE NAMES pcre) ++find_library(PCRE_LIBRARY_DEBUG NAMES pcred) ++select_library_configurations(PCRE) ++else() ++SET(PCRE_NAMES pcred pcre) + FIND_LIBRARY(PCRE_LIBRARY NAMES ${PCRE_NAMES} ) +- ++endif() + # handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if + # all listed variables are TRUE + INCLUDE(FindPackageHandleStandardArgs) diff --git a/ports/poco/fix_foundation_link.patch b/ports/poco/fix_foundation_link.patch new file mode 100644 index 000000000..c8830ed4f --- /dev/null +++ b/ports/poco/fix_foundation_link.patch @@ -0,0 +1,24 @@ +diff --git a/Foundation/src/Environment_WIN32.cpp b/Foundation/src/Environment_WIN32.cpp +index 62845fa..edcf6fe 100644 +--- a/Foundation/src/Environment_WIN32.cpp ++++ b/Foundation/src/Environment_WIN32.cpp +@@ -22,6 +22,7 @@ + #include <ws2ipdef.h> + #include <iphlpapi.h> + ++#pragma comment(lib, "IPHLPAPI.lib") + + namespace Poco { + +diff --git a/Foundation/src/Environment_WINCE.cpp b/Foundation/src/Environment_WINCE.cpp +index afa59b6..c43767b 100644 +--- a/Foundation/src/Environment_WINCE.cpp ++++ b/Foundation/src/Environment_WINCE.cpp +@@ -23,6 +23,7 @@ + #include <windows.h> + #include <iphlpapi.h> + ++#pragma comment(lib, "IPHLPAPI.lib") + + namespace Poco { + diff --git a/ports/poco/include_pcre.patch b/ports/poco/include_pcre.patch index 6594a30fe..5db2372ea 100644 --- a/ports/poco/include_pcre.patch +++ b/ports/poco/include_pcre.patch @@ -1,12 +1,12 @@ -diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
-index 5b7df96..4fedfd5 100644
---- a/Foundation/CMakeLists.txt
-+++ b/Foundation/CMakeLists.txt
-@@ -101,6 +101,7 @@ target_link_libraries(Foundation PUBLIC ${PCRE_LIBRARIES} ${ZLIB_LIBRARIES})
- target_include_directories(Foundation
- PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
-+ $<BUILD_INTERFACE:${PCRE_INCLUDE_DIRS}>
- $<INSTALL_INTERFACE:include>
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
- )
+diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt +index 26a2365..0b8f7bc 100644 +--- a/Foundation/CMakeLists.txt ++++ b/Foundation/CMakeLists.txt +@@ -168,6 +168,7 @@ target_link_libraries( "${LIBNAME}" ${SYSLIBS}) + target_include_directories( "${LIBNAME}" + PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> ++ $<BUILD_INTERFACE:${PCRE_INCLUDE_DIRS}> + $<INSTALL_INTERFACE:include> + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src + ) diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 36a127489..4e7995a49 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -1,13 +1,11 @@ include(vcpkg_common_functions) -# Poco 2.0.0 (pre) -# commit 46e00c8 vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pocoproject/poco - REF 46e00c8d6f6d03864397c3e517a165e82f9efd5e - SHA512 2c2f5048b7bfbbfe47ac303ed79213197c97f3d90362dd2d7629c8b353a6c8bd303b1bcf477e3493cc6c984645822ca043dd0a77e9186e001e6808dc2d17a5b4 - HEAD_REF develop + REF 8a127d6f16795d914cadc342d3f4f3b9b7999e3b #1.9.2 + SHA512 282097ee2118ac55320ebdde05bb53ed27d68af49c201b0b26027706ef935ae08f8090abb8aab1cafe84c72520ea73b01263b439d32bd2d0bd55319b0634b168 + HEAD_REF master PATCHES # Find pcre in debug find_pcre.patch @@ -15,16 +13,21 @@ vcpkg_from_github( include_pcre.patch # Fix embedded copy of pcre in static linking mode static_pcre.patch - # Fix source path of PDF - unbundled_pdf.patch + # Use vcpkg installed libharu for feature pdf + use-vcpkg-libharu.patch # Add the support of arm64-windows arm64_pcre.patch + fix_foundation_link.patch ) # define Poco linkage type string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" POCO_STATIC) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" POCO_MT) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + pdf ENABLE_PDF +) + # MySQL / MariaDDB feature if("mysql" IN_LIST FEATURES OR "mariadb" IN_LIST FEATURES) if("mysql" IN_LIST FEATURES) @@ -44,44 +47,40 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} #PREFER_NINJA - OPTIONS + OPTIONS ${FEATURE_OPTIONS} # Set to OFF|ON (default is OFF) to control linking dependencies as external -DPOCO_UNBUNDLED=ON # Define linking feature -DPOCO_STATIC=${POCO_STATIC} -DPOCO_MT=${POCO_MT} # Set to OFF|ON (default is OFF) to control build of POCO tests - -DPOCO_ENABLE_TESTS=OFF + -DENABLE_TESTS=OFF # Set to OFF|ON (default is OFF) to control build of POCO samples - -DPOCO_ENABLE_SAMPLES=OFF + -DENABLE_SAMPLES=OFF # Allow enabling and disabling components # POCO_ENABLE_SQL_ODBC, POCO_ENABLE_SQL_MYSQL and POCO_ENABLE_SQL_POSTGRESQL are # defined on the fly if the required librairies are present - -DPOCO_ENABLE_ENCODINGS=ON - -DPOCO_ENABLE_ENCODINGS_COMPILER=ON - -DPOCO_ENABLE_XML=ON - -DPOCO_ENABLE_JSON=ON - -DPOCO_ENABLE_MONGODB=ON - -DPOCO_ENABLE_SQL_SQLITE=ON - -DPOCO_ENABLE_REDIS=ON - -DPOCO_ENABLE_PDF=ON - -DPOCO_ENABLE_UTIL=ON - -DPOCO_ENABLE_NET=ON - -DPOCO_ENABLE_SEVENZIP=ON - -DPOCO_ENABLE_ZIP=ON - -DPOCO_ENABLE_CPPPARSER=ON - -DPOCO_ENABLE_POCODOC=ON - -DPOCO_ENABLE_PAGECOMPILER=ON - -DPOCO_ENABLE_PAGECOMPILER_FILE2PAGE=ON - -DPOCO_ENABLE_WSTRING=ON - -DPOCO_ENABLE_FPENVIRONMENT=ON - -DPOCO_ENABLE_CPPUNIT=ON - # + -DENABLE_ENCODINGS=ON + -DENABLE_ENCODINGS_COMPILER=ON + -DENABLE_XML=ON + -DENABLE_JSON=ON + -DENABLE_MONGODB=ON + # -DPOCO_ENABLE_SQL_SQLITE=ON # SQLITE are not supported. + -DENABLE_REDIS=ON + -DENABLE_UTIL=ON + -DENABLE_NET=ON + -DENABLE_SEVENZIP=ON + -DENABLE_ZIP=ON + -DENABLE_CPPPARSER=ON + -DENABLE_POCODOC=ON + -DENABLE_PAGECOMPILER=ON + -DENABLE_PAGECOMPILER_FILE2PAGE=ON + # -DMYSQL_INCLUDE_DIR=${MYSQL_INCLUDE_DIR} OPTIONS_RELEASE - -DMYSQL_LIBRARY=${MYSQL_LIBRARY} + -DMYSQL_LIB=${MYSQL_LIBRARY} OPTIONS_DEBUG - -DMYSQL_LIBRARY=${MYSQL_LIBRARY_DEBUG} + -DMYSQL_LIB=${MYSQL_LIBRARY_DEBUG} ) vcpkg_install_cmake() @@ -122,7 +121,7 @@ endif() # -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) @@ -144,16 +143,16 @@ endif() # if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake") - vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/Poco") - vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Poco") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Poco) endif() # remove unused files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # copy license -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/poco) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/poco/LICENSE ${CURRENT_PACKAGES_DIR}/share/poco/copyright) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) -vcpkg_copy_pdbs()
\ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/poco/static_pcre.patch b/ports/poco/static_pcre.patch index b9bac7629..a6dab02ce 100644 --- a/ports/poco/static_pcre.patch +++ b/ports/poco/static_pcre.patch @@ -1,27 +1,26 @@ -diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
-index 4fedfd5..741313b 100644
---- a/Foundation/CMakeLists.txt
-+++ b/Foundation/CMakeLists.txt
-@@ -35,6 +35,22 @@ if (POCO_UNBUNDLED)
- find_package(PCRE REQUIRED)
- find_package(ZLIB REQUIRED)
-
-+ add_definitions(
-+ -D_pcre_utf8_table1=_poco_pcre_utf8_table1
-+ -D_pcre_utf8_table1_size=_poco_pcre_utf8_table1_size
-+ -D_pcre_utf8_table2=_poco_pcre_utf8_table2
-+ -D_pcre_utf8_table3=_poco_pcre_utf8_table3
-+ -D_pcre_utf8_table4=_poco_pcre_utf8_table4
-+ -D_pcre_utt_names=_poco_pcre_utt_names
-+ -D_pcre_utt=_poco_pcre_utt
-+ -D_pcre_utt_size=_poco_pcre_utt_size
-+ -D_pcre_OP_lengths=_poco_pcre_OP_lengths
-+ -D_pcre_hspace_list=_poco_pcre_hspace_list
-+ -D_pcre_vspace_list=_poco_pcre_vspace_list
-+ -D_pcre_ucp_gentype=_poco_pcre_ucp_gentype
-+ -D_pcre_ucp_gbtable=_poco_pcre_ucp_gbtable
-+ )
-+
- #HACK: Unicode.cpp requires functions from these files. The can't be taken from the library
- POCO_SOURCES( SRCS RegExp
- src/pcre_ucd.c
+diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt +index 0b8f7bc..c362890 100644 +--- a/Foundation/CMakeLists.txt ++++ b/Foundation/CMakeLists.txt +@@ -53,6 +53,21 @@ if (POCO_UNBUNDLED) + include_directories(${ZLIB_INCLUDE_DIRS}) + + add_definitions(-DPOCO_UNBUNDLED) ++ add_definitions( ++ -D_pcre_utf8_table1=_poco_pcre_utf8_table1 ++ -D_pcre_utf8_table1_size=_poco_pcre_utf8_table1_size ++ -D_pcre_utf8_table2=_poco_pcre_utf8_table2 ++ -D_pcre_utf8_table3=_poco_pcre_utf8_table3 ++ -D_pcre_utf8_table4=_poco_pcre_utf8_table4 ++ -D_pcre_utt_names=_poco_pcre_utt_names ++ -D_pcre_utt=_poco_pcre_utt ++ -D_pcre_utt_size=_poco_pcre_utt_size ++ -D_pcre_OP_lengths=_poco_pcre_OP_lengths ++ -D_pcre_hspace_list=_poco_pcre_hspace_list ++ -D_pcre_vspace_list=_poco_pcre_vspace_list ++ -D_pcre_ucp_gentype=_poco_pcre_ucp_gentype ++ -D_pcre_ucp_gbtable=_poco_pcre_ucp_gbtable ++ ) + + else() + # pcre diff --git a/ports/poco/unbundled_pdf.patch b/ports/poco/unbundled_pdf.patch deleted file mode 100644 index b7abcf541..000000000 --- a/ports/poco/unbundled_pdf.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/PDF/CMakeLists.txt b/PDF/CMakeLists.txt
-index b377035..9cfbd32 100644
---- a/PDF/CMakeLists.txt
-+++ b/PDF/CMakeLists.txt
-@@ -31,6 +31,12 @@ endif (POCO_UNBUNDLED)
- # TODO: Currently only bundled is supported, in future this should also be possible
- # with an unbundled version of hpdf
- # hpdf
-+if (POCO_UNBUNDLED)
-+ POCO_SOURCES( SRCS hpdf
-+ src/bmpread.c
-+ )
-+endif (POCO_UNBUNDLED)
-+
- POCO_SOURCES(SRCS hpdf
- src/hpdf_3dmeasure.c
- src/hpdf_annotation.c
diff --git a/ports/poco/use-vcpkg-libharu.patch b/ports/poco/use-vcpkg-libharu.patch new file mode 100644 index 000000000..e43b3c9cd --- /dev/null +++ b/ports/poco/use-vcpkg-libharu.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5f8a2a6..1ffd0a0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -195,8 +195,11 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS) + add_subdirectory(Redis) + list(APPEND Poco_COMPONENTS "Redis") + 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() + |
