git: 445155586d06 - main - multimedia/kodi: Fix build with new devel/libfmt (9.1.0)

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Fri, 23 Dec 2022 18:59:43 UTC
The branch main has been updated by eduardo:

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

commit 445155586d0641fda327daffffc0044723eb0d18
Author:     yzrh <yzrh@noema.org>
AuthorDate: 2022-12-23 18:57:37 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-12-23 18:59:12 +0000

    multimedia/kodi: Fix build with new devel/libfmt (9.1.0)
    
     - pet portlint
    
    PR:             268496
---
 multimedia/kodi/Makefile                           |  7 +++--
 multimedia/kodi/files/patch-xbmc_utils_GLUtils.cpp | 35 ++++++++++++++++++++++
 .../patch-xbmc_windowing_X11_WinSystemX11.cpp      | 14 +++++++++
 3 files changed, 53 insertions(+), 3 deletions(-)

diff --git a/multimedia/kodi/Makefile b/multimedia/kodi/Makefile
index ee62a8715793..7905f348af35 100644
--- a/multimedia/kodi/Makefile
+++ b/multimedia/kodi/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	kodi
 DISTVERSION=	19.4
-PORTREVISION=	7
+PORTREVISION=	8
 CATEGORIES=	multimedia java
 
 MAINTAINER=	yzrh@noema.org
@@ -40,8 +40,9 @@ LIB_DEPENDS=	libass.so:multimedia/libass \
 		libtinyxml.so:textproc/tinyxml \
 		libuuid.so:misc/e2fsprogs-libuuid
 
-USES=		autoreconf:build cpe cmake:noninja compiler:c++17-lang gettext \
-		gmake gnome iconv jpeg libtool pkgconfig python:3.7+ sqlite ssl
+USES=		autoreconf:build cmake:noninja compiler:c++17-lang cpe \
+		desktop-file-utils gettext gmake gnome iconv jpeg libtool \
+		pkgconfig python:3.7+ sqlite ssl
 
 KODI_CODENAME=	Matrix
 LIBDVDCSS_VERSION=	1.4.2-Leia-Beta-5
diff --git a/multimedia/kodi/files/patch-xbmc_utils_GLUtils.cpp b/multimedia/kodi/files/patch-xbmc_utils_GLUtils.cpp
new file mode 100644
index 000000000000..20102549bc79
--- /dev/null
+++ b/multimedia/kodi/files/patch-xbmc_utils_GLUtils.cpp
@@ -0,0 +1,35 @@
+--- xbmc/utils/GLUtils.cpp.orig	2022-12-21 00:14:18 UTC
++++ xbmc/utils/GLUtils.cpp
+@@ -148,27 +148,27 @@ void _VerifyGLState(const char* szfile, const char* sz
+ void LogGraphicsInfo()
+ {
+ #if defined(HAS_GL) || defined(HAS_GLES)
+-  const GLubyte *s;
++  const char *s;
+ 
+-  s = glGetString(GL_VENDOR);
++  s = reinterpret_cast<const char*>(glGetString(GL_VENDOR));
+   if (s)
+     CLog::Log(LOGINFO, "GL_VENDOR = %s", s);
+   else
+     CLog::Log(LOGINFO, "GL_VENDOR = NULL");
+ 
+-  s = glGetString(GL_RENDERER);
++  s = reinterpret_cast<const char*>(glGetString(GL_RENDERER));
+   if (s)
+     CLog::Log(LOGINFO, "GL_RENDERER = %s", s);
+   else
+     CLog::Log(LOGINFO, "GL_RENDERER = NULL");
+ 
+-  s = glGetString(GL_VERSION);
++  s = reinterpret_cast<const char*>(glGetString(GL_VERSION));
+   if (s)
+     CLog::Log(LOGINFO, "GL_VERSION = %s", s);
+   else
+     CLog::Log(LOGINFO, "GL_VERSION = NULL");
+ 
+-  s = glGetString(GL_SHADING_LANGUAGE_VERSION);
++  s = reinterpret_cast<const char*>(glGetString(GL_SHADING_LANGUAGE_VERSION));
+   if (s)
+     CLog::Log(LOGINFO, "GL_SHADING_LANGUAGE_VERSION = %s", s);
+   else
diff --git a/multimedia/kodi/files/patch-xbmc_windowing_X11_WinSystemX11.cpp b/multimedia/kodi/files/patch-xbmc_windowing_X11_WinSystemX11.cpp
new file mode 100644
index 000000000000..1cd0f0b6faf0
--- /dev/null
+++ b/multimedia/kodi/files/patch-xbmc_windowing_X11_WinSystemX11.cpp
@@ -0,0 +1,14 @@
+--- xbmc/windowing/X11/WinSystemX11.cpp.orig	2022-12-21 00:19:40 UTC
++++ xbmc/windowing/X11/WinSystemX11.cpp
+@@ -1038,7 +1038,10 @@ bool CWinSystemX11::HasWindowManager()
+ 
+   if(status == Success && items_read)
+   {
+-    CLog::Log(LOGDEBUG,"Window Manager Name: %s", data);
++    const char* s;
++
++    s = reinterpret_cast<const char*>(data);
++    CLog::Log(LOGDEBUG,"Window Manager Name: {}", s);
+   }
+   else
+     CLog::Log(LOGDEBUG,"Window Manager Name: ");