v3.3/glfw: add netbsd support

Add missing build tags. Wayland support is documented as incomplete.

For #288.

GitHub-Pull-Request: #341
pull/342/head
Lily 2021-12-04 07:34:44 -08:00 committed by GitHub
parent 40e447a793
commit caad923f49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 8 deletions

View File

@ -7,6 +7,7 @@
* On Ubuntu/Debian-like Linux distributions, you need `libgl1-mesa-dev` and `xorg-dev` packages.
* On CentOS/Fedora-like Linux distributions, you need `libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel libXi-devel libXxf86vm-devel` packages.
* On FreeBSD, you need the package `pkgconf`. To build for X, you also need the package `xorg`; and to build for Wayland, you need the package `wayland`.
* On NetBSD, to build for X, you need the X11 sets installed. These are included in all graphical installs, and can be added to the system with `sysinst(8)` on non-graphical systems. Wayland support is incomplete, due to missing wscons support in upstream GLFW. To attempt to build for Wayland, you need to install the `wayland libepoll-shim` packages and set the environment variable `PKG_CONFIG_PATH=/usr/pkg/libdata/pkgconfig`.
* On OpenBSD, you need the X11 sets. These are installed by default, and can be added from the ramdisk kernel at any time.
* See [here](http://www.glfw.org/docs/latest/compile.html#compile_deps) for full details.
* Go 1.4+ is required on Windows (otherwise you must use MinGW v4.8.1 exactly, see [Go issue 8811](https://github.com/golang/go/issues/8811)).

View File

@ -41,13 +41,13 @@ package glfw
// BSD Build Tags
// ----------------
// GLFW Options:
#cgo freebsd,!wayland openbsd pkg-config: x11 xau xcb xdmcp
#cgo freebsd,wayland pkg-config: wayland-client wayland-cursor wayland-egl epoll-shim
#cgo freebsd openbsd CFLAGS: -D_GLFW_HAS_DLOPEN
#cgo freebsd,!wayland openbsd CFLAGS: -D_GLFW_X11 -D_GLFW_HAS_GLXGETPROCADDRESSARB
#cgo freebsd,wayland CFLAGS: -D_GLFW_WAYLAND
#cgo freebsd,!wayland netbsd,!wayland openbsd pkg-config: x11 xau xcb xdmcp
#cgo freebsd,wayland netbsd,wayland pkg-config: wayland-client wayland-cursor wayland-egl epoll-shim
#cgo freebsd netbsd openbsd CFLAGS: -D_GLFW_HAS_DLOPEN
#cgo freebsd,!wayland netbsd,!wayland openbsd CFLAGS: -D_GLFW_X11 -D_GLFW_HAS_GLXGETPROCADDRESSARB
#cgo freebsd,wayland netbsd,wayland CFLAGS: -D_GLFW_WAYLAND
// Linker Options:
#cgo freebsd openbsd LDFLAGS: -lm
#cgo freebsd netbsd openbsd LDFLAGS: -lm
*/
import "C"

View File

@ -1,4 +1,4 @@
// +build freebsd openbsd
// +build freebsd netbsd openbsd
package glfw

View File

@ -1,4 +1,4 @@
// +build linux,!wayland freebsd,!wayland openbsd
// +build linux,!wayland freebsd,!wayland netbsd,!wayland openbsd
package glfw