On Thu, Oct 29, 2026 at 09:37:56PM +0000, Stuart Henderson wrote:
> On 2026/10/29 16:56, Kurt Mosiejczuk wrote:
> > Here's an update of GLFW to 3.5.1, but I've also included the
> > additions that LWJGL 3.x makes to the GLFW they use. (LWJGL
> > being _my_ primary use case for GLFW).

> > I just took the 4 commits that LWJGL made and included them
> > as patches in the new files directory. I trimmed out the
> > parts of the changes they made to the macos-specific and
> > win32 as parts of glfw.

> this seems like it might be better suited to PATCHFILES.sitename
> / SITES.sitename rather than including in files/?

Siwtched to PATHFILES/SITES

> however, I wonder if in this situation it might be better to use
> their bundled patched copy anyway (rather than 'system glfw'),
> then there's no worry about whether patches impact other users of glfw,
> theor whether they might get in way of updating glfw..

They don't bundle a patched copy. LWJGL is geared towards doing
their own releases that get done via CI. They use a patched fork.

The changes only add functionality to GLFW, it doesn't change any
existing functionality. I'm not worried about it breaking other
consumers.

In terms of worry about future updates, glfw actually is pretty slow
to do new releases. I'm not realy worried about problems updating
any time soon.

Updated patch below

--Kurt

Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/glfw/Makefile,v
diff -u -p -r1.17 Makefile
--- Makefile    9 Mar 2026 20:01:42 -0000       1.17
+++ Makefile    31 Oct 2026 15:27:43 -0000
@@ -1,11 +1,10 @@
 COMMENT =      open source, multi-platform library for creating windows
 
-V =            3.4
+V =            3.5.1
 DISTNAME =     glfw-${V}
 CATEGORIES =   graphics x11
-REVISION =     2
 
-SHARED_LIBS +=  glfw                      1.2 # 3.4
+SHARED_LIBS +=  glfw                      1.3 # 3.5.1
 
 HOMEPAGE =     https://www.glfw.org/
 MAINTAINER =   Kurt Mosiejczuk <[email protected]>
@@ -22,6 +21,8 @@ WANTLIB +=    epoll-shim m pthread
 WANTLIB +=     X11 wayland-client wayland-cursor wayland-egl xkbcommon
 
 SITES =                https://github.com/glfw/glfw/releases/download/${V}/
+SITES.p =      https://kurt.mosiejcz.uk/pub/distfiles/glfw/
+
 EXTRACT_SUFX = .zip
 
 MODULES =      devel/cmake
@@ -36,6 +37,11 @@ BUILD_DEPENDS =      wayland/libinput-openbsd
 LIB_DEPENDS =  devel/epoll-shim \
                wayland/wayland \
                x11/xkbcommon
+
+PATCHFILES.p = lwjgl-glfw-part1.diff \
+               lwjgl-glfw-part2.diff \
+               lwjgl-glfw-part3.diff \
+               lwjgl-glfw-part4.diff
 
 NO_TEST =      Yes
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/graphics/glfw/distinfo,v
diff -u -p -r1.9 distinfo
--- distinfo    23 Nov 2024 21:20:10 -0000      1.9
+++ distinfo    31 Oct 2026 15:27:43 -0000
@@ -1,2 +1,10 @@
-SHA256 (glfw-3.4.zip) = tewASycS/Qjohh3CcUKPBId1IAot9xnM9XUUO6dJo+k=
-SIZE (glfw-3.4.zip) = 1653725
+SHA256 (glfw-3.5.1.zip) = 6nm8X+/8JUyHKRmAwtC86azrtoxJg7eflh3NLLimEaA=
+SHA256 (lwjgl-glfw-part1.diff) = XrAT24w/J9t15Ffelp+yTA8K58tppRlauaLkaSXKotg=
+SHA256 (lwjgl-glfw-part2.diff) = P7n/eMKrMY3FarArwPnLPZSNwYnd4HBOEs+UkSuxjrA=
+SHA256 (lwjgl-glfw-part3.diff) = 2mK92qigY+ER+j55k/s+jCEWdJztnOZTTC2fZPKE310=
+SHA256 (lwjgl-glfw-part4.diff) = 3fhZKmgN1xJ1Y4zT4xldtzW1n/mbU66Ti9gW43xNvf8=
+SIZE (glfw-3.5.1.zip) = 1620474
+SIZE (lwjgl-glfw-part1.diff) = 8518
+SIZE (lwjgl-glfw-part2.diff) = 218069
+SIZE (lwjgl-glfw-part3.diff) = 16405
+SIZE (lwjgl-glfw-part4.diff) = 781912
Index: patches/patch-docs_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/graphics/glfw/patches/patch-docs_CMakeLists_txt,v
diff -u -p -r1.1 patch-docs_CMakeLists_txt
--- patches/patch-docs_CMakeLists_txt   26 Nov 2024 22:30:51 -0000      1.1
+++ patches/patch-docs_CMakeLists_txt   31 Oct 2026 15:27:43 -0000
@@ -3,12 +3,12 @@ Skip making html documenttaion even if D
 Index: docs/CMakeLists.txt
 --- docs/CMakeLists.txt.orig
 +++ docs/CMakeLists.txt
-@@ -32,7 +32,7 @@ foreach(file IN LISTS source_files)
+@@ -36,7 +36,7 @@ foreach(file IN LISTS source_files)
  endforeach()
  
  set(DOXYGEN_SKIP_DOT TRUE)
--find_package(Doxygen)
-+#find_package(Doxygen)
+-find_package(Doxygen ${MINIMUM_DOXYGEN_VERSION} QUIET)
++#find_package(Doxygen ${MINIMUM_DOXYGEN_VERSION} QUIET)
  
- if (NOT DOXYGEN_FOUND OR DOXYGEN_VERSION VERSION_LESS "1.9.8")
-     message(STATUS "Documentation generation requires Doxygen 1.9.8 or later")
+ if (NOT DOXYGEN_FOUND)
+     message(STATUS "Documentation generation requires Doxygen 
${MINIMUM_DOXYGEN_VERSION} or later")
Index: patches/patch-src_wl_init_c
===================================================================
RCS file: /cvs/ports/graphics/glfw/patches/patch-src_wl_init_c,v
diff -u -p -r1.1 patch-src_wl_init_c
--- patches/patch-src_wl_init_c 26 Nov 2024 22:30:51 -0000      1.1
+++ patches/patch-src_wl_init_c 31 Oct 2026 15:27:43 -0000
@@ -3,7 +3,7 @@ Don't load versioned .so files
 Index: src/wl_init.c
 --- src/wl_init.c.orig
 +++ src/wl_init.c
-@@ -511,7 +511,7 @@ GLFWbool _glfwConnectWayland(int platformID, _GLFWplat
+@@ -562,7 +562,7 @@ GLFWbool _glfwConnectWayland(int platformID, _GLFWplat
          .createWindowSurface = _glfwCreateWindowSurfaceWayland
      };
  
@@ -12,7 +12,7 @@ Index: src/wl_init.c
      if (!module)
      {
          if (platformID == GLFW_PLATFORM_WAYLAND)
-@@ -624,7 +624,7 @@ int _glfwInitWayland(void)
+@@ -696,7 +696,7 @@ int _glfwInitWayland(void)
          return GLFW_FALSE;
      }
  
@@ -21,7 +21,7 @@ Index: src/wl_init.c
      if (!_glfw.wl.cursor.handle)
      {
          _glfwInputError(GLFW_PLATFORM_ERROR,
-@@ -641,7 +641,7 @@ int _glfwInitWayland(void)
+@@ -713,7 +713,7 @@ int _glfwInitWayland(void)
      _glfw.wl.cursor.image_get_buffer = (PFN_wl_cursor_image_get_buffer)
          _glfwPlatformGetModuleSymbol(_glfw.wl.cursor.handle, 
"wl_cursor_image_get_buffer");
  
@@ -30,7 +30,7 @@ Index: src/wl_init.c
      if (!_glfw.wl.egl.handle)
      {
          _glfwInputError(GLFW_PLATFORM_ERROR,
-@@ -656,7 +656,7 @@ int _glfwInitWayland(void)
+@@ -728,7 +728,7 @@ int _glfwInitWayland(void)
      _glfw.wl.egl.window_resize = (PFN_wl_egl_window_resize)
          _glfwPlatformGetModuleSymbol(_glfw.wl.egl.handle, 
"wl_egl_window_resize");
  
@@ -39,7 +39,7 @@ Index: src/wl_init.c
      if (!_glfw.wl.xkb.handle)
      {
          _glfwInputError(GLFW_PLATFORM_ERROR,
-@@ -732,7 +732,7 @@ int _glfwInitWayland(void)
+@@ -808,7 +808,7 @@ int _glfwInitWayland(void)
      }
  
      if (_glfw.hints.init.wl.libdecorMode == GLFW_WAYLAND_PREFER_LIBDECOR)
Index: patches/patch-src_wl_window_c
===================================================================
RCS file: patches/patch-src_wl_window_c
diff -N patches/patch-src_wl_window_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_wl_window_c       31 Oct 2026 15:27:43 -0000
@@ -0,0 +1,18 @@
+OpenBSD needs input-event-codes.h too
+
+Upstream already has this unreleased
+
+Index: src/wl_window.c
+--- src/wl_window.c.orig
++++ src/wl_window.c
+@@ -42,9 +42,7 @@
+ #include <sys/mman.h>
+ #include <sys/timerfd.h>
+ #include <poll.h>
+-#if defined(__FreeBSD__)
+-    #include <linux/input-event-codes.h>
+-#endif
++#include <linux/input-event-codes.h>
+ 
+ #include "wayland-client-protocol.h"
+ #include "xdg-shell-client-protocol.h"

Reply via email to