aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/rapidxml
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/rapidxml')
-rw-r--r--vcpkg/ports/rapidxml/0001-fix-for-a-bug-in-gcc-that-won-t-let-rapidxml-compile.patch37
-rw-r--r--vcpkg/ports/rapidxml/msvc-alloc_func.diff14
-rw-r--r--vcpkg/ports/rapidxml/portfile.cmake17
-rw-r--r--vcpkg/ports/rapidxml/vcpkg.json7
4 files changed, 75 insertions, 0 deletions
diff --git a/vcpkg/ports/rapidxml/0001-fix-for-a-bug-in-gcc-that-won-t-let-rapidxml-compile.patch b/vcpkg/ports/rapidxml/0001-fix-for-a-bug-in-gcc-that-won-t-let-rapidxml-compile.patch
new file mode 100644
index 0000000..ee62a79
--- /dev/null
+++ b/vcpkg/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 <ferdinand.niedermann@gmail.com>
+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<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_element_node(OutIt out, const xml_node<Ch> *node, int flags, int indent);
++ 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_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)
+--
+1.8.4
+
diff --git a/vcpkg/ports/rapidxml/msvc-alloc_func.diff b/vcpkg/ports/rapidxml/msvc-alloc_func.diff
new file mode 100644
index 0000000..82a22b9
--- /dev/null
+++ b/vcpkg/ports/rapidxml/msvc-alloc_func.diff
@@ -0,0 +1,14 @@
+diff --git a/rapidxml.hpp b/rapidxml.hpp
+index ae91e08..853bc36 100644
+--- a/rapidxml.hpp
++++ b/rapidxml.hpp
+@@ -382,7 +382,7 @@ namespace rapidxml
+ public:
+
+ //! \cond internal
+- typedef void *(alloc_func)(std::size_t); // Type of user-defined function used to allocate memory
+- typedef void (free_func)(void *); // Type of user-defined function used to free memory
++ typedef void * alloc_func(std::size_t); // Type of user-defined function used to allocate memory
++ typedef void free_func(void *); // Type of user-defined function used to free memory
+ //! \endcond
+
diff --git a/vcpkg/ports/rapidxml/portfile.cmake b/vcpkg/ports/rapidxml/portfile.cmake
new file mode 100644
index 0000000..5f3d29b
--- /dev/null
+++ b/vcpkg/ports/rapidxml/portfile.cmake
@@ -0,0 +1,17 @@
+#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/
+ msvc-alloc_func.diff # rapidxml.hpp(385): error C2059: syntax error: '<parameter-list>'
+)
+
+# 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/vcpkg/ports/rapidxml/vcpkg.json b/vcpkg/ports/rapidxml/vcpkg.json
new file mode 100644
index 0000000..c79bb53
--- /dev/null
+++ b/vcpkg/ports/rapidxml/vcpkg.json
@@ -0,0 +1,7 @@
+{
+ "name": "rapidxml",
+ "version": "1.13",
+ "port-version": 8,
+ "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"
+}