From 1902e652a7adc5018e435b4a5e6fdcd18d7d924a Mon Sep 17 00:00:00 2001 From: qudix <17361645+qudix@users.noreply.github.com> Date: Sat, 16 Mar 2024 19:39:45 -0500 Subject: [PATCH] rapidxml: add package (#3529) * rapidxml: add package * rapidxml: fix dir * xpack: use rapidxml package * rapidxml: small tweak --- packages/r/rapidxml/xmake.lua | 22 ++++++++++++++++++++++ packages/x/xpack/xmake.lua | 3 +-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 packages/r/rapidxml/xmake.lua diff --git a/packages/r/rapidxml/xmake.lua b/packages/r/rapidxml/xmake.lua new file mode 100644 index 000000000..925f5ec02 --- /dev/null +++ b/packages/r/rapidxml/xmake.lua @@ -0,0 +1,22 @@ +package("rapidxml") + set_kind("library", {headeronly = true}) + set_homepage("https://sourceforge.net/projects/rapidxml") + set_description("An attempt to create the fastest XML parser possible") + set_license("MIT") + + set_urls("https://sourceforge.net/projects/rapidxml/files/rapidxml/rapidxml%20$(version)/rapidxml-$(version).zip") + + add_versions("1.13", "c3f0b886374981bb20fabcf323d755db4be6dba42064599481da64a85f5b3571") + + on_install(function (package) + os.vcp("**.hpp", package:installdir("include", "rapidxml")) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + static void test() { + rapidxml::xml_document<> doc; + doc.parse<0>(""); + } + ]]}, { includes = "rapidxml/rapidxml.hpp" })) + end) diff --git a/packages/x/xpack/xmake.lua b/packages/x/xpack/xmake.lua index dd43d7498..bc24b0c1e 100644 --- a/packages/x/xpack/xmake.lua +++ b/packages/x/xpack/xmake.lua @@ -9,10 +9,9 @@ package("xpack") add_versions("v1.0.5", "ea8693dd3a53d54e0c1e3c9e6e06f31ff7f593f7f8cf8fb4889f5c3354dbae8e") - add_deps("rapidjson") + add_deps("rapidjson", "rapidxml") on_install(function (package) - os.cp("rapidxml", package:installdir("include")) os.cp("*.h", package:installdir("include", "xpack")) end)