commit:     4afe1169372beb379f024cc5acdcdb2c48b6fe8b
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Mon Aug 22 23:42:01 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Aug 26 23:56:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4afe1169

app-misc/openrgb: fix build with dev-cpp/nlohmann_json-3.11.2

Closes: https://bugs.gentoo.org/865133
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 app-misc/openrgb/files/OpenRGB-0.7-json.patch | 24 ++++++++++++++++++++++++
 app-misc/openrgb/openrgb-0.7.ebuild           |  1 +
 2 files changed, 25 insertions(+)

diff --git a/app-misc/openrgb/files/OpenRGB-0.7-json.patch 
b/app-misc/openrgb/files/OpenRGB-0.7-json.patch
new file mode 100644
index 000000000000..32474f545dd0
--- /dev/null
+++ b/app-misc/openrgb/files/OpenRGB-0.7-json.patch
@@ -0,0 +1,24 @@
+Fix build with dev-cpp/nlohmann_json-3.11.2
+    
+https://bugs.gentoo.org/865133
+https://gitlab.com/CalcProgrammer1/OpenRGB/-/merge_requests/1376
+--- 
a/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USB.cpp
++++ 
b/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USB.cpp
+@@ -329,7 +329,7 @@ void RGBController_RGBFusion2USB::Load_Device_Config()
+     }
+     else
+     {
+-        
for(nlohmann::detail::iteration_proxy_value<nlohmann::detail::iter_impl<nlohmann::json>>&
 it : device_settings[SectionLayout].items())
++        for(const 
nlohmann::detail::iteration_proxy_value<nlohmann::detail::iter_impl<nlohmann::json>>&
 it : device_settings[SectionLayout].items())
+         {
+             MBName2Layout.insert( std::pair<std::string, 
std::string>(it.key(), it.value() ));
+         }
+@@ -380,7 +380,7 @@ void RGBController_RGBFusion2USB::Load_Device_Config()
+             json json_HCL = device_settings[SectionCustom]["Data"];
+             layout.clear();
+ 
+-            
for(nlohmann::detail::iteration_proxy_value<nlohmann::detail::iter_impl<nlohmann::json>>&
 json_layout_it : json_HCL.items())
++            for(const 
nlohmann::detail::iteration_proxy_value<nlohmann::detail::iter_impl<nlohmann::json>>&
 json_layout_it : json_HCL.items())
+             {
+                 json json_zl = json_layout_it.value();
+                 std::vector<LedPort> v_lp;

diff --git a/app-misc/openrgb/openrgb-0.7.ebuild 
b/app-misc/openrgb/openrgb-0.7.ebuild
index bbc124653d95..a8ef5e62540f 100644
--- a/app-misc/openrgb/openrgb-0.7.ebuild
+++ b/app-misc/openrgb/openrgb-0.7.ebuild
@@ -42,6 +42,7 @@ BDEPEND="
 PATCHES+=(
        "${FILESDIR}"/OpenRGB-0.7-plugins.patch
        "${FILESDIR}"/OpenRGB-0.7-udev.patch
+       "${FILESDIR}"/OpenRGB-0.7-json.patch
 )
 
 src_prepare() {

Reply via email to