From e04b4ed5b5ff5c1b61e5ce3d70ac101ffe3237c4 Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Wed, 12 Dec 2018 20:47:57 +0000 Subject: [PATCH] xalan-c: Remove use of obsolete unary_ and binary_function for C++17 compatibility (#4575) * xalan-c: Remove use of obsolete unary_ and binary_function for C++17 compatibility * [xerces-c] Improve port stability by adding control over ICU dependency --- ports/xalan-c/CONTROL | 2 +- ports/xalan-c/portfile.cmake | 14 ++++++++++++++ ports/xerces-c/CONTROL | 6 +++++- ports/xerces-c/portfile.cmake | 6 ++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ports/xalan-c/CONTROL b/ports/xalan-c/CONTROL index aa2345462b..eb882eb386 100644 --- a/ports/xalan-c/CONTROL +++ b/ports/xalan-c/CONTROL @@ -1,4 +1,4 @@ Source: xalan-c -Version: 1.11-4 +Version: 1.11-5 Description: Xalan is an XSLT processor for transforming XML documents into HTML, text, or other XML document types Build-Depends: xerces-c diff --git a/ports/xalan-c/portfile.cmake b/ports/xalan-c/portfile.cmake index 4c035260a4..e5a9a66548 100644 --- a/ports/xalan-c/portfile.cmake +++ b/ports/xalan-c/portfile.cmake @@ -10,6 +10,18 @@ vcpkg_download_distfile(ARCHIVE SHA512 2e79a2c8f755c9660ffc94b26b6bd4b140685e05a88d8e5abb19a2f271383a3f2f398b173ef403f65dc33af75206214bd21ac012c39b4c0051b3a9f61f642fe6 ) +vcpkg_download_distfile(XALAN_PATCH8 + URLS "https://github.com/rleigh-codelibre/vcpkg-patches/raw/ca09d69280469ce8f787c67b48f86e46a463ef5d/xalan-c/0008-remove-unary-binary-function.patch" + FILENAME "0008-remove-unary-binary-function.patch" + SHA512 059d9a39b29125ae770369e4c44ab7804ae16d4ff5c90e35f25b7990dc987161bf1187ceb2dcbab181ffb72490a9d9f45e30ab5928644734e7627cb74b03e201 +) + +vcpkg_download_distfile(XALAN_PATCH9 + URLS "https://raw.githubusercontent.com/rleigh-codelibre/vcpkg-patches/ca09d69280469ce8f787c67b48f86e46a463ef5d/xalan-c/0009-remove-select-workaround.patch" + FILENAME "0009-remove-select-workaround.patch" + SHA512 73730736cd1f1809ebcc35562017402d606cbfd5a64665d104a21d89d679ab3274f6f5685ab63305c57fffab74e62084c0e18c76d19eb5f9c2e36be6679fd4d3 +) + vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} @@ -22,6 +34,8 @@ vcpkg_extract_source_archive_ex( 0005-fix-ftbfs-ld-as-needed.patch 0006-fix-testxslt-segfault.patch 0007-fix-readme-typos.patch + ${XALAN_PATCH8} + ${XALAN_PATCH9} ) if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") diff --git a/ports/xerces-c/CONTROL b/ports/xerces-c/CONTROL index 006210e2fc..c5958f4a1d 100644 --- a/ports/xerces-c/CONTROL +++ b/ports/xerces-c/CONTROL @@ -1,3 +1,7 @@ Source: xerces-c -Version: 3.2.2-5 +Version: 3.2.2-6 Description: Xerces-C++ is a XML parser, for parsing, generating, manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs. + +Feature: icu +Description: ICU support +Build-Depends: icu diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake index b14981c749..80e56b0f6f 100644 --- a/ports/xerces-c/portfile.cmake +++ b/ports/xerces-c/portfile.cmake @@ -9,6 +9,11 @@ vcpkg_from_github( PATCHES disable-tests.patch ) +set(DISABLE_ICU ON) +if("icu" IN_LIST FEATURES) + set(DISABLE_ICU OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -16,6 +21,7 @@ vcpkg_configure_cmake( -DDISABLE_TESTS=ON -DDISABLE_DOC=ON -DDISABLE_SAMPLES=ON + -DCMAKE_DISABLE_FIND_PACKAGE_ICU=${DISABLE_ICU} ) vcpkg_install_cmake()