pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/multimedia/mpv Add support for Raspberry Pi/GLES.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bc1dfd12eb52
branches:  trunk
changeset: 359421:bc1dfd12eb52
user:      nat <nat%pkgsrc.org@localhost>
date:      Fri Mar 10 15:55:33 2017 +0000

description:
Add support for Raspberry Pi/GLES.
Add support for SDL2.

LibASS is now optional.

Bump PKG_REVISION.

diffstat:

 multimedia/mpv/Makefile                                |   5 +-
 multimedia/mpv/distinfo                                |   5 +-
 multimedia/mpv/options.mk                              |  40 ++++++++++++++++-
 multimedia/mpv/patches/patch-player_main.c             |   6 +-
 multimedia/mpv/patches/patch-waftools_checks_custom.py |  16 +++++++
 5 files changed, 61 insertions(+), 11 deletions(-)

diffs (140 lines):

diff -r b83d47241a72 -r bc1dfd12eb52 multimedia/mpv/Makefile
--- a/multimedia/mpv/Makefile   Fri Mar 10 15:47:58 2017 +0000
+++ b/multimedia/mpv/Makefile   Fri Mar 10 15:55:33 2017 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.52 2017/02/24 21:54:52 maya Exp $
+# $NetBSD: Makefile,v 1.53 2017/03/10 15:55:33 nat Exp $
 
 DISTNAME=      mpv-0.24.0
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    multimedia
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=mpv-player/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -61,7 +61,6 @@
 .include "../../devel/waf/waf.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../lang/python/application.mk"
-.include "../../multimedia/libass/buildlink3.mk"
 .include "../../multimedia/libdvdnav/buildlink3.mk"
 .include "../../multimedia/libdvdread/buildlink3.mk"
 BUILDLINK_API_DEPENDS.ffmpeg3+=        ffmpeg3>=3.2.2
diff -r b83d47241a72 -r bc1dfd12eb52 multimedia/mpv/distinfo
--- a/multimedia/mpv/distinfo   Fri Mar 10 15:47:58 2017 +0000
+++ b/multimedia/mpv/distinfo   Fri Mar 10 15:55:33 2017 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.31 2017/02/12 22:02:28 leot Exp $
+$NetBSD: distinfo,v 1.32 2017/03/10 15:55:33 nat Exp $
 
 SHA1 (mpv-0.24.0.tar.gz) = ade12ce6a626fdba5cbdb41444805f1ed3dfcb36
 RMD160 (mpv-0.24.0.tar.gz) = 436b62cfd50594e5dd3782cc9eae8f9bf9364501
 SHA512 (mpv-0.24.0.tar.gz) = c1d988ccf9e22765822b9ce75c04f155df4fc4bd4c2aa164903eee8947c36f659116c2ab96668a4af31c4f5aeecbf20ce21191c48456d74e138db617a1e34d96
 Size (mpv-0.24.0.tar.gz) = 2835920 bytes
-SHA1 (patch-player_main.c) = fefba566f5130d24b748b7ab4ecc48bf42bc6bdd
+SHA1 (patch-player_main.c) = 842432e448526a9d170e7efd2b01276e36072e16
+SHA1 (patch-waftools_checks_custom.py) = 4bfc74fa6b2c80bef3f540ad8287eb26cb39c6ad
diff -r b83d47241a72 -r bc1dfd12eb52 multimedia/mpv/options.mk
--- a/multimedia/mpv/options.mk Fri Mar 10 15:47:58 2017 +0000
+++ b/multimedia/mpv/options.mk Fri Mar 10 15:55:33 2017 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: options.mk,v 1.6 2017/01/31 01:37:19 khorben Exp $
+# $NetBSD: options.mk,v 1.7 2017/03/10 15:55:33 nat Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.mpv
-PKG_SUPPORTED_OPTIONS= caca lua pulseaudio sdl v4l2
-PKG_SUGGESTED_OPTIONS= lua pulseaudio
+PKG_SUPPORTED_OPTIONS= caca lua pulseaudio sdl v4l2 sdl2 rpi libass
+PKG_SUGGESTED_OPTIONS= lua
 
 .include "../../mk/bsd.options.mk"
 
@@ -38,6 +38,18 @@
 .endif
 
 ###
+###
+### SDL2 support
+###
+.if !empty(PKG_OPTIONS:Msdl2)
+WAF_CONFIGURE_ARGS+=   --enable-sdl2
+.include "../../devel/SDL2/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+=   --disable-sdl2
+.endif
+
+###
+###
 ### SDL support (audio output)
 ###
 .if !empty(PKG_OPTIONS:Msdl)
@@ -48,6 +60,15 @@
 .endif
 
 ###
+### libASS support
+###
+.if !empty(PKG_OPTIONS:Mlibass)
+WAF_CONFIGURE_ARGS+=   --enable-libass
+.else
+WAF_CONFIGURE_ARGS+=   --disable-libass
+.endif
+
+###
 ### V4L2 support
 ###
 .if !empty(PKG_OPTIONS:Mv4l2)
@@ -55,3 +76,16 @@
 .else
 WAF_CONFIGURE_ARGS+=   --disable-libv4l2
 .endif
+
+###
+### Raspberry Pi support
+###
+.if !empty(PKG_OPTIONS:Mrpi)
+.include "../../misc/raspberrypi-userland/buildlink3.mk"
+CFLAGS+="-L${PREFIX}/lib"
+SUBST_CLASSES+=                vc
+SUBST_STAGE.vc=                pre-configure
+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
diff -r b83d47241a72 -r bc1dfd12eb52 multimedia/mpv/patches/patch-player_main.c
--- a/multimedia/mpv/patches/patch-player_main.c        Fri Mar 10 15:47:58 2017 +0000
+++ b/multimedia/mpv/patches/patch-player_main.c        Fri Mar 10 15:55:33 2017 +0000
@@ -1,11 +1,11 @@
-$NetBSD: patch-player_main.c,v 1.1 2016/11/03 14:41:28 leot Exp $
+$NetBSD: patch-player_main.c,v 1.2 2017/03/10 15:55:33 nat Exp $
 
 Avoid to check mismatched built vs running libraries version.
 The use in pkgsrc can be considered a legitimate one.
 
---- player/main.c.orig 2016-10-19 21:10:13.000000000 +0000
+--- player/main.c.orig 2017-02-12 01:31:16.000000000 +0000
 +++ player/main.c
-@@ -429,18 +429,6 @@ int mp_initialize(struct MPContext *mpct
+@@ -438,18 +438,6 @@ int mp_initialize(struct MPContext *mpct
  
      handle_deprecated_options(mpctx);
  
diff -r b83d47241a72 -r bc1dfd12eb52 multimedia/mpv/patches/patch-waftools_checks_custom.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/mpv/patches/patch-waftools_checks_custom.py    Fri Mar 10 15:55:33 2017 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-waftools_checks_custom.py,v 1.1 2017/03/10 15:55:33 nat Exp $
+
+Pkgconfig descriptions are not available for rpi_userland on NetBSD.
+
+--- waftools/checks/custom.py.orig     2017-03-10 15:24:39.000000000 +0000
++++ waftools/checks/custom.py
+@@ -142,9 +142,6 @@ def check_rpi(ctx, dependency_identifier
+                       prev_pkg_path]))
+ 
+     checks = [
+-        check_pkg_config('bcm_host', uselib_store='bcm_host'),
+-        check_pkg_config('egl'),
+-        check_pkg_config('glesv2'),
+         check_cc(lib=['mmal_core', 'mmal_util', 'mmal_vc_client'], use=['bcm_host']),
+         # We still need all OpenGL symbols, because the vo_opengl code is
+         # generic and supports anything from GLES2/OpenGL 2.1 to OpenGL 4 core.



Home | Main Index | Thread Index | Old Index