From 1ef012296159b07304e6489923fb1559cf9bcb6e Mon Sep 17 00:00:00 2001 From: ryoon Date: Tue, 17 May 2022 13:12:13 +0000 Subject: mpv: Add some dependencies and options * Bump PKGREVISION because default option has changed. * Add archivers/libarchive as dependency to enable to play files in ZIP archive. * Add sixel option and enable by default. --- multimedia/mpv/Makefile | 5 +++-- multimedia/mpv/distinfo | 3 ++- multimedia/mpv/options.mk | 16 +++++++++++++--- .../mpv/patches/patch-stream_stream__libarchive.c | 17 +++++++++++++++++ 4 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 multimedia/mpv/patches/patch-stream_stream__libarchive.c (limited to 'multimedia/mpv') diff --git a/multimedia/mpv/Makefile b/multimedia/mpv/Makefile index b5208872920..4b5bf356a49 100644 --- a/multimedia/mpv/Makefile +++ b/multimedia/mpv/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.135 2022/05/03 07:04:27 nia Exp $ +# $NetBSD: Makefile,v 1.136 2022/05/17 13:12:13 ryoon Exp $ DISTNAME= mpv-0.34.1 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= multimedia MASTER_SITES= ${MASTER_SITE_GITHUB:=mpv-player/} GITHUB_TAG= v${PKGVERSION_NOREV} @@ -68,6 +68,7 @@ post-install: ${DESTDIR}${PREFIX}/share/examples/mpv/mpv.conf .include "options.mk" +.include "../../archivers/libarchive/buildlink3.mk" .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 91f7dbe0233..425bfbe523c 100644 --- a/multimedia/mpv/distinfo +++ b/multimedia/mpv/distinfo @@ -1,10 +1,11 @@ -$NetBSD: distinfo,v 1.74 2022/05/03 07:04:27 nia Exp $ +$NetBSD: distinfo,v 1.75 2022/05/17 13:12:13 ryoon Exp $ BLAKE2s (mpv-0.34.1.tar.gz) = 8c12b91067c852b26e1b044afb0ff1e80f1950f2c5cc193cc10ffbef227eb4da SHA512 (mpv-0.34.1.tar.gz) = 77ea349d6999f8cce9b5cce4cebd3506a224fc18ab08d22dd16bd34c34d012bb170879b268ddd62db40d116b4cc0b2d9d651b8097f387ed9115c426834cac77e Size (mpv-0.34.1.tar.gz) = 3288356 bytes SHA1 (patch-audio_out_ao__alsa.c) = c4661d0d22550d6e4eb2b7a42dd04dbcc58123b0 SHA1 (patch-etc_mpv.conf) = 9e41b2f4bf59c3bfc5ad84af05538661981ed111 +SHA1 (patch-stream_stream__libarchive.c) = 2025f994b7f82cc868608ab7e8df0ae89b549922 SHA1 (patch-video_out_drm__common.c) = 70eb8884f63e9456c0ffe592289cfd81e208955b SHA1 (patch-video_out_wayland__common.c) = abed416d258ebf0b595ea897daf3013dd81189e8 SHA1 (patch-wscript) = c7bb9c506718c38aded9ca47e7aa0d76cf338bf2 diff --git a/multimedia/mpv/options.mk b/multimedia/mpv/options.mk index 4f0f8b4730c..7b612404081 100644 --- a/multimedia/mpv/options.mk +++ b/multimedia/mpv/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.28 2021/04/25 06:09:41 nia Exp $ +# $NetBSD: options.mk,v 1.29 2022/05/17 13:12:13 ryoon Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.mpv @@ -9,13 +9,13 @@ PKG_OPTIONS_GROUP.gl= opengl rpi # audio outputs PKG_SUPPORTED_OPTIONS+= alsa jack openal pulseaudio # video outputs -PKG_SUPPORTED_OPTIONS+= caca libdrm x11 +PKG_SUPPORTED_OPTIONS+= caca libdrm sixel x11 # audio/video outputs PKG_SUPPORTED_OPTIONS+= sdl2 # misc PKG_SUPPORTED_OPTIONS+= bluray lua -PKG_SUGGESTED_OPTIONS= bluray lua sdl2 +PKG_SUGGESTED_OPTIONS= bluray lua sdl2 sixel PKG_SUGGESTED_OPTIONS.Linux+= alsa pulseaudio .include "../../mk/bsd.fast.prefs.mk" @@ -201,3 +201,13 @@ WAF_CONFIGURE_ARGS+= --enable-x11 .else WAF_CONFIGURE_ARGS+= --disable-x11 .endif + +### +### Sixel support (video output) +### +.if !empty(PKG_OPTIONS:Msixel) +WAF_CONFIGURE_ARGS+= --enable-sixel +.include "../../graphics/libsixel/buildlink3.mk" +.else +WAF_CONFIGURE_ARGS+= --disable-sixel +.endif diff --git a/multimedia/mpv/patches/patch-stream_stream__libarchive.c b/multimedia/mpv/patches/patch-stream_stream__libarchive.c new file mode 100644 index 00000000000..e5ca14f35ef --- /dev/null +++ b/multimedia/mpv/patches/patch-stream_stream__libarchive.c @@ -0,0 +1,17 @@ +$NetBSD: patch-stream_stream__libarchive.c,v 1.1 2022/05/17 13:12:13 ryoon Exp $ + +* NetBSD does not implement uselocale(). + +--- stream/stream_libarchive.c.orig 2022-01-03 19:45:08.000000000 +0000 ++++ stream/stream_libarchive.c +@@ -29,6 +29,10 @@ + #define MP_ARCHIVE_FLAG_MAYBE_RAR (MP_ARCHIVE_FLAG_PRIV << 1) + #define MP_ARCHIVE_FLAG_MAYBE_VOLUMES (MP_ARCHIVE_FLAG_PRIV << 2) + ++#if defined(__NetBSD__) ++#define uselocale(locale) NULL ++#endif ++ + struct mp_archive_volume { + struct mp_archive *mpa; + int index; // volume number (starting with 0, mp_archive.primary_src) -- cgit v1.2.3