git: b5dcd105463f - main - graphics/ctl: fix compatibility with OpenEXR 3.3.0

From: Matthias Andree <mandree_at_FreeBSD.org>
Date: Sun, 13 Oct 2024 15:22:55 UTC
The branch main has been updated by mandree:

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

commit b5dcd105463fac266d9148ad942e5e7846f8c59f
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2024-10-04 08:50:13 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2024-10-13 13:55:00 +0000

    graphics/ctl: fix compatibility with OpenEXR 3.3.0
    
    and fix complaint about clamp() call being ambiguous. Use std::clamp() instead.
---
 .../ctl/files/patch-OpenEXR__CTL_exrdpx_exrToDpx.cpp  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/graphics/ctl/files/patch-OpenEXR__CTL_exrdpx_exrToDpx.cpp b/graphics/ctl/files/patch-OpenEXR__CTL_exrdpx_exrToDpx.cpp
new file mode 100644
index 000000000000..cd6d7ca72421
--- /dev/null
+++ b/graphics/ctl/files/patch-OpenEXR__CTL_exrdpx_exrToDpx.cpp
@@ -0,0 +1,19 @@
+--- OpenEXR_CTL/exrdpx/exrToDpx.cpp.orig	2024-01-04 19:41:17 UTC
++++ OpenEXR_CTL/exrdpx/exrToDpx.cpp
+@@ -169,13 +169,13 @@ writePixels
+ 	    const Rgba &pixel = pixels[y][x];
+ 
+ 	    unsigned int r =
+-		(unsigned int) (clamp (float (pixel.r), 0.0f, 1023.0f) + 0.5f);
++		(unsigned int) (std::clamp (float (pixel.r), 0.0f, 1023.0f) + 0.5f);
+ 
+ 	    unsigned int g =
+-		(unsigned int) (clamp (float (pixel.g), 0.0f, 1023.0f) + 0.5f);
++		(unsigned int) (std::clamp (float (pixel.g), 0.0f, 1023.0f) + 0.5f);
+ 
+ 	    unsigned int b =
+-		(unsigned int) (clamp (float (pixel.b), 0.0f, 1023.0f) + 0.5f);
++		(unsigned int) (std::clamp (float (pixel.b), 0.0f, 1023.0f) + 0.5f);
+ 
+ 	    unsigned int word = (r << 22) | (g << 12) | (b << 2);
+