From d4f3e122069912636c123b7ece673f6e01513cea Mon Sep 17 00:00:00 2001 From: tartanpaint <35690467+tartanpaint@users.noreply.github.com> Date: Tue, 14 Jan 2025 21:26:15 +0000 Subject: [PATCH] [rapidxml] Fix gcc and clang build issue (#43199) --- ...-gcc-that-won-t-let-rapidxml-compile.patch | 37 +++++++++++++++++++ ports/rapidxml/portfile.cmake | 31 ++++++++-------- ports/rapidxml/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/r-/rapidxml.json | 5 +++ 5 files changed, 60 insertions(+), 17 deletions(-) create mode 100644 ports/rapidxml/0001-fix-for-a-bug-in-gcc-that-won-t-let-rapidxml-compile.patch diff --git a/ports/rapidxml/0001-fix-for-a-bug-in-gcc-that-won-t-let-rapidxml-compile.patch b/ports/rapidxml/0001-fix-for-a-bug-in-gcc-that-won-t-let-rapidxml-compile.patch new file mode 100644 index 00000000000000..ee62a79fb28a19 --- /dev/null +++ b/ports/rapidxml/0001-fix-for-a-bug-in-gcc-that-won-t-let-rapidxml-compile.patch @@ -0,0 +1,37 @@ +From 2cf47bb8fb1de71bb2d2e059c15a30ffa4ca4cd6 Mon Sep 17 00:00:00 2001 +From: Ferdinand Niedermann +Date: Sat, 21 Sep 2013 01:55:58 +0200 +Subject: [PATCH] fix for a bug in gcc that won't let rapidxml compile on clang + +--- + rapidxml_print.hpp | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/rapidxml_print.hpp b/rapidxml_print.hpp +index d03d5f5..7ef305e 100755 +--- a/rapidxml_print.hpp ++++ b/rapidxml_print.hpp +@@ -102,6 +102,20 @@ namespace rapidxml + /////////////////////////////////////////////////////////////////////////// + // Internal printing operations + ++ // ===================================== ++ // fix for clang for this bug in gcc and others: http://sourceforge.net/p/rapidxml/bugs/16/ ++ ++ template inline OutIt print_children(OutIt out, const xml_node *node, int flags, int indent); ++ template inline OutIt print_element_node(OutIt out, const xml_node *node, int flags, int indent); ++ template inline OutIt print_data_node(OutIt out, const xml_node *node, int flags, int indent); ++ template inline OutIt print_cdata_node(OutIt out, const xml_node *node, int flags, int indent); ++ template inline OutIt print_declaration_node(OutIt out, const xml_node *node, int flags, int indent); ++ template inline OutIt print_comment_node(OutIt out, const xml_node *node, int flags, int indent); ++ template inline OutIt print_doctype_node(OutIt out, const xml_node *node, int flags, int indent); ++ template inline OutIt print_pi_node(OutIt out, const xml_node *node, int flags, int indent); ++ ++ // ===================================== ++ + // Print node + template + inline OutIt print_node(OutIt out, const xml_node *node, int flags, int indent) +-- +1.8.4 + diff --git a/ports/rapidxml/portfile.cmake b/ports/rapidxml/portfile.cmake index b13d1a2bc86e49..534bfe72665fa5 100644 --- a/ports/rapidxml/portfile.cmake +++ b/ports/rapidxml/portfile.cmake @@ -1,15 +1,16 @@ -#header-only library -vcpkg_from_sourceforge( - OUT_SOURCE_PATH SOURCE_PATH - REPO rapidxml/rapidxml - REF rapidxml%201.13 - FILENAME "rapidxml-1.13.zip" - SHA512 6c10583e6631ccdb0217d0a5381172cb4c1046226de6ef1acf398d85e81d145228e14c3016aefcd7b70a1db8631505b048d8b4f5d4b0dbf1811d2482eefdd265 -) - -# Handle copyright -file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidxml) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/rapidxml/license.txt ${CURRENT_PACKAGES_DIR}/share/rapidxml/copyright) - -# Copy the header files -file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/rapidxml FILES_MATCHING PATTERN "*.hpp") +#header-only library +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO rapidxml/rapidxml + REF rapidxml%20${VERSION} + FILENAME "rapidxml-${VERSION}.zip" + SHA512 6c10583e6631ccdb0217d0a5381172cb4c1046226de6ef1acf398d85e81d145228e14c3016aefcd7b70a1db8631505b048d8b4f5d4b0dbf1811d2482eefdd265 + PATCHES + 0001-fix-for-a-bug-in-gcc-that-won-t-let-rapidxml-compile.patch # https://sourceforge.net/p/rapidxml/bugs/16/ +) + +# Handle copyright +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/license.txt") + +# Copy the header files +file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/rapidxml FILES_MATCHING PATTERN "*.hpp") diff --git a/ports/rapidxml/vcpkg.json b/ports/rapidxml/vcpkg.json index 3b6225ce5ecf3e..d8b796f320a83a 100644 --- a/ports/rapidxml/vcpkg.json +++ b/ports/rapidxml/vcpkg.json @@ -1,7 +1,7 @@ { "name": "rapidxml", "version": "1.13", - "port-version": 6, + "port-version": 7, "description": "RapidXml is an attempt to create the fastest XML parser possible, while retaining useability, portability and reasonable W3C compatibility.", "homepage": "https://sourceforge.net/projects/rapidxml" } diff --git a/versions/baseline.json b/versions/baseline.json index 3e1647c75c49d0..779450899b4ef3 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7834,7 +7834,7 @@ }, "rapidxml": { "baseline": "1.13", - "port-version": 6 + "port-version": 7 }, "rapidxml-ns": { "baseline": "1.13.2", diff --git a/versions/r-/rapidxml.json b/versions/r-/rapidxml.json index feeda9e74c0b94..3e221262da20ac 100644 --- a/versions/r-/rapidxml.json +++ b/versions/r-/rapidxml.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "465505477fa97594a58e69f34a0c1a7fdccd9c59", + "version": "1.13", + "port-version": 7 + }, { "git-tree": "a460282de022af98f967771cdecab3efee97bc5d", "version": "1.13",