summaryrefslogtreecommitdiff
path: root/devel/SDL2
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-08-18 16:16:24 +0000
committernia <nia@pkgsrc.org>2019-08-18 16:16:24 +0000
commitb33cae146979768fb6c6b448dd4d1a3c92a2cfff (patch)
tree9fdad4eaf02e60b76b7cd8e66465e8fc44579773 /devel/SDL2
parent2e7f28e16bc802a825f7930dab570ee0b16f5022 (diff)
downloadpkgsrc-b33cae146979768fb6c6b448dd4d1a3c92a2cfff.tar.gz
SDL2: Add support for Wayland in options.mk.
While here, resolve some pkglint problems. Builds on NetBSD with Wayland support...
Diffstat (limited to 'devel/SDL2')
-rw-r--r--devel/SDL2/Makefile8
-rw-r--r--devel/SDL2/distinfo3
-rw-r--r--devel/SDL2/options.mk14
-rw-r--r--devel/SDL2/patches/patch-src_video_wayland_SDL__waylandevents.c22
4 files changed, 40 insertions, 7 deletions
diff --git a/devel/SDL2/Makefile b/devel/SDL2/Makefile
index 8ba86230252..80c86f46d94 100644
--- a/devel/SDL2/Makefile
+++ b/devel/SDL2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2019/07/27 15:29:10 nia Exp $
+# $NetBSD: Makefile,v 1.39 2019/08/18 16:16:24 nia Exp $
DISTNAME= SDL2-2.0.10
CATEGORIES= devel
@@ -6,7 +6,7 @@ MASTER_SITES= http://www.libsdl.org/release/
MAINTAINER= nia@NetBSD.org
HOMEPAGE= http://www.libsdl.org/
-COMMENT= Simple DirectMedia Layer is a cross-platform multimedia library
+COMMENT= Simple DirectMedia Layer - cross-platform multimedia library
LICENSE= zlib
USE_LANGUAGES= c c++
@@ -20,8 +20,8 @@ CONFIGURE_ENV+= SDL_RLD_FLAGS="${COMPILER_RPATH_FLAG}${PREFIX}/lib \
CONFIGURE_ARGS+= --disable-x11-shared
-CHECK_PORTABILITY_SKIP+=build-scripts/androidbuildlibs.sh
-CHECK_PORTABILITY_SKIP+=build-scripts/iosbuild.sh
+CHECK_PORTABILITY_SKIP+= build-scripts/androidbuildlibs.sh
+CHECK_PORTABILITY_SKIP+= build-scripts/iosbuild.sh
.include "../../mk/bsd.prefs.mk"
diff --git a/devel/SDL2/distinfo b/devel/SDL2/distinfo
index 161c9cc64a2..5a79d5341e1 100644
--- a/devel/SDL2/distinfo
+++ b/devel/SDL2/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.34 2019/07/27 15:29:10 nia Exp $
+$NetBSD: distinfo,v 1.35 2019/08/18 16:16:24 nia Exp $
SHA1 (SDL2-2.0.10.tar.gz) = fb31312ea1d4b45db839796ae2336dfe3d5884e5
RMD160 (SDL2-2.0.10.tar.gz) = b35818cbf8eaf0c9c4d3b6d7a293c05a368366b2
@@ -7,4 +7,5 @@ Size (SDL2-2.0.10.tar.gz) = 5550762 bytes
SHA1 (patch-configure) = 1631314dab18886ea553ee53fac89e16718cacab
SHA1 (patch-src_joystick_bsd_SDL__sysjoystick.c) = 1c5756e47ad906235369b46b36d7b0b1ee776156
SHA1 (patch-src_video_cocoa_SDL__cocoawindow.m) = 1d5ac9c17ceadf668925734b5cad311e26f2fc58
+SHA1 (patch-src_video_wayland_SDL__waylandevents.c) = 3a59fde90766bf1219ac204a2ce3596280a6dd2a
SHA1 (patch-src_video_x11_SDL__x11opengl.c) = 70b63021c12c52760c0811c673b259844bdfcdc0
diff --git a/devel/SDL2/options.mk b/devel/SDL2/options.mk
index 96f9138605f..35dc8584fce 100644
--- a/devel/SDL2/options.mk
+++ b/devel/SDL2/options.mk
@@ -1,8 +1,8 @@
-# $NetBSD: options.mk,v 1.12 2019/05/27 17:21:01 nia Exp $
+# $NetBSD: options.mk,v 1.13 2019/08/18 16:16:24 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.SDL2
PKG_OPTIONS_REQUIRED_GROUPS= gl
-PKG_SUPPORTED_OPTIONS= alsa dbus esound nas oss jack pulseaudio x11
+PKG_SUPPORTED_OPTIONS= alsa dbus esound nas oss jack pulseaudio wayland x11
PKG_OPTIONS_GROUP.gl= opengl
PKG_SUGGESTED_OPTIONS+= oss
PKG_SUGGESTED_OPTIONS.Linux+= alsa
@@ -91,3 +91,13 @@ SUBST_FILES.vc= configure
SUBST_SED.vc+= -e "s;/opt/vc;${PREFIX};g"
.include "../../misc/raspberrypi-userland/buildlink3.mk"
.endif
+
+.if !empty(PKG_OPTIONS:Mwayland)
+CONFIGURE_ARGS+= --enable-video-wayland
+CONFIGURE_ARGS+= --disable-wayland-shared
+.include "../../devel/wayland/buildlink3.mk"
+.include "../../devel/wayland-protocols/buildlink3.mk"
+.include "../../x11/libxkbcommon/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-video-wayland
+.endif
diff --git a/devel/SDL2/patches/patch-src_video_wayland_SDL__waylandevents.c b/devel/SDL2/patches/patch-src_video_wayland_SDL__waylandevents.c
new file mode 100644
index 00000000000..dd5e8523cb9
--- /dev/null
+++ b/devel/SDL2/patches/patch-src_video_wayland_SDL__waylandevents.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_video_wayland_SDL__waylandevents.c,v 1.1 2019/08/18 16:16:25 nia Exp $
+
+Allow building with Wayland on operating systems without evdev.
+
+--- src/video/wayland/SDL_waylandevents.c.orig 2019-07-25 04:32:36.000000000 +0000
++++ src/video/wayland/SDL_waylandevents.c
+@@ -43,7 +43,15 @@
+ #include "xdg-shell-client-protocol.h"
+ #include "xdg-shell-unstable-v6-client-protocol.h"
+
++#ifdef __linux
+ #include <linux/input.h>
++#else
++#define BTN_LEFT (0)
++#define BTN_MIDDLE (1)
++#define BTN_RIGHT (2)
++#define BTN_SIDE (3)
++#define BTN_EXTRA (4)
++#endif
+ #include <sys/select.h>
+ #include <sys/mman.h>
+ #include <poll.h>