It builds fine when using default options but when WAYLAND is selected instead of X11 then it fails with: /usr/local/libexec/ccache/cc -D_GLFW_USE_CONFIG_H -Dglfw_EXPORTS -Iinclude -Isrc -I/usr/local/include/libepoll-shim -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fPIC -Wall -fvisibility=hidden -MD -MT src/CMakeFiles/glfw.dir/wl_init.c.o -MF src/CMakeFiles/glfw.dir/wl_init.c.o.d -o src/CMakeFiles/glfw.dir/wl_init.c.o -c src/wl_init.c src/wl_init.c:32:10: fatal error: 'linux/input.h' file not found #include <linux/input.h> ^~~~~~~~~~~~~~~ 1 error generated. [21/135] /usr/local/libexec/ccache/cc -D_GLFW_USE_CONFIG_H -Dglfw_EXPORTS -Iinclude -Isrc -I/usr/local/include/libepoll-shim -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fPIC -Wall -fvisibility=hidden -MD -MT src/CMakeFiles/glfw.dir/posix_time.c.o -MF src/CMakeFiles/glfw.dir/posix_time.c.o.d -o src/CMakeFiles/glfw.dir/posix_time.c.o -c src/posix_time.c [22/135] /usr/local/libexec/ccache/cc -D_GLFW_USE_CONFIG_H -Dglfw_EXPORTS -Iinclude -Isrc -I/usr/local/include/libepoll-shim -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fPIC -Wall -fvisibility=hidden -MD -MT src/CMakeFiles/glfw.dir/wl_monitor.c.o -MF src/CMakeFiles/glfw.dir/wl_monitor.c.o.d -o src/CMakeFiles/glfw.dir/wl_monitor.c.o -c src/wl_monitor.c [23/135] /usr/local/libexec/ccache/cc -D_GLFW_USE_CONFIG_H -Dglfw_EXPORTS -Iinclude -Isrc -I/usr/local/include/libepoll-shim -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fPIC -Wall -fvisibility=hidden -MD -MT src/CMakeFiles/glfw.dir/wl_window.c.o -MF src/CMakeFiles/glfw.dir/wl_window.c.o.d -o src/CMakeFiles/glfw.dir/wl_window.c.o -c src/wl_window.c ninja: build stopped: subcommand failed. ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make: stopped in /usr/ports/graphics/glfw =>> Cleaning up wrkdir ===> Cleaning for glfw-3.3 build of graphics/glfw | glfw-3.3 ended at Thu May 23 19:38:26 UTC 2019 build time: 00:00:12 !!! build failure encountered !!!
Created attachment 206243 [details] svn-diff-glfw I got it from here. https://github.com/kovidgoyal/kitty/blob/master/glfw/wl_init.c
Sounds good to me.
A commit references this bug: Author: jgh Date: Tue Aug 13 18:08:40 UTC 2019 New revision: 508841 URL: https://svnweb.freebsd.org/changeset/ports/508841 Log: - address WAYLAND build PR: 238085 Submitted by: list1@gjunka.com Approved by: neel@neelc.org (maintainer) Changes: head/graphics/glfw/Makefile head/graphics/glfw/files/patch-src-wl_init.c
A commit references this bug: Author: jgh Date: Tue Aug 13 18:13:24 UTC 2019 New revision: 508842 URL: https://svnweb.freebsd.org/changeset/ports/508842 Log: MFH: r508841 - address WAYLAND build PR: 238085 Submitted by: list1@gjunka.com Approved by: neel@neelc.org (maintainer) Approved by: ports-secteam (with hat) Changes: _U branches/2019Q3/ branches/2019Q3/graphics/glfw/Makefile branches/2019Q3/graphics/glfw/files/patch-src-wl_init.c
Thanks for your contribution! Port has been updated. -jgh
FWIW, according to <dev/evdev/input.h> maintainer <linux/input.h> to be used in portable software. https://lists.freebsd.org/pipermail/freebsd-x11/2019-March/023097.html