Hi!

Attached diff updates multimedia/mpv to version 0.15.0.  Starting from
this release mpv does not include old build infrastructure, so waf (!)
becomes absolutely required to build this port.

In theory waf is supposed to be included with software.  For some reason
mpv people don't do so - they provide a script for fetching waf at
configure stage.  Thus I also include a port for waf.  The port contains
a module, which is supposed to be useful for waf-based ports.

Comments?  OKs?

-- 
Dmitrij D. Czarkoff
Index: Makefile
===================================================================
RCS file: /cvs/ports/multimedia/mpv/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- Makefile    12 Jan 2016 09:09:57 -0000      1.22
+++ Makefile    30 Jan 2016 01:58:57 -0000
@@ -1,13 +1,13 @@
-# $OpenBSD: Makefile,v 1.22 2016/01/12 09:09:57 czarkoff Exp $
+# $OpenBSD$
 
 # archs with atomic ops
 ONLY_FOR_ARCHS =       alpha amd64 i386 mips64 mips64el powerpc sparc64
 
 COMMENT =              movie player based on MPlayer/mplayer2
 
-GH_ACCOUNT=            mpv-player
-GH_PROJECT=            mpv
-GH_TAGNAME=            v0.14.0
+GH_ACCOUNT =           mpv-player
+GH_PROJECT =           mpv
+GH_TAGNAME =           v0.15.0
 
 CATEGORIES =           multimedia x11
 
@@ -19,12 +19,17 @@ MAINTAINER =                Dmitrij D. Czarkoff <czark
 PERMIT_PACKAGE_CDROM = patents
 PERMIT_PACKAGE_FTP =   Yes
 
-WANTLIB += EGL GL SDL2 X11 Xext Xinerama Xrandr Xss Xv ass avcodec
-WANTLIB += avdevice avfilter avformat avutil bluray c cdio cdio_cdda
-WANTLIB += cdio_paranoia dvdnav dvdread jpeg lcms2 m pthread smbclient
-WANTLIB += sndio swresample swscale v4l2 z ${MODLUA_WANTLIB}
+WANTLIB += EGL GL SDL2 X11 X11-xcb Xau Xdamage Xdmcp Xext Xfixes
+WANTLIB += Xinerama Xrandr Xrender Xss Xv Xxf86vm ass avcodec
+WANTLIB += avdevice avfilter avformat avresample avutil bluray
+WANTLIB += c cdio cdio_cdda cdio_paranoia drm dvdnav dvdread expat
+WANTLIB += fontconfig freetype fribidi jpeg lcms2 m opus postproc
+WANTLIB += pthread pthread-stubs smbclient sndio speex swresample
+WANTLIB += swscale v4l2 v4lconvert vpx x264 x265 xcb xcb-dri2
+WANTLIB += xcb-glx z ${MODLUA_WANTLIB}
 
 MODULES =              converters/libiconv \
+                       devel/waf \
                        lang/lua \
                        lang/python
 
@@ -44,48 +49,60 @@ LIB_DEPENDS =               audio/libcdio \
                        multimedia/libv4l \
                        net/samba
 
-# zsh.pl needs to find the binary that was just built
-PORTPATH =             \
-       
${WRKDIR}/bin:${WRKBUILD}:/usr/bin:/bin:/usr/sbin:/sbin:${DEPBASE}/bin:${LOCALBASE}/bin:${X11BASE}/bin
-
+MODPY_RUNDEP ?=                No
 RUN_DEPENDS =          devel/desktop-file-utils \
                        x11/gtk+3,-guic
 
-CFLAGS +=              -I. -I.. -I${LOCALBASE}/include
-
-CONFIGURE_STYLE =      simple
-CONFIGURE_SCRIPT =     TOOLS/old-configure
-CONFIGURE_ARGS +=      --confdir=${SYSCONFDIR}/mpv \
+CONFIGURE_STYLE =      waf
+MODWAF_SYSTEM_WAF =    Yes
+CONFIGURE_ARGS =       --confloaddir=${SYSCONFDIR}/mpv \
+                       --confdir=${LOCALBASE}/share/examples/mpv \
                        --mandir=${LOCALBASE}/man \
-                       --extra-ldflags="`pkg-config --libs sdl2`" \
-                       --extra-cflags="`pkg-config --cflags sdl2`" \
+                       --docdir=${LOCALBASE}/share/examples/mpv \
+                       --zshdir=${LOCALBASE}/share/zsh/vendor-completions \
+                       --enable-sndio \
                        --enable-sdl2 \
+                       --enable-zsh-comp \
                        --disable-alsa \
                        --disable-caca \
+                       --disable-dxva2-hwaccel \
                        --disable-enca \
+                       --disable-gpl3 \
                        --disable-jack \
                        --disable-libarchive \
                        --disable-libguess \
-                       --disable-ossaudio \
-                       --disable-optimization \
+                       --disable-rubberband \
+                       --disable-oss-audio \
                        --disable-openal \
+                       --disable-optimize \
                        --disable-pulse \
                        --disable-rsound \
-                       --disable-uchardet
-CONFIGURE_ENV +=       TMPDIR=${WRKBUILD}
+                       --disable-uchardet \
+                       --disable-vaapi \
+                       --disable-vaapi-glx \
+                       --disable-vaapi-hwaccel \
+                       --disable-vaapi-x-egl \
+                       --disable-vaapi-x11 \
+                       --disable-vaapi-wayland \
+                       --disable-vapoursynth \
+                       --disable-vapoursynth-lazy \
+                       --disable-vdpau \
+                       --disable-vdpau-hwaccel \
+                       --disable-videotoolbox-hwaccel \
+                       --disable-videotoolbox-gl \
+                       --disable-wayland
 
-USE_GMAKE =            Yes
-MAKE_FLAGS =           V=1
-FAKE_FLAGS =           CONFDIR=${DESTDIR}${PREFIX}/share/examples/mpv
+MAKE_ENV +=            LDFLAGS="-L${LOCALBASE}/lib"
+MAKE_ENV +=            CPPFLAGS="-I${LOCALBASE}/include"
 
 USE_GROFF =            Yes
 NO_TEST =              Yes
 
 post-install:
-       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mpv
-       ${INSTALL_DATA} ${WRKDIST}/etc/*.conf \
-                       ${WRKDIST}/TOOLS/mpv_identify.sh \
-                       ${WRKDIST}/TOOLS/umpv \
-                               ${PREFIX}/share/examples/mpv
+       @${INSTALL_DATA} ${WRKDIST}/TOOLS/mpv_identify.sh \
+                        ${WRKDIST}/TOOLS/umpv \
+                                               ${PREFIX}/share/examples/mpv
+       @${MODPY_BIN_ADJ} ${PREFIX}/share/examples/mpv/umpv
+       @sed -Ei 's,(/dev/dvd|/dev/cdrom),/dev/rcd0c,g' ${PREFIX}/man/man1/mpv.1
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/multimedia/mpv/distinfo,v
retrieving revision 1.10
diff -u -p -r1.10 distinfo
--- distinfo    12 Jan 2016 09:09:57 -0000      1.10
+++ distinfo    29 Jan 2016 13:18:30 -0000
@@ -1,2 +1,2 @@
-SHA256 (mpv-0.14.0.tar.gz) = BCk39INgPww9HewR6PAEXown8Z7uRupk2Bo83wHlEjM=
-SIZE (mpv-0.14.0.tar.gz) = 2872619
+SHA256 (mpv-0.15.0.tar.gz) = fTEhe6hXLzZPzqKVVzP4ITdK5tjG2PIvi8Y8RMBAC9w=
+SIZE (mpv-0.15.0.tar.gz) = 2849513
Index: patches/patch-DOCS_man_options_rst
===================================================================
RCS file: patches/patch-DOCS_man_options_rst
diff -N patches/patch-DOCS_man_options_rst
--- patches/patch-DOCS_man_options_rst  12 Jan 2016 09:09:57 -0000      1.6
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-DOCS_man_options_rst,v 1.6 2016/01/12 09:09:57 czarkoff Exp $
---- DOCS/man/options.rst.orig  Fri Dec 11 13:20:29 2015
-+++ DOCS/man/options.rst       Tue Dec 15 00:16:05 2015
-@@ -2044,10 +2044,10 @@ Disc Devices
- ------------
- 
- ``--cdrom-device=<path>``
--    Specify the CD-ROM device (default: ``/dev/cdrom``).
-+    Specify the CD-ROM device (default: ``/dev/rcd0c``).
- 
- ``--dvd-device=<path>``
--    Specify the DVD device or .iso filename (default: ``/dev/dvd``). You can
-+    Specify the DVD device or .iso filename (default: ``/dev/rcd0c``). You can
-     also specify a directory that contains files previously copied directly
-     from a DVD (with e.g. vobcopy).
- 
Index: patches/patch-TOOLS_old-configure
===================================================================
RCS file: patches/patch-TOOLS_old-configure
diff -N patches/patch-TOOLS_old-configure
--- patches/patch-TOOLS_old-configure   12 Jan 2016 09:09:57 -0000      1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,66 +0,0 @@
-$OpenBSD: patch-TOOLS_old-configure,v 1.5 2016/01/12 09:09:57 czarkoff Exp $
-
-- Adjust for BSD fstatfs
-- Disable the use of SSE4 intrinsics
-- Disable the use of C11
-- Disable extra compiler flags
-
---- TOOLS/old-configure.orig   Fri Dec 11 19:20:29 2015
-+++ TOOLS/old-configure        Sat Jan  9 20:35:38 2016
-@@ -379,16 +379,8 @@ cflag_check -pipe -I. && _pipe="-pipe" && echores "yes
- 
- addcflags() { cflag_check "$@" && OURCFLAGS="$OURCFLAGS $@" ; }
- 
--OURCFLAGS="-std=c99 -Wall $_opt"
-+OURCFLAGS="-std=c99 $_opt"
- 
--addcflags -g -g3 -ggdb
--addcflags -Wundef -Wmissing-prototypes -Wshadow -Wno-switch -Wparentheses 
-Wpointer-arith -Wno-redundant-decls -Wno-pointer-sign 
-Werror=implicit-function-declaration -Wno-error=deprecated-declarations 
-Wno-error=unused-function
--# clang
--addcflags -Wno-logical-op-parentheses -fcolor-diagnostics 
-Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare
--# extra
--addcflags -Wno-format-zero-length -Wempty-body -Wdisabled-optimization 
-Wstrict-prototypes
--
--cflag_check -MD -MP && DEPFLAGS="-MD -MP"
- cflag_check -lm && _ld_lm="-lm"
- 
- extra_ldflags="$extra_ldflags $LDFLAGS"
-@@ -827,8 +819,12 @@ check_pkg_config "libavdevice" $_libavdevice LIBAVDEVI
- 
- check_trivial "TV interface" $_tv TV
- 
-+_v4l2_header=linux/videodev2.h
-+if test $(uname -s) = OpenBSD ; then
-+    _v4l2_header=sys/videoio.h
-+fi
- check_statement_libs "Video 4 Linux 2 TV interface" $_tv_v4l2 TV_V4L2 \
--    "sys/time.h linux/videodev2.h"
-+    "sys/time.h ${_v4l2_header}"
- _tv_v4l2=$(defretval)
- check_trivial "TV audio input" $_tv_v4l2 AUDIO_INPUT
- 
-@@ -938,8 +934,8 @@ cat > $TMPC << EOF
- 
- /* we didn't bother to add actual config checks for this, or they are
-    for platforms not supported by this configure script */
--#define HAVE_BSD_FSTATFS 0
--#define HAVE_LINUX_FSTATFS 1
-+#define HAVE_BSD_FSTATFS 1
-+#define HAVE_LINUX_FSTATFS 0
- #define HAVE_GL_COCOA 0
- #define HAVE_COCOA 0
- #define HAVE_COCOA_APPLICATION 0
-@@ -969,10 +965,10 @@ cat > $TMPC << EOF
- #define HAVE_EGL_DRM 0
- #define HAVE_VIDEOTOOLBOX_HWACCEL 0
- #define HAVE_VIDEOTOOLBOX_GL 0
--#define HAVE_SSE4_INTRINSICS 1
--#define HAVE_C11_TLS 1
-+#define HAVE_SSE4_INTRINSICS 0
-+#define HAVE_C11_TLS 0
- #define HAVE_EGL_ANGLE 0
--#define HAVE_GPL3 1
-+#define HAVE_GPL3 0
- #define HAVE_WIN32 0
- 
- #ifdef __OpenBSD__
Index: patches/patch-TOOLS_old-makefile
===================================================================
RCS file: patches/patch-TOOLS_old-makefile
diff -N patches/patch-TOOLS_old-makefile
--- patches/patch-TOOLS_old-makefile    12 Jan 2016 09:09:57 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-TOOLS_old-makefile,v 1.2 2016/01/12 09:09:57 czarkoff Exp $
-
-Disable the use of SSE4 intrinsics
-
---- TOOLS/old-makefile.orig    Fri Dec 11 13:20:29 2015
-+++ TOOLS/old-makefile Tue Dec 15 00:20:33 2015
-@@ -233,7 +233,6 @@ SOURCES = audio/audio.c \
-           ta/ta_talloc.c \
-           video/csputils.c \
-           video/fmt-conversion.c \
--          video/gpu_memcpy.c \
-           video/image_writer.c \
-           video/img_format.c \
-           video/mp_image.c \
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/multimedia/mpv/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST   11 Jan 2015 08:21:39 -0000      1.1.1.1
+++ pkg/PLIST   29 Jan 2016 13:16:40 -0000
@@ -6,15 +6,16 @@ share/examples/mpv/
 @sample ${SYSCONFDIR}/mpv/
 share/examples/mpv/encoding-profiles.conf
 @sample ${SYSCONFDIR}/mpv/encoding-profiles.conf
-share/examples/mpv/example.conf
 share/examples/mpv/input.conf
 share/examples/mpv/mplayer-input.conf
+share/examples/mpv/mpv.conf
 share/examples/mpv/mpv_identify.sh
 share/examples/mpv/restore-old-bindings.conf
 share/examples/mpv/umpv
 share/icons/hicolor/16x16/apps/mpv.png
 share/icons/hicolor/32x32/apps/mpv.png
 share/icons/hicolor/64x64/apps/mpv.png
+share/icons/hicolor/scalable/apps/mpv.svg
 @exec %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor
 @unexec-delete %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor
 @exec %D/bin/update-desktop-database

Attachment: waf-1.8.19.tgz
Description: application/tar-gz

Reply via email to