git: 0992c4952636 - main - graphics/glfw: Update to 3.3.9

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Thu, 14 Dec 2023 16:21:14 UTC
The branch main has been updated by eduardo:

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

commit 0992c4952636d55f804b91c45adf3958354bc8de
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2023-12-14 16:10:33 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-12-14 16:20:30 +0000

    graphics/glfw: Update to 3.3.9
    
    - Use temporary upstream patch to fix WAYLAND build
      https://github.com/glfw/glfw/issues/2445
    
    ChangeLog: https://github.com/glfw/glfw/releases/tag/3.3.9
---
 graphics/glfw/Makefile                  | 14 +++++++-------
 graphics/glfw/distinfo                  |  6 +++---
 graphics/glfw/files/patch-evdev-hack    | 32 ++++++++++++++++++++++++++++++++
 graphics/glfw/files/patch-src-wl_init.c | 26 --------------------------
 4 files changed, 42 insertions(+), 36 deletions(-)

diff --git a/graphics/glfw/Makefile b/graphics/glfw/Makefile
index 3904309dd594..21536ec16726 100644
--- a/graphics/glfw/Makefile
+++ b/graphics/glfw/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	glfw
-DISTVERSION=	3.3.8
+DISTVERSION=	3.3.9
 CATEGORIES=	graphics
 MASTER_SITES=	https://github.com/glfw/glfw/releases/download/${PORTVERSION}/
 
@@ -10,15 +10,14 @@ WWW=		https://www.glfw.org/
 LICENSE=	ZLIB
 LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
-USES=		cmake:insource gl localbase zip
-USE_GL=		glu
+USES=		cmake:insource localbase zip
 USE_LDCONFIG=	yes
 
 CMAKE_ON=	BUILD_SHARED_LIBS
 
 CONFLICTS_INSTALL=	glfw2
 
-PLIST_SUB=	MAJVER="${DISTVERSION:C|\..*||}" \
+PLIST_SUB=	MAJVER=${DISTVERSION:R:R} \
 		VERSION=${DISTVERSION:R}
 PORTDOCS=	*
 PORTEXAMPLES=	*
@@ -29,9 +28,10 @@ OPTIONS_SINGLE=			PLATFORM
 OPTIONS_SINGLE_PLATFORM=	WAYLAND X11
 PLATFORM_DESC=			Window creation platform
 
-WAYLAND_BUILD_DEPENDS=	wayland-protocols>=0:graphics/wayland-protocols
-WAYLAND_LIB_DEPENDS=	libwayland-egl.so:graphics/wayland \
-			libxkbcommon.so:x11/libxkbcommon
+WAYLAND_BUILD_DEPENDS=	libxkbcommon>0:x11/libxkbcommon \
+			wayland-protocols>=0:graphics/wayland-protocols
+WAYLAND_LIB_DEPENDS=	libepoll-shim.so:devel/libepoll-shim \
+			libwayland-egl.so:graphics/wayland
 WAYLAND_USES=		kde:5 pkgconfig
 WAYLAND_USE=		KDE=ecm
 WAYLAND_CMAKE_BOOL=	GLFW_USE_WAYLAND
diff --git a/graphics/glfw/distinfo b/graphics/glfw/distinfo
index 438e51789ef7..b10a7d9f02ac 100644
--- a/graphics/glfw/distinfo
+++ b/graphics/glfw/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1658499993
-SHA256 (glfw-3.3.8.zip) = 4d025083cc4a3dd1f91ab9b9ba4f5807193823e565a5bcf4be202669d9911ea6
-SIZE (glfw-3.3.8.zip) = 1495490
+TIMESTAMP = 1702569312
+SHA256 (glfw-3.3.9.zip) = 55261410f8c3a9cc47ce8303468a90f40a653cd8f25fb968b12440624fb26d08
+SIZE (glfw-3.3.9.zip) = 1465859
diff --git a/graphics/glfw/files/patch-evdev-hack b/graphics/glfw/files/patch-evdev-hack
new file mode 100644
index 000000000000..917c4d581824
--- /dev/null
+++ b/graphics/glfw/files/patch-evdev-hack
@@ -0,0 +1,32 @@
+Fix build with WAYLAND
+https://github.com/glfw/glfw/issues/2445
+
+--- src/wl_init.c.orig	2023-12-12 18:00:27 UTC
++++ src/wl_init.c
+@@ -32,7 +32,11 @@
+ 
+ #include <errno.h>
+ #include <limits.h>
+-#include <linux/input.h>
++#if defined(__FreeBSD__)
++ #include <dev/evdev/input.h>
++#else
++ #include <linux/input.h>
++#endif
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+
+--- src/wl_window.c.orig	2023-12-12 18:00:27 UTC
++++ src/wl_window.c
+@@ -43,6 +43,10 @@
+ #include <signal.h>
+ #include <time.h>
+ 
++#if defined(__FreeBSD__)
++ #include <dev/evdev/input-event-codes.h>
++#endif
++
+ #define GLFW_BORDER_SIZE    4
+ #define GLFW_CAPTION_HEIGHT 24
+ 
diff --git a/graphics/glfw/files/patch-src-wl_init.c b/graphics/glfw/files/patch-src-wl_init.c
deleted file mode 100644
index a4fe12bbdd0a..000000000000
--- a/graphics/glfw/files/patch-src-wl_init.c
+++ /dev/null
@@ -1,26 +0,0 @@
---- src/wl_init.c.orig	2019-08-03 17:40:05 UTC
-+++ src/wl_init.c
-@@ -29,7 +29,6 @@
- #include <assert.h>
- #include <errno.h>
- #include <limits.h>
--#include <linux/input.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -37,6 +36,15 @@
- #include <sys/timerfd.h>
- #include <unistd.h>
- #include <wayland-client.h>
-+#ifdef __has_include
-+#if __has_include(<linux/input.h>)
-+#include <linux/input.h>
-+#elif __has_include(<dev/evdev/input.h>)
-+#include <dev/evdev/input.h>
-+#endif
-+#else
-+#include <linux/input.h>
-+#endif
- 
- 
- static inline int min(int n1, int n2)