From 3fc65fa6cfd722220da4ca3f4629cfc8e59df58c Mon Sep 17 00:00:00 2001 From: Roel Standaert Date: Fri, 21 Aug 2020 19:39:52 +0200 Subject: [PATCH] [wt] Update to 4.4.0 (#13005) --- ports/wt/0003-disable-boost-autolink.patch | 13 ----- ports/wt/0004-link-ssl.patch | 30 ----------- ports/wt/0006-GraphicsMagick.patch | 29 +++++++++++ ports/wt/CONTROL | 28 ++++++++++- ports/wt/portfile.cmake | 58 ++++++++++++++++------ 5 files changed, 99 insertions(+), 59 deletions(-) delete mode 100644 ports/wt/0003-disable-boost-autolink.patch delete mode 100644 ports/wt/0004-link-ssl.patch create mode 100644 ports/wt/0006-GraphicsMagick.patch diff --git a/ports/wt/0003-disable-boost-autolink.patch b/ports/wt/0003-disable-boost-autolink.patch deleted file mode 100644 index 9f7069b6ef..0000000000 --- a/ports/wt/0003-disable-boost-autolink.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/WtFindBoost.txt b/cmake/WtFindBoost.txt -index e86fd7e..a017f6f 100644 ---- a/cmake/WtFindBoost.txt -+++ b/cmake/WtFindBoost.txt -@@ -122,7 +122,7 @@ IF (Boost_FOUND) - SET(BOOST_WTHTTP_MT_FOUND TRUE) - SET(BOOST_WTHTTP_FOUND TRUE) - -- IF(MSVC AND Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION LESS 70) -+ IF(0) - # use autolink - SET(BOOST_WT_LIBRARIES "") - SET(BOOST_WTHTTP_LIBRARIES "") diff --git a/ports/wt/0004-link-ssl.patch b/ports/wt/0004-link-ssl.patch deleted file mode 100644 index c9efc480b1..0000000000 --- a/ports/wt/0004-link-ssl.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index bd3b506..560ffb2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -546,6 +546,12 @@ IF(ENABLE_HARU AND HARU_FOUND) - SET(WT_HAS_WPDFIMAGE true) - ENDIF(ENABLE_HARU AND HARU_FOUND) - -+if (WIN32) -+ add_definitions(-DWT_WIN32) -+endif() -+find_package(OpenSSL REQUIRED) -+set(OPENSSL_FOUND OpenSSL_FOUND) -+set(OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto) - IF(ENABLE_SSL AND OPENSSL_FOUND) - SET(HAVE_SSL ON) - SET(WT_WITH_SSL true) -diff --git a/src/isapi/IsapiRequest.h b/src/isapi/IsapiRequest.h -index 6c788e2..3f8d213 100644 ---- a/src/isapi/IsapiRequest.h -+++ b/src/isapi/IsapiRequest.h -@@ -1,5 +1,8 @@ - #include "WebRequest.h" - #include -+#ifdef _WIN32 -+#include -+#endif - #include - - namespace Wt { diff --git a/ports/wt/0006-GraphicsMagick.patch b/ports/wt/0006-GraphicsMagick.patch new file mode 100644 index 0000000000..2f1b50a60c --- /dev/null +++ b/ports/wt/0006-GraphicsMagick.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5012cfd1b..95f812685 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -338,7 +338,7 @@ ELSE (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 8) + ENDIF (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 8) + + IF (${WT_WRASTERIMAGE_IMPLEMENTATION} STREQUAL "GraphicsMagick") +- IF (NOT GM_FOUND) ++ IF (0) + MESSAGE(FATAL_ERROR "WT_WRASTERIMAGE_IMPLEMENTATION set to GraphicsMagick but GM is not found. Indicate the location of your graphicsmagick library using -DGM_PREFIX=...") + ENDIF (NOT GM_FOUND) + SET(WT_HAS_WRASTERIMAGE true) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 78d82ee53..01ac5f42a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -595,8 +595,9 @@ ELSE(HAVE_HARU) + ENDIF(HAVE_HARU) + + IF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "GraphicsMagick") +- TARGET_LINK_LIBRARIES(wt PRIVATE ${GM_LIBRARIES}) +- INCLUDE_DIRECTORIES(${GM_INCLUDE_DIRS}) ++ find_package(unofficial-graphicsmagick REQUIRED) ++ TARGET_LINK_LIBRARIES(wt PRIVATE unofficial::graphicsmagick::graphicsmagick) ++ # INCLUDE_DIRECTORIES(${GM_INCLUDE_DIRS}) + ADD_DEFINITIONS(-DHAVE_GRAPHICSMAGICK) + ELSEIF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "skia") + TARGET_LINK_LIBRARIES(wt PRIVATE ${SKIA_LIBRARIES}) diff --git a/ports/wt/CONTROL b/ports/wt/CONTROL index 6a8b959a67..c8ea4d02c5 100644 --- a/ports/wt/CONTROL +++ b/ports/wt/CONTROL @@ -1,5 +1,29 @@ Source: wt -Version: 4.2.2 +Version: 4.4.0 Homepage: https://github.com/emweb/wt Description: Wt is a C++ library for developing web applications -Build-Depends: openssl, sqlite3, libpq, pango, glew, boost-date-time, boost-regex, boost-program-options, boost-signals, boost-system, boost-filesystem, boost-thread, boost-random, boost-multi-index, boost-signals2, boost-asio, boost-ublas, boost-conversion, boost-array, boost-smart-ptr, boost-tuple, boost-algorithm, boost-logic, boost-interprocess +Build-Depends: zlib, libpng, pango (!windows), harfbuzz (!windows), libharu, glew, boost-algorithm, boost-array, boost-asio, boost-bind, boost-config, boost-container-hash, boost-filesystem, boost-fusion, boost-interprocess, boost-lexical-cast, boost-logic, boost-math, boost-multi-index, boost-optional, boost-phoenix, boost-pool, boost-program-options, boost-range, boost-serialization, boost-smart-ptr, boost-spirit, boost-system, boost-thread, boost-tokenizer, boost-tuple, boost-ublas, boost-variant +Default-Features: openssl + +Feature: dbo +Description: Wt::Dbo + +Feature: postgresql +Description: Wt::Dbo PostgreSQL backend +Build-Depends: libpq, wt[dbo] + +Feature: sqlite3 +Description: Wt::Dbo Sqlite 3 backend +Build-Depends: sqlite3, wt[dbo] + +Feature: sqlserver +Description: Wt::Dbo MS SQL Server backend +Build-Depends: unixodbc (!windows), wt[dbo] + +Feature: openssl +Description: TLS support +Build-Depends: openssl + +Feature: graphicsmagick +Description: WRasterImage support on non-Windows based on GraphicsMagick +Build-Depends: graphicsmagick diff --git a/ports/wt/portfile.cmake b/ports/wt/portfile.cmake index 4e8eed349a..f324772210 100644 --- a/ports/wt/portfile.cmake +++ b/ports/wt/portfile.cmake @@ -1,39 +1,69 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO emweb/wt - REF 3ade528163850b3fd90fac2a31f5e0699342a1a5 # 4.2.2 - SHA512 44c629ca2f3cb129b02d6713814a15620d62070e9937c33e7b5f637a08c59875c721d6ac36963a84c99dab4124c3db4f52d78870f8adaab48d863c60b7dcbf05 + REF 9c6b7807b4fdaefe659ff9ab8ff4ba3937e62b2f # 4.4.0 + SHA512 d9947180bb82750f9fa81212d343e8a719e6085e4c41327fd178ce0f93c5ef0f5a11e64d066871ac339abc973081cbd9580042fb8625f3cf3738a722439ba1e3 HEAD_REF master PATCHES 0002-link-glew.patch - 0003-disable-boost-autolink.patch - 0004-link-ssl.patch - 0005-XML_file_path.patch + 0005-XML_file_path.patch + 0006-GraphicsMagick.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIBS) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + dbo ENABLE_LIBWTDBO + postgresql ENABLE_POSTGRES + sqlite3 ENABLE_SQLITE + sqlserver ENABLE_MSSQLSERVER + openssl ENABLE_SSL +) + +if(VCPKG_TARGET_IS_WINDOWS) + set(WT_PLATFORM_SPECIFIC_OPTIONS + -DWT_WRASTERIMAGE_IMPLEMENTATION=Direct2D + -DCONNECTOR_ISAPI=ON + -DENABLE_PANGO=OFF) +else() + set(WT_PLATFORM_SPECIFIC_OPTIONS + -DCONNECTOR_FCGI=OFF + -DENABLE_PANGO=ON + -DHARFBUZZ_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/harfbuzz) + + if ("graphicsmagick" IN_LIST FEATURES) + list(APPEND WT_PLATFORM_SPECIFIC_OPTIONS + -DWT_WRASTERIMAGE_IMPLEMENTATION=GraphicsMagick) + else() + list(APPEND WT_PLATFORM_SPECIFIC_OPTIONS + -DWT_WRASTERIMAGE_IMPLEMENTATION=none) + endif() +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DINSTALL_CONFIG_FILE_PATH="${DOWNLOADS}/wt" + -DINSTALL_CONFIG_FILE_PATH="${DOWNLOADS}/wt" -DSHARED_LIBS=${SHARED_LIBS} - -DBOOST_DYNAMIC=ON + -DBOOST_DYNAMIC=${SHARED_LIBS} -DDISABLE_BOOST_AUTOLINK=ON -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF - -DENABLE_SSL=ON - -DENABLE_HARU=OFF - -DENABLE_PANGO=ON - -DENABLE_SQLITE=ON - -DENABLE_POSTGRES=ON - -DENABLE_FIREBIRD=OFF + -DCONNECTOR_HTTP=ON + -DENABLE_HARU=ON + -DHARU_DYNAMIC=${SHARED_LIBS} -DENABLE_MYSQL=OFF + -DENABLE_FIREBIRD=OFF -DENABLE_QT4=OFF - -DENABLE_LIBWTTEST=OFF + -DENABLE_QT5=OFF + -DENABLE_LIBWTTEST=ON -DENABLE_OPENGL=ON + ${FEATURE_OPTIONS} + ${WT_PLATFORM_SPECIFIC_OPTIONS} + -DUSE_SYSTEM_SQLITE3=ON -DUSE_SYSTEM_GLEW=ON