-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rapidxml] Fix gcc and clang build issue #43199
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
86a10b6
Apply patch to allow rapidxml to build with gcc and clang, some tidy …
tartanpaint ce24883
Increase port version
tartanpaint 4f0794a
Update version database
tartanpaint 82cd893
Reference the official patch submitted to rapidxml for https://source…
tartanpaint 2b7bfee
Update version database
tartanpaint File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Subject: [PATCH] Fix clang and gcc compilation | ||
|
||
--- | ||
rapidxml_print.hpp | 28 +++++++++++++++++++ | ||
1 file changed, 28 insertions(+) | ||
|
||
diff --git a/rapidxml_print.hpp b/rapidxml_print.hpp | ||
index 0ae2b14faa..e8439f3d78 100644 | ||
--- a/rapidxml_print.hpp | ||
+++ b/rapidxml_print.hpp | ||
@@ -102,6 +102,34 @@ namespace rapidxml | ||
/////////////////////////////////////////////////////////////////////////// | ||
// Internal printing operations | ||
|
||
+ // FIX FOR CLANG BUILD - NEED TO DECLARE THESE METHODS BEFORE print_node | ||
+ template<class OutIt, class Ch> | ||
+ inline OutIt print_children(OutIt out, const xml_node<Ch> *node, int flags, int indent); | ||
+ | ||
+ template<class OutIt, class Ch> | ||
+ inline OutIt print_attributes(OutIt out, const xml_node<Ch> *node, int flags); | ||
+ | ||
+ template<class OutIt, class Ch> | ||
+ inline OutIt print_data_node(OutIt out, const xml_node<Ch> *node, int flags, int indent); | ||
+ | ||
+ template<class OutIt, class Ch> | ||
+ inline OutIt print_cdata_node(OutIt out, const xml_node<Ch> *node, int flags, int indent); | ||
+ | ||
+ template<class OutIt, class Ch> | ||
+ inline OutIt print_element_node(OutIt out, const xml_node<Ch> *node, int flags, int indent); | ||
+ | ||
+ template<class OutIt, class Ch> | ||
+ inline OutIt print_declaration_node(OutIt out, const xml_node<Ch> *node, int flags, int indent); | ||
+ | ||
+ template<class OutIt, class Ch> | ||
+ inline OutIt print_comment_node(OutIt out, const xml_node<Ch> *node, int flags, int indent); | ||
+ | ||
+ template<class OutIt, class Ch> | ||
+ inline OutIt print_doctype_node(OutIt out, const xml_node<Ch> *node, int flags, int indent); | ||
+ | ||
+ template<class OutIt, class Ch> | ||
+ inline OutIt print_pi_node(OutIt out, const xml_node<Ch> *node, int flags, int indent); | ||
+ | ||
// Print node | ||
template<class OutIt, class Ch> | ||
inline OutIt print_node(OutIt out, const xml_node<Ch> *node, int flags, int indent) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
Fix-clang-gcc-compilation.patch # Fix clang and gcc builds | ||
) | ||
|
||
# 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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has this patch been submitted upstream? See our policy regarding patches
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An equivalent patch was submitted to the rapdixml project on 2013-09-21, but there have not been any rapidxml releases since 2013-04-26
https://sourceforge.net/p/rapidxml/bugs/16/
If preferred, I can include the exact patch from that link with adjusted paths and a comment referencing this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated this PR with the "official" patch submitted to rapidxml via https://sourceforge.net/p/rapidxml/bugs/16/ with minor tweaks to the file paths to allow the patch to be applied via vcpkg.