pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/multimedia/mpv mpv: Add Wayland support to options.mk.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/da47a0a2782d
branches:  trunk
changeset: 399915:da47a0a2782d
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun Aug 18 17:57:55 2019 +0000

description:
mpv: Add Wayland support to options.mk.

This makes X11 optional. It shouldn't change the default options.

diffstat:

 multimedia/mpv/Makefile                                  |  13 +--
 multimedia/mpv/distinfo                                  |   3 +-
 multimedia/mpv/options.mk                                |  67 +++++++++++++--
 multimedia/mpv/patches/patch-video_out_wayland__common.c |  22 +++++
 4 files changed, 81 insertions(+), 24 deletions(-)

diffs (165 lines):

diff -r b8d76333016f -r da47a0a2782d multimedia/mpv/Makefile
--- a/multimedia/mpv/Makefile   Sun Aug 18 17:40:20 2019 +0000
+++ b/multimedia/mpv/Makefile   Sun Aug 18 17:57:55 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.85 2019/08/11 13:22:04 wiz Exp $
+# $NetBSD: Makefile,v 1.86 2019/08/18 17:57:55 nia Exp $
 
 DISTNAME=      mpv-0.29.1
 PKGREVISION=   10
@@ -52,18 +52,7 @@
 
 .include "options.mk"
 
-.include "../../mk/bsd.prefs.mk"
-.if ${OPSYS} != "Darwin"
-.include "../../graphics/MesaLib/buildlink3.mk"
-.include "../../x11/libdrm/buildlink3.mk"
-.include "../../x11/libXinerama/buildlink3.mk"
-.include "../../x11/libXrandr/buildlink3.mk"
-.include "../../x11/libXScrnSaver/buildlink3.mk"
-.include "../../x11/libXv/buildlink3.mk"
-.include "../../x11/libXxf86vm/buildlink3.mk"
 .include "../../mk/oss.buildlink3.mk"
-.endif
-
 .include "../../converters/libiconv/buildlink3.mk"
 .include "../../devel/waf/waf.mk"
 .include "../../devel/zlib/buildlink3.mk"
diff -r b8d76333016f -r da47a0a2782d multimedia/mpv/distinfo
--- a/multimedia/mpv/distinfo   Sun Aug 18 17:40:20 2019 +0000
+++ b/multimedia/mpv/distinfo   Sun Aug 18 17:57:55 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.53 2019/06/04 13:55:43 nia Exp $
+$NetBSD: distinfo,v 1.54 2019/08/18 17:57:55 nia Exp $
 
 SHA1 (mpv-0.29.1.tar.gz) = 83f2bc0eb5a8bec9a9d5efc7de0e19a442238ac5
 RMD160 (mpv-0.29.1.tar.gz) = 72a4fda3a72ac4fd37ed04435833fa2cf378a012
@@ -9,4 +9,5 @@
 SHA1 (patch-options_options.c) = 125282ede99098224fc9c16952b44c12b8b3e06b
 SHA1 (patch-player_main.c) = e794199990059cc95050032194bca70557c381d7
 SHA1 (patch-video_out_drm__common.c) = facb8d99fe31119618866c9af512a60e54b4ea6c
+SHA1 (patch-video_out_wayland__common.c) = 816ee9c59404a50af922b8e4f97fbcd02b20ba45
 SHA1 (patch-wscript) = a908365c0c63745e1d22010c26804789997d4377
diff -r b8d76333016f -r da47a0a2782d multimedia/mpv/options.mk
--- a/multimedia/mpv/options.mk Sun Aug 18 17:40:20 2019 +0000
+++ b/multimedia/mpv/options.mk Sun Aug 18 17:57:55 2019 +0000
@@ -1,22 +1,29 @@
-# $NetBSD: options.mk,v 1.17 2019/05/31 15:55:11 nia Exp $
+# $NetBSD: options.mk,v 1.18 2019/08/18 17:57:55 nia Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.mpv
 
 .include "../../multimedia/libva/available.mk"
 .include "../../multimedia/libvdpau/available.mk"
 
-PKG_SUPPORTED_OPTIONS= alsa ass bluray caca lua pulseaudio rpi sdl2 v4l2
-PKG_SUGGESTED_OPTIONS= ass bluray lua sdl2
+PKG_OPTIONS_OPTIONAL_GROUPS=   gl
+PKG_OPTIONS_GROUP.gl=          opengl rpi
+
+PKG_SUPPORTED_OPTIONS+=                alsa ass bluray caca libdrm lua pulseaudio v4l2
+PKG_SUPPORTED_OPTIONS+=                sdl2 wayland x11
+
+.include "../../mk/bsd.fast.prefs.mk"
+PKG_SUGGESTED_OPTIONS=         ass bluray lua sdl2
 PKG_SUGGESTED_OPTIONS.Linux+=  alsa
-
+.if ${OPSYS} != "Darwin"
+PKG_SUGGESTED_OPTIONS+=                opengl libdrm x11
+.endif
 .if ${VAAPI_AVAILABLE} == "yes"
-PKG_SUPPORTED_OPTIONS+=        vaapi
-PKG_SUGGESTED_OPTIONS+=        vaapi
+PKG_SUPPORTED_OPTIONS+=                vaapi
+PKG_SUGGESTED_OPTIONS+=                vaapi
 .endif
-
 .if ${VDPAU_AVAILABLE} == "yes"
-PKG_SUPPORTED_OPTIONS+=        vdpau
-PKG_SUGGESTED_OPTIONS+=        vdpau
+PKG_SUPPORTED_OPTIONS+=                vdpau
+PKG_SUGGESTED_OPTIONS+=                vdpau
 .endif
 
 .include "../../mk/bsd.options.mk"
@@ -122,9 +129,21 @@
 .endif
 
 ###
-### Raspberry Pi support
+### libdrm support (video output)
 ###
-.if !empty(PKG_OPTIONS:Mrpi)
+.if !empty(PKG_OPTIONS:Mlibdrm)
+WAF_CONFIGURE_ARGS+=   --enable-drm
+.include "../../x11/libdrm/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+=   --disable-libdrm
+.endif
+
+###
+### OpenGL support (video output)
+###
+.if !empty(PKG_OPTIONS:Mopengl)
+.include "../../graphics/MesaLib/buildlink3.mk"
+.elif !empty(PKG_OPTIONS:Mrpi)
 BUILD_DEPENDS+=                raspberrypi-userland>=20170109:../../misc/raspberrypi-userland
 CFLAGS+=               "-L${PREFIX}/lib"
 SUBST_CLASSES+=                vc
@@ -133,3 +152,29 @@
 SUBST_FILES.vc=                waftools/checks/custom.py
 SUBST_SED.vc+=         -e 's;opt/vc;${PREFIX};g'
 .endif
+
+###
+### Wayland support (video output)
+###
+.if !empty(PKG_OPTIONS:Mwayland)
+WAF_CONFIGURE_ARGS+=   --enable-wayland
+.include "../../devel/wayland/buildlink3.mk"
+.include "../../devel/wayland-protocols/buildlink3.mk"
+.include "../../x11/libxkbcommon/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+=   --disable-wayland
+.endif
+
+###
+### X11 support (video output)
+###
+.if !empty(PKG_OPTIONS:Mx11)
+WAF_CONFIGURE_ARGS+=   --enable-x11
+.include "../../x11/libXinerama/buildlink3.mk"
+.include "../../x11/libXrandr/buildlink3.mk"
+.include "../../x11/libXScrnSaver/buildlink3.mk"
+.include "../../x11/libXv/buildlink3.mk"
+.include "../../x11/libXxf86vm/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+=   --disable-x11
+.endif
diff -r b8d76333016f -r da47a0a2782d multimedia/mpv/patches/patch-video_out_wayland__common.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/mpv/patches/patch-video_out_wayland__common.c  Sun Aug 18 17:57:55 2019 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-video_out_wayland__common.c,v 1.1 2019/08/18 17:57:55 nia Exp $
+
+Allow building on systems without evdev.
+
+--- video/out/wayland_common.c.orig    2018-10-02 19:03:41.000000000 +0000
++++ video/out/wayland_common.c
+@@ -16,8 +16,14 @@
+  */
+ 
+ #include <poll.h>
+-#include <unistd.h>
++#if defined(__linux) || defined(__FreeBSD__)
+ #include <linux/input.h>
++#else
++#define BTN_LEFT      (0)
++#define BTN_MIDDLE    (1)
++#define BTN_RIGHT     (2)
++#endif
++#include <unistd.h>
+ #include "common/msg.h"
+ #include "input/input.h"
+ #include "input/keycodes.h"



Home | Main Index | Thread Index | Old Index