From 22108321c032c7417e98ba6afc0d72f91042a40a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 17 Nov 2016 00:28:54 -0800 Subject: [pcre] [poco] Hardcode value of PCRE_STATIC into the pcre headers. Switch poco to use unbundled libs. --- ports/pcre/CONTROL | 2 +- ports/pcre/portfile.cmake | 10 ++++++++++ ports/poco/CONTROL | 4 ++-- ports/poco/portfile.cmake | 7 +------ 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ports/pcre/CONTROL b/ports/pcre/CONTROL index eb6863b38..cf6d6c2a5 100644 --- a/ports/pcre/CONTROL +++ b/ports/pcre/CONTROL @@ -1,4 +1,4 @@ Source: pcre -Version: 8.38 +Version: 8.38-1 Description: Perl Compatible Regular Expresions Build-Depends: zlib diff --git a/ports/pcre/portfile.cmake b/ports/pcre/portfile.cmake index 0dcc8a97c..8fd6c8819 100644 --- a/ports/pcre/portfile.cmake +++ b/ports/pcre/portfile.cmake @@ -32,6 +32,16 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +foreach(FILE ${CURRENT_PACKAGES_DIR}/include/pcre.h ${CURRENT_PACKAGES_DIR}/include/pcreposix.h) + file(READ ${FILE} PCRE_H) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(PCRE_STATIC)" "1" PCRE_H "${PCRE_H}") + else() + string(REPLACE "defined(PCRE_STATIC)" "0" PCRE_H "${PCRE_H}") + endif() + file(WRITE ${FILE} "${PCRE_H}") +endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index 71e55eb6c..2265e1f08 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,4 +1,4 @@ Source: poco -Version: 1.7.6 -Build-Depends: +Version: 1.7.6-1 +Build-Depends: zlib, pcre, sqlite3, expat Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. \ No newline at end of file diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index cb5b7f139..d89323a2a 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -14,17 +14,12 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/config_h.patch ) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(POCO_STATIC ON) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DPOCO_STATIC=${POCO_STATIC} -DENABLE_SEVENZIP=ON -DENABLE_TESTS=OFF - -DPOCO_UNBUNDLED=OFF # OFF means: using internal copy of sqlite, libz, pcre, expat, ... + -DPOCO_UNBUNDLED=ON # OFF means: using internal copy of sqlite, libz, pcre, expat, ... ) vcpkg_install_cmake() -- cgit v1.2.3