pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/SDL2 SDL2: Add support for Wayland in options.mk.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0954308193b4
branches:  trunk
changeset: 399905:0954308193b4
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun Aug 18 16:16:24 2019 +0000

description:
SDL2: Add support for Wayland in options.mk.

While here, resolve some pkglint problems.

Builds on NetBSD with Wayland support...

diffstat:

 devel/SDL2/Makefile                                             |   8 +-
 devel/SDL2/distinfo                                             |   3 +-
 devel/SDL2/options.mk                                           |  14 +++++-
 devel/SDL2/patches/patch-src_video_wayland_SDL__waylandevents.c |  22 ++++++++++
 4 files changed, 40 insertions(+), 7 deletions(-)

diffs (98 lines):

diff -r 987f8b2d8c12 -r 0954308193b4 devel/SDL2/Makefile
--- a/devel/SDL2/Makefile       Sun Aug 18 16:09:24 2019 +0000
+++ b/devel/SDL2/Makefile       Sun Aug 18 16:16:24 2019 +0000
@@ -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 @@
 
 MAINTAINER=    nia%NetBSD.org@localhost
 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_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 -r 987f8b2d8c12 -r 0954308193b4 devel/SDL2/distinfo
--- a/devel/SDL2/distinfo       Sun Aug 18 16:09:24 2019 +0000
+++ b/devel/SDL2/distinfo       Sun Aug 18 16:16:24 2019 +0000
@@ -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 @@
 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 -r 987f8b2d8c12 -r 0954308193b4 devel/SDL2/options.mk
--- a/devel/SDL2/options.mk     Sun Aug 18 16:09:24 2019 +0000
+++ b/devel/SDL2/options.mk     Sun Aug 18 16:16:24 2019 +0000
@@ -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_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 -r 987f8b2d8c12 -r 0954308193b4 devel/SDL2/patches/patch-src_video_wayland_SDL__waylandevents.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/SDL2/patches/patch-src_video_wayland_SDL__waylandevents.c   Sun Aug 18 16:16:24 2019 +0000
@@ -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>



Home | Main Index | Thread Index | Old Index