diff options
author | nia <nia@pkgsrc.org> | 2019-08-18 17:57:55 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2019-08-18 17:57:55 +0000 |
commit | 01e30f97e082daed7457b01c59d90eb0846994bd (patch) | |
tree | a657074ae782f09ce80d6511a0d037282550889c /multimedia/mpv | |
parent | 0f3e64fdba4c420134965e7ea3ac52086c04d148 (diff) | |
download | pkgsrc-01e30f97e082daed7457b01c59d90eb0846994bd.tar.gz |
mpv: Add Wayland support to options.mk.
This makes X11 optional. It shouldn't change the default options.
Diffstat (limited to 'multimedia/mpv')
-rw-r--r-- | multimedia/mpv/Makefile | 13 | ||||
-rw-r--r-- | multimedia/mpv/distinfo | 3 | ||||
-rw-r--r-- | multimedia/mpv/options.mk | 67 | ||||
-rw-r--r-- | multimedia/mpv/patches/patch-video_out_wayland__common.c | 22 |
4 files changed, 81 insertions, 24 deletions
diff --git a/multimedia/mpv/Makefile b/multimedia/mpv/Makefile index a28bd46ab94..7cd8696926b 100644 --- a/multimedia/mpv/Makefile +++ b/multimedia/mpv/Makefile @@ -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 @@ post-install: .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 --git a/multimedia/mpv/distinfo b/multimedia/mpv/distinfo index 2cba4497872..377e6a11b7a 100644 --- a/multimedia/mpv/distinfo +++ b/multimedia/mpv/distinfo @@ -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-audio_out_ao__oss.c) = 824c214d0d4464b94e46a922ede4045ae537a534 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 --git a/multimedia/mpv/options.mk b/multimedia/mpv/options.mk index f8927cb36df..c7fc784637c 100644 --- a/multimedia/mpv/options.mk +++ b/multimedia/mpv/options.mk @@ -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_SUGGESTED_OPTIONS.Linux+= alsa +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 @@ WAF_CONFIGURE_ARGS+= --disable-vdpau .endif ### -### Raspberry Pi support +### libdrm support (video output) +### +.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:Mrpi) +.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_MESSAGE.vc= Fixing path to VideoCore libraries. 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 --git a/multimedia/mpv/patches/patch-video_out_wayland__common.c b/multimedia/mpv/patches/patch-video_out_wayland__common.c new file mode 100644 index 00000000000..30a2ff3008a --- /dev/null +++ b/multimedia/mpv/patches/patch-video_out_wayland__common.c @@ -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" |