Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jan 2025 04:25:02 GMT
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: bb5cb7bb00e8 - 2025Q1 - emulators/rpcs3: unbreak build after b566fcf015cd
Message-ID:  <202501160425.50G4P21o051505@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2025Q1 has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bb5cb7bb00e8d2e78bb51e78fe440babb5eb8022

commit bb5cb7bb00e8d2e78bb51e78fe440babb5eb8022
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2025-01-16 04:04:39 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2025-01-16 04:04:43 +0000

    emulators/rpcs3: unbreak build after b566fcf015cd
    
    Utilities/rXml.cpp:56:47: error: no matching member function for call to 'attribute'
                    if (const pugi::xml_attribute attr = handle.attribute(name))
                                                         ~~~~~~~^~~~~~~~~
    /usr/local/include/pugixml.hpp:546:17: note: candidate function not viable: no known conversion from 'std::string_view' (aka 'basic_string_view<char>') to 'const char_t *' (aka 'const char *') for 1st argument
                    xml_attribute attribute(const char_t* name) const;
                                  ^
    /usr/local/include/pugixml.hpp:551:17: note: candidate function not viable: requires 2 arguments, but 1 was provided
                    xml_attribute attribute(const char_t* name, xml_attribute& hint) const;
                                  ^
    
    Reported by:    pkg-fallout
    (direct commit to 2025Q1 as bbc08dcb46a3 is missing on the branch)
---
 emulators/rpcs3/files/patch-pugixml-1.14 | 69 ++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/emulators/rpcs3/files/patch-pugixml-1.14 b/emulators/rpcs3/files/patch-pugixml-1.14
new file mode 100644
index 000000000000..c22392a8a9c0
--- /dev/null
+++ b/emulators/rpcs3/files/patch-pugixml-1.14
@@ -0,0 +1,69 @@
+Revert https://github.com/RPCS3/rpcs3/commit/196617183870
+until textproc/pugixml >= 1.15 update
+
+--- Utilities/File.cpp.orig	2025-01-15 23:43:33 UTC
++++ Utilities/File.cpp
+@@ -21,7 +21,7 @@ using namespace std::literals::string_literals;
+ #include <cwchar>
+ #include <Windows.h>
+ 
+-static std::unique_ptr<wchar_t[]> to_wchar(std::string_view source)
++static std::unique_ptr<wchar_t[]> to_wchar(const std::string& source)
+ {
+ 	// String size + null terminator
+ 	const usz buf_size = source.size() + 1;
+@@ -44,7 +44,7 @@ static std::unique_ptr<wchar_t[]> to_wchar(std::string
+ 		std::memcpy(buffer.get() + 32768 + 4, L"UNC\\", 4 * sizeof(wchar_t));
+ 	}
+ 
+-	ensure(MultiByteToWideChar(CP_UTF8, 0, source.data(), size, buffer.get() + 32768 + (unc ? 8 : 4), size)); // "to_wchar"
++	ensure(MultiByteToWideChar(CP_UTF8, 0, source.c_str(), size, buffer.get() + 32768 + (unc ? 8 : 4), size)); // "to_wchar"
+ 
+ 	// Canonicalize wide path (replace '/', ".", "..", \\ repetitions, etc)
+ 	ensure(GetFullPathNameW(buffer.get() + 32768, 32768, buffer.get(), nullptr) - 1 < 32768 - 1); // "to_wchar"
+--- Utilities/rXml.cpp.orig	2025-01-15 23:43:33 UTC
++++ Utilities/rXml.cpp
+@@ -49,11 +49,12 @@ std::string rXmlNode::GetName()
+ 	return {};
+ }
+ 
+-std::string rXmlNode::GetAttribute(std::string_view name)
++std::string rXmlNode::GetAttribute(const std::string& name)
+ {
+ 	if (handle)
+ 	{
+-		if (const pugi::xml_attribute attr = handle.attribute(name))
++		const auto pred = [&name](const pugi::xml_attribute& attr) { return (name == attr.name()); };
++		if (const pugi::xml_attribute attr = handle.find_attribute(pred))
+ 		{
+ 			if (const pugi::char_t* value = attr.value())
+ 			{
+@@ -85,7 +86,7 @@ rXmlDocument::rXmlDocument()
+ {
+ }
+ 
+-pugi::xml_parse_result rXmlDocument::Read(std::string_view data)
++pugi::xml_parse_result rXmlDocument::Read(const std::string& data)
+ {
+ 	if (handle)
+ 	{
+--- Utilities/rXml.h.orig	2025-01-15 23:43:33 UTC
++++ Utilities/rXml.h
+@@ -23,7 +23,7 @@ struct rXmlNode
+ 	std::shared_ptr<rXmlNode> GetChildren();
+ 	std::shared_ptr<rXmlNode> GetNext();
+ 	std::string GetName();
+-	std::string GetAttribute(std::string_view name);
++	std::string GetAttribute(const std::string& name);
+ 	std::string GetNodeContent();
+ 
+ 	pugi::xml_node handle{};
+@@ -34,7 +34,7 @@ struct rXmlDocument
+ 	rXmlDocument();
+ 	rXmlDocument(const rXmlDocument& other) = delete;
+ 	rXmlDocument &operator=(const rXmlDocument& other) = delete;
+-	pugi::xml_parse_result Read(std::string_view data);
++	pugi::xml_parse_result Read(const std::string& data);
+ 	virtual std::shared_ptr<rXmlNode> GetRoot();
+ 
+ 	pugi::xml_document handle{};



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501160425.50G4P21o051505>