mpv: Add Wayland support to options.mk. This makes X11 optional. It shouldn't change the default options.diff -r1.85 -r1.86 pkgsrc/multimedia/mpv/Makefile
(nia)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.85 2019/08/11 13:22:04 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.86 2019/08/18 17:57:55 nia Exp $ | |
2 | 2 | |||
3 | DISTNAME= mpv-0.29.1 | 3 | DISTNAME= mpv-0.29.1 | |
4 | PKGREVISION= 10 | 4 | PKGREVISION= 10 | |
5 | CATEGORIES= multimedia | 5 | CATEGORIES= multimedia | |
6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=mpv-player/} | 6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=mpv-player/} | |
7 | GITHUB_TAG= v${PKGVERSION_NOREV} | 7 | GITHUB_TAG= v${PKGVERSION_NOREV} | |
8 | 8 | |||
9 | MAINTAINER= leot@NetBSD.org | 9 | MAINTAINER= leot@NetBSD.org | |
10 | HOMEPAGE= https://mpv.io/ | 10 | HOMEPAGE= https://mpv.io/ | |
11 | COMMENT= Video player based on MPlayer and mplayer2 | 11 | COMMENT= Video player based on MPlayer and mplayer2 | |
12 | LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 | 12 | LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 | |
13 | 13 | |||
14 | # needs sem_timedwait(3) | 14 | # needs sem_timedwait(3) | |
@@ -42,37 +42,26 @@ SUBST_MESSAGE.audio= Fixing path to audi | @@ -42,37 +42,26 @@ SUBST_MESSAGE.audio= Fixing path to audi | |||
42 | 42 | |||
43 | SUBST_CLASSES+= python | 43 | SUBST_CLASSES+= python | |
44 | SUBST_SED.python+= -e "s,python,python${PYVERSSUFFIX}," | 44 | SUBST_SED.python+= -e "s,python,python${PYVERSSUFFIX}," | |
45 | SUBST_SED.python+= -e "s,rst2man,rst2man-${PYVERSSUFFIX}," | 45 | SUBST_SED.python+= -e "s,rst2man,rst2man-${PYVERSSUFFIX}," | |
46 | SUBST_FILES.python+= wscript | 46 | SUBST_FILES.python+= wscript | |
47 | SUBST_STAGE.python= pre-configure | 47 | SUBST_STAGE.python= pre-configure | |
48 | SUBST_MESSAGE.python= Fix Python command names. | 48 | SUBST_MESSAGE.python= Fix Python command names. | |
49 | 49 | |||
50 | post-install: | 50 | post-install: | |
51 | cd ${DESTDIR}${PREFIX} && ${MV} etc/mpv/encoding-profiles.conf share/examples/mpv | 51 | cd ${DESTDIR}${PREFIX} && ${MV} etc/mpv/encoding-profiles.conf share/examples/mpv | |
52 | 52 | |||
53 | .include "options.mk" | 53 | .include "options.mk" | |
54 | 54 | |||
55 | .include "../../mk/bsd.prefs.mk" | |||
56 | .if ${OPSYS} != "Darwin" | |||
57 | .include "../../graphics/MesaLib/buildlink3.mk" | |||
58 | .include "../../x11/libdrm/buildlink3.mk" | |||
59 | .include "../../x11/libXinerama/buildlink3.mk" | |||
60 | .include "../../x11/libXrandr/buildlink3.mk" | |||
61 | .include "../../x11/libXScrnSaver/buildlink3.mk" | |||
62 | .include "../../x11/libXv/buildlink3.mk" | |||
63 | .include "../../x11/libXxf86vm/buildlink3.mk" | |||
64 | .include "../../mk/oss.buildlink3.mk" | 55 | .include "../../mk/oss.buildlink3.mk" | |
65 | .endif | |||
66 | ||||
67 | .include "../../converters/libiconv/buildlink3.mk" | 56 | .include "../../converters/libiconv/buildlink3.mk" | |
68 | .include "../../devel/waf/waf.mk" | 57 | .include "../../devel/waf/waf.mk" | |
69 | .include "../../devel/zlib/buildlink3.mk" | 58 | .include "../../devel/zlib/buildlink3.mk" | |
70 | .include "../../graphics/lcms2/buildlink3.mk" | 59 | .include "../../graphics/lcms2/buildlink3.mk" | |
71 | .include "../../lang/python/application.mk" | 60 | .include "../../lang/python/application.mk" | |
72 | .include "../../multimedia/libdvdnav/buildlink3.mk" | 61 | .include "../../multimedia/libdvdnav/buildlink3.mk" | |
73 | .include "../../multimedia/libdvdread/buildlink3.mk" | 62 | .include "../../multimedia/libdvdread/buildlink3.mk" | |
74 | .include "../../multimedia/ffmpeg4/buildlink3.mk" | 63 | .include "../../multimedia/ffmpeg4/buildlink3.mk" | |
75 | .include "../../graphics/hicolor-icon-theme/buildlink3.mk" | 64 | .include "../../graphics/hicolor-icon-theme/buildlink3.mk" | |
76 | .include "../../sysutils/desktop-file-utils/desktopdb.mk" | 65 | .include "../../sysutils/desktop-file-utils/desktopdb.mk" | |
77 | .include "../../mk/jpeg.buildlink3.mk" | 66 | .include "../../mk/jpeg.buildlink3.mk" | |
78 | .include "../../mk/bsd.pkg.mk" | 67 | .include "../../mk/bsd.pkg.mk" |
@@ -1,12 +1,13 @@ | @@ -1,12 +1,13 @@ | |||
1 | $NetBSD: distinfo,v 1.53 2019/06/04 13:55:43 nia Exp $ | 1 | $NetBSD: distinfo,v 1.54 2019/08/18 17:57:55 nia Exp $ | |
2 | 2 | |||
3 | SHA1 (mpv-0.29.1.tar.gz) = 83f2bc0eb5a8bec9a9d5efc7de0e19a442238ac5 | 3 | SHA1 (mpv-0.29.1.tar.gz) = 83f2bc0eb5a8bec9a9d5efc7de0e19a442238ac5 | |
4 | RMD160 (mpv-0.29.1.tar.gz) = 72a4fda3a72ac4fd37ed04435833fa2cf378a012 | 4 | RMD160 (mpv-0.29.1.tar.gz) = 72a4fda3a72ac4fd37ed04435833fa2cf378a012 | |
5 | SHA512 (mpv-0.29.1.tar.gz) = ec57c9ceaaf2915ee237dd5a1c5ea5d22725d8611e28a9b998e5bb0d8ab5bdf3631d0267fc7b54da31cb1eaa145ef35841e68846bd41c3b9e1024902e92fd086 | 5 | SHA512 (mpv-0.29.1.tar.gz) = ec57c9ceaaf2915ee237dd5a1c5ea5d22725d8611e28a9b998e5bb0d8ab5bdf3631d0267fc7b54da31cb1eaa145ef35841e68846bd41c3b9e1024902e92fd086 | |
6 | Size (mpv-0.29.1.tar.gz) = 3059503 bytes | 6 | Size (mpv-0.29.1.tar.gz) = 3059503 bytes | |
7 | SHA1 (patch-audio_out_ao__alsa.c) = c4661d0d22550d6e4eb2b7a42dd04dbcc58123b0 | 7 | SHA1 (patch-audio_out_ao__alsa.c) = c4661d0d22550d6e4eb2b7a42dd04dbcc58123b0 | |
8 | SHA1 (patch-audio_out_ao__oss.c) = 824c214d0d4464b94e46a922ede4045ae537a534 | 8 | SHA1 (patch-audio_out_ao__oss.c) = 824c214d0d4464b94e46a922ede4045ae537a534 | |
9 | SHA1 (patch-options_options.c) = 125282ede99098224fc9c16952b44c12b8b3e06b | 9 | SHA1 (patch-options_options.c) = 125282ede99098224fc9c16952b44c12b8b3e06b | |
10 | SHA1 (patch-player_main.c) = e794199990059cc95050032194bca70557c381d7 | 10 | SHA1 (patch-player_main.c) = e794199990059cc95050032194bca70557c381d7 | |
11 | SHA1 (patch-video_out_drm__common.c) = facb8d99fe31119618866c9af512a60e54b4ea6c | 11 | SHA1 (patch-video_out_drm__common.c) = facb8d99fe31119618866c9af512a60e54b4ea6c | |
12 | SHA1 (patch-video_out_wayland__common.c) = 816ee9c59404a50af922b8e4f97fbcd02b20ba45 | |||
12 | SHA1 (patch-wscript) = a908365c0c63745e1d22010c26804789997d4377 | 13 | SHA1 (patch-wscript) = a908365c0c63745e1d22010c26804789997d4377 |
@@ -1,32 +1,39 @@ | @@ -1,32 +1,39 @@ | |||
1 | # $NetBSD: options.mk,v 1.17 2019/05/31 15:55:11 nia Exp $ | 1 | # $NetBSD: options.mk,v 1.18 2019/08/18 17:57:55 nia Exp $ | |
2 | 2 | |||
3 | PKG_OPTIONS_VAR= PKG_OPTIONS.mpv | 3 | PKG_OPTIONS_VAR= PKG_OPTIONS.mpv | |
4 | 4 | |||
5 | .include "../../multimedia/libva/available.mk" | 5 | .include "../../multimedia/libva/available.mk" | |
6 | .include "../../multimedia/libvdpau/available.mk" | 6 | .include "../../multimedia/libvdpau/available.mk" | |
7 | 7 | |||
8 | PKG_SUPPORTED_OPTIONS= alsa ass bluray caca lua pulseaudio rpi sdl2 v4l2 | 8 | PKG_OPTIONS_OPTIONAL_GROUPS= gl | |
9 | PKG_SUGGESTED_OPTIONS= ass bluray lua sdl2 | 9 | PKG_OPTIONS_GROUP.gl= opengl rpi | |
10 | PKG_SUGGESTED_OPTIONS.Linux+= alsa | 10 | ||
11 | PKG_SUPPORTED_OPTIONS+= alsa ass bluray caca libdrm lua pulseaudio v4l2 | |||
12 | PKG_SUPPORTED_OPTIONS+= sdl2 wayland x11 | |||
11 | 13 | |||
14 | .include "../../mk/bsd.fast.prefs.mk" | |||
15 | PKG_SUGGESTED_OPTIONS= ass bluray lua sdl2 | |||
16 | PKG_SUGGESTED_OPTIONS.Linux+= alsa | |||
17 | .if ${OPSYS} != "Darwin" | |||
18 | PKG_SUGGESTED_OPTIONS+= opengl libdrm x11 | |||
19 | .endif | |||
12 | .if ${VAAPI_AVAILABLE} == "yes" | 20 | .if ${VAAPI_AVAILABLE} == "yes" | |
13 | PKG_SUPPORTED_OPTIONS+= vaapi | 21 | PKG_SUPPORTED_OPTIONS+= vaapi | |
14 | PKG_SUGGESTED_OPTIONS+= vaapi | 22 | PKG_SUGGESTED_OPTIONS+= vaapi | |
15 | .endif | 23 | .endif | |
16 | ||||
17 | .if ${VDPAU_AVAILABLE} == "yes" | 24 | .if ${VDPAU_AVAILABLE} == "yes" | |
18 | PKG_SUPPORTED_OPTIONS+= vdpau | 25 | PKG_SUPPORTED_OPTIONS+= vdpau | |
19 | PKG_SUGGESTED_OPTIONS+= vdpau | 26 | PKG_SUGGESTED_OPTIONS+= vdpau | |
20 | .endif | 27 | .endif | |
21 | 28 | |||
22 | .include "../../mk/bsd.options.mk" | 29 | .include "../../mk/bsd.options.mk" | |
23 | 30 | |||
24 | ### | 31 | ### | |
25 | ### alsa support | 32 | ### alsa support | |
26 | ### | 33 | ### | |
27 | .if !empty(PKG_OPTIONS:Malsa) | 34 | .if !empty(PKG_OPTIONS:Malsa) | |
28 | WAF_CONFIGURE_ARGS+= --enable-alsa | 35 | WAF_CONFIGURE_ARGS+= --enable-alsa | |
29 | .include "../../audio/alsa-lib/buildlink3.mk" | 36 | .include "../../audio/alsa-lib/buildlink3.mk" | |
30 | .else | 37 | .else | |
31 | WAF_CONFIGURE_ARGS+= --disable-alsa | 38 | WAF_CONFIGURE_ARGS+= --disable-alsa | |
32 | .endif | 39 | .endif | |
@@ -112,24 +119,62 @@ WAF_CONFIGURE_ARGS+= --disable-vaapi | @@ -112,24 +119,62 @@ WAF_CONFIGURE_ARGS+= --disable-vaapi | |||
112 | .endif | 119 | .endif | |
113 | 120 | |||
114 | ### | 121 | ### | |
115 | ### VDPAU support (video output) | 122 | ### VDPAU support (video output) | |
116 | ### | 123 | ### | |
117 | .if !empty(PKG_OPTIONS:Mvdpau) | 124 | .if !empty(PKG_OPTIONS:Mvdpau) | |
118 | WAF_CONFIGURE_ARGS+= --enable-vdpau | 125 | WAF_CONFIGURE_ARGS+= --enable-vdpau | |
119 | .include "../../multimedia/libvdpau/buildlink3.mk" | 126 | .include "../../multimedia/libvdpau/buildlink3.mk" | |
120 | .else | 127 | .else | |
121 | WAF_CONFIGURE_ARGS+= --disable-vdpau | 128 | WAF_CONFIGURE_ARGS+= --disable-vdpau | |
122 | .endif | 129 | .endif | |
123 | 130 | |||
124 | ### | 131 | ### | |
125 | ### Raspberry Pi support | 132 | ### libdrm support (video output) | |
133 | ### | |||
134 | .if !empty(PKG_OPTIONS:Mlibdrm) | |||
135 | WAF_CONFIGURE_ARGS+= --enable-drm | |||
136 | .include "../../x11/libdrm/buildlink3.mk" | |||
137 | .else | |||
138 | WAF_CONFIGURE_ARGS+= --disable-libdrm | |||
139 | .endif | |||
140 | ||||
141 | ### | |||
142 | ### OpenGL support (video output) | |||
126 | ### | 143 | ### | |
127 | .if !empty(PKG_OPTIONS:Mrpi) | 144 | .if !empty(PKG_OPTIONS:Mopengl) | |
145 | .include "../../graphics/MesaLib/buildlink3.mk" | |||
146 | .elif !empty(PKG_OPTIONS:Mrpi) | |||
128 | BUILD_DEPENDS+= raspberrypi-userland>=20170109:../../misc/raspberrypi-userland | 147 | BUILD_DEPENDS+= raspberrypi-userland>=20170109:../../misc/raspberrypi-userland | |
129 | CFLAGS+= "-L${PREFIX}/lib" | 148 | CFLAGS+= "-L${PREFIX}/lib" | |
130 | SUBST_CLASSES+= vc | 149 | SUBST_CLASSES+= vc | |
131 | SUBST_STAGE.vc= pre-configure | 150 | SUBST_STAGE.vc= pre-configure | |
132 | SUBST_MESSAGE.vc= Fixing path to VideoCore libraries. | 151 | SUBST_MESSAGE.vc= Fixing path to VideoCore libraries. | |
133 | SUBST_FILES.vc= waftools/checks/custom.py | 152 | SUBST_FILES.vc= waftools/checks/custom.py | |
134 | SUBST_SED.vc+= -e 's;opt/vc;${PREFIX};g' | 153 | SUBST_SED.vc+= -e 's;opt/vc;${PREFIX};g' | |
135 | .endif | 154 | .endif | |
155 | ||||
156 | ### | |||
157 | ### Wayland support (video output) | |||
158 | ### | |||
159 | .if !empty(PKG_OPTIONS:Mwayland) | |||
160 | WAF_CONFIGURE_ARGS+= --enable-wayland | |||
161 | .include "../../devel/wayland/buildlink3.mk" | |||
162 | .include "../../devel/wayland-protocols/buildlink3.mk" | |||
163 | .include "../../x11/libxkbcommon/buildlink3.mk" | |||
164 | .else | |||
165 | WAF_CONFIGURE_ARGS+= --disable-wayland | |||
166 | .endif | |||
167 | ||||
168 | ### | |||
169 | ### X11 support (video output) | |||
170 | ### | |||
171 | .if !empty(PKG_OPTIONS:Mx11) | |||
172 | WAF_CONFIGURE_ARGS+= --enable-x11 | |||
173 | .include "../../x11/libXinerama/buildlink3.mk" | |||
174 | .include "../../x11/libXrandr/buildlink3.mk" | |||
175 | .include "../../x11/libXScrnSaver/buildlink3.mk" | |||
176 | .include "../../x11/libXv/buildlink3.mk" | |||
177 | .include "../../x11/libXxf86vm/buildlink3.mk" | |||
178 | .else | |||
179 | WAF_CONFIGURE_ARGS+= --disable-x11 | |||
180 | .endif |
$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"