aboutsummaryrefslogtreecommitdiff
path: root/ports/poco
diff options
context:
space:
mode:
authorAlexander Neumann <alexander.neumann@hamburg.de>2019-09-20 12:24:23 +0200
committerAlexander Neumann <alexander.neumann@hamburg.de>2019-09-20 12:24:23 +0200
commit5b1e426929b40a9b60809284993b424b841a28fc (patch)
treebd12300ad859bababb7d4acc03700fd31949fddc /ports/poco
parent279e25aecfe30f55296881ea9b0236c1d6ee030a (diff)
parent358ec0954d9b71b0def4fd4b4dbafdd0b8478d81 (diff)
downloadvcpkg-5b1e426929b40a9b60809284993b424b841a28fc.tar.gz
vcpkg-5b1e426929b40a9b60809284993b424b841a28fc.zip
Merge remote-tracking branch 'upstream/master' into path_separator
# Conflicts: # scripts/cmake/vcpkg_common_definitions.cmake
Diffstat (limited to 'ports/poco')
-rw-r--r--ports/poco/CONTROL6
-rw-r--r--ports/poco/portfile.cmake13
-rw-r--r--ports/poco/unbundled_pdf.patch30
-rw-r--r--ports/poco/use-vcpkg-libharu.patch18
4 files changed, 31 insertions, 36 deletions
diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL
index e7e1656bb..9ea94f496 100644
--- a/ports/poco/CONTROL
+++ b/ports/poco/CONTROL
@@ -1,5 +1,5 @@
Source: poco
-Version: 1.9.2
+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/portfile.cmake b/ports/poco/portfile.cmake
index 6d53a0048..4e7995a49 100644
--- a/ports/poco/portfile.cmake
+++ b/ports/poco/portfile.cmake
@@ -13,8 +13,8 @@ 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
@@ -24,6 +24,10 @@ vcpkg_from_github(
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)
@@ -43,7 +47,7 @@ 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
@@ -63,7 +67,6 @@ vcpkg_configure_cmake(
-DENABLE_MONGODB=ON
# -DPOCO_ENABLE_SQL_SQLITE=ON # SQLITE are not supported.
-DENABLE_REDIS=ON
- -DENABLE_PDF=ON
-DENABLE_UTIL=ON
-DENABLE_NET=ON
-DENABLE_SEVENZIP=ON
@@ -118,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)
diff --git a/ports/poco/unbundled_pdf.patch b/ports/poco/unbundled_pdf.patch
deleted file mode 100644
index e7f88f035..000000000
--- a/ports/poco/unbundled_pdf.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/PDF/CMakeLists.txt b/PDF/CMakeLists.txt
-index 3e44906..ae8fe6e 100644
---- a/PDF/CMakeLists.txt
-+++ b/PDF/CMakeLists.txt
-@@ -97,6 +97,8 @@ POCO_SOURCES(SRCS hpdf
-
- # TODO: Currently only bundled is supported, in future this should also be possible
- # with an unbundled version of libpng
-+find_package(PNG REQUIRED)
-+if (0)
- POCO_SOURCES( SRCS libpng
- src/png.c
- src/pngerror.c
-@@ -117,6 +119,7 @@ POCO_SOURCES( SRCS libpng
- src/pngwtran.c
- src/pngwutil.c
- )
-+endif(0)
-
- # Version Resource
- if(MSVC AND NOT POCO_STATIC)
-@@ -136,7 +139,7 @@ set_target_properties( "${LIBNAME}"
- DEFINE_SYMBOL PDF_EXPORTS
- )
-
--target_link_libraries( "${LIBNAME}" ${SYSLIBS} XML Util Foundation )
-+target_link_libraries( "${LIBNAME}" ${SYSLIBS} XML Util Foundation ${PNG_LIBRARIES})
- target_include_directories( "${LIBNAME}"
- PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
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()
+