diff options
author | Grzegorz Blach <gblach@FreeBSD.org> | 2013-07-16 17:52:47 +0000 |
---|---|---|
committer | Grzegorz Blach <gblach@FreeBSD.org> | 2013-07-16 17:52:47 +0000 |
commit | 39777dc000c4d96980d1208126c9afcfc1ed55f2 (patch) | |
tree | 04b6d845af075dd5395d1da1e5a0947e0f481613 /multimedia/mpv | |
parent | - Fix conflict with mail/dovecot2 (diff) |
Add new port multimedia/mpv:
Mpv is a free and open-source general-purpose video player.
Mpv is based on the MPlayer and mplayer2 projects which it greatly improves.
Approved by: crees (mentor)
Notes
Notes:
svn path=/head/; revision=323116
Diffstat (limited to 'multimedia/mpv')
-rw-r--r-- | multimedia/mpv/Makefile | 182 | ||||
-rw-r--r-- | multimedia/mpv/distinfo | 2 | ||||
-rw-r--r-- | multimedia/mpv/files/patch-stream-tvi_v4l2.c | 25 | ||||
-rw-r--r-- | multimedia/mpv/pkg-descr | 4 | ||||
-rw-r--r-- | multimedia/mpv/pkg-plist | 5 |
5 files changed, 218 insertions, 0 deletions
diff --git a/multimedia/mpv/Makefile b/multimedia/mpv/Makefile new file mode 100644 index 000000000000..de7d00c3a59f --- /dev/null +++ b/multimedia/mpv/Makefile @@ -0,0 +1,182 @@ +# Created by: Grzegorz Blach <gblach@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= mpv +PORTVERSION= 20130711 +CATEGORIES= multimedia audio +MASTER_SITES= LOCAL/gblach/ + +MAINTAINER= gblach@FreeBSD.org +COMMENT= Free and open-source general-purpose video player + +LICENSE= GPLv3 + +LIB_DEPENDS= ass:${PORTSDIR}/multimedia/libass \ + dvdread:${PORTSDIR}/multimedia/libdvdread +BUILD_DEPENDS= ffmpeg1:${PORTSDIR}/multimedia/ffmpeg1 \ + rst2man:${PORTSDIR}/textproc/py-docutils +RUN_DEPENDS= ffmpeg1:${PORTSDIR}/multimedia/ffmpeg1 + +USE_XZ= yes +USES= gmake iconv +USE_XORG= x11 xv xxf86vm +HAS_CONFIGURE= yes +CONFIGURE_ARGS= --prefix=${PREFIX} \ + --mandir=${PREFIX}/man \ + --cc=${CC} \ + --extra-cflags=' \ + -I${LOCALBASE}/include/ffmpeg1 \ + -I${LOCALBASE}/include' \ + --extra-ldflags=' \ + -L${LOCALBASE}/lib/ffmpeg1 \ + -L${LOCALBASE}/lib' \ + --disable-mng \ + --disable-mpg123 \ + --disable-alsa \ + --disable-portaudio + +OPTIONS_DEFINE= BS2B DEBUG LADSPA LIRC +OPTIONS_GROUP= IN VO AO +OPTIONS_GROUP_IN= CDIO LIBBLURAY V4L QUVI SMB +OPTIONS_GROUP_VO= OPENGL VDPAU XINERAMA +OPTIONS_GROUP_AO= JACK PULSEAUDIO + +BS2B_DESC= Enable Bauer Stereophonic-to-Binaural DSP support +QUVI_DESC= Enable flash media stream support +IN_DESC= Input +VO_DESC= Video Output +AO_DESC= Audio Output + +MAKE_JOBS_SAFE= yes + +MAN1= mpv.1 +MANCOMPRESSED= no + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MLIBBLURAY} +LIB_DEPENDS+= bs2b:${PORTSDIR}/audio/libbs2b +.else +CONFIGURE_ARGS+= --disable-libbs2b +.endif + +.if ${PORT_OPTIONS:MDEBUG} +CONFIGURE_ARGS+= --disable-optimization +.else +CONFIGURE_ARGS+= --enable-optimization="${CFLAGS}" \ + --disable-debug +.endif + +.if ${PORT_OPTIONS:MLADSPA} +RUN_DEPENDS+= ${LOCALBASE}/lib/ladspa/amp.so:${PORTSDIR}/audio/ladspa +.else +CONFIGURE_ARGS+= --disable-ladspa +.endif + +.if ${PORT_OPTIONS:MLIRC} +LIB_DEPENDS+= lirc_client:${PORTSDIR}/comms/lirc +.else +CONFIGURE_ARGS+= --disable-lirc +.endif + +.if ${PORT_OPTIONS:MLIBBLURAY} +LIB_DEPENDS+= cdio:${PORTSDIR}/sysutils/libcdio +.else +CONFIGURE_ARGS+= --disable-libcdio +.endif + +.if ${PORT_OPTIONS:MLIBBLURAY} +LIB_DEPENDS+= bluray:${PORTSDIR}/multimedia/libbluray +.else +CONFIGURE_ARGS+= --disable-bluray +.endif + +.if ${PORT_OPTIONS:MV4L} +BUILD_DEPENDS+= ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat +LIB_DEPENDS+= v4l2:${PORTSDIR}/multimedia/libv4l +CONFIGURE_ARGS+= --enable-tv-v4l2 +EXTRA_LIBS+= -lv4l2 +.else +CONFIGURE_ARGS+= --disable-tv-v4l2 +.endif + +.if ${PORT_OPTIONS:MQUVI} +LIB_DEPENDS+= quvi:${PORTSDIR}/multimedia/libquvi +.else +CONFIGURE_ARGS+= --disable-libquvi4 --disable-libquvi9 +.endif + +.if ${PORT_OPTIONS:MSMB} +LIB_DEPENDS+= smbclient:${PORTSDIR}/net/samba-libsmbclient +.else +CONFIGURE_ARGS+= --disable-smb +.endif + +.if ${PORT_OPTIONS:MOPENGL} +USE_XORG+= glproto +LIB_DEPENDS+= GL:${PORTSDIR}/graphics/libGL +.else +CONFIGURE_ARGS+= --disable-gl +.endif + +.if ${PORT_OPTIONS:MVDPAU} +LIB_DEPENDS+= vdpau:${PORTSDIR}/multimedia/libvdpau +.else +CONFIGURE_ARGS+= --disable-vdpau +.endif + +.if ${PORT_OPTIONS:MXINERAMA} +USE_XORG+= xinerama xineramaproto +.else +CONFIGURE_ARGS+= --disable-xinerama +.endif + +.if ${PORT_OPTIONS:MJACK} +LIB_DEPENDS+= jack:${PORTSDIR}/audio/jack +.else +CONFIGURE_ARGS+= --disable-jack +.endif + +.if ${PORT_OPTIONS:MPULSEAUDIO} +LIB_DEPENDS+= pulse:${PORTSDIR}/audio/pulseaudio +.else +CONFIGURE_ARGS+= --disable-pulse +.endif + +.if defined(EXTRA_LIBS) +CONFIGURE_ARGS+= --extra-libs="${EXTRA_LIBS}" +.endif + +post-patch: +.if ${OSVERSION} >= 900010 + @${REINPLACE_CMD} -e \ + '/CFLAGS.*-D_LARGEFILE64_SOURCE/ s/-D_LARGEFILE64_SOURCE/-D_FILE_OFFSET_BITS=64/' \ + ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} +.endif + @${REINPLACE_CMD} \ + -e 's/libavutil/libavutil1/' \ + -e 's/libavcodec/libavcodec1/' \ + -e 's/libavdevice/libavdevice1/' \ + -e 's/libavformat/libavformat1/' \ + -e 's/libavresample/libavresample1/' \ + -e 's/libpostproc/libpostproc1/' \ + -e 's/libswscale/libswscale1/' \ + -e 's/libswresample/libswresample1/' \ + ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} + @${REINPLACE_CMD} \ + -e 's|/dev/acd0|/dev/cd0|' \ + -e 's|-lncurses|/usr/lib/libncurses.so|' \ + ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} + @${FIND} ${WRKSRC}/DOCS/man -name '*.rst' | ${XARGS} ${REINPLACE_CMD} \ + -e 's|/usr/local|${PREFIX}|g' \ + -e 's|/dev/cdrom|/dev/cd0|g' \ + -e 's|/dev/dvd|/dev/cd0|g' + +post-install: + ${MKDIR} ${PREFIX}/etc/mpv + ${INSTALL_DATA} ${WRKSRC}/etc/example.conf ${PREFIX}/etc/mpv/mpv.conf.sample +.for conf in encoding-example-profiles input + ${INSTALL_DATA} ${WRKSRC}/etc/${conf}.conf ${PREFIX}/etc/mpv/${conf}.conf.sample +.endfor + +.include <bsd.port.mk> diff --git a/multimedia/mpv/distinfo b/multimedia/mpv/distinfo new file mode 100644 index 000000000000..77ce9c8d39da --- /dev/null +++ b/multimedia/mpv/distinfo @@ -0,0 +1,2 @@ +SHA256 (mpv-20130711.tar.xz) = 07b49aeeb3145a2149a343d66e6d99a63e247cb1a6b590fe178f0ad8786c824a +SIZE (mpv-20130711.tar.xz) = 1292012 diff --git a/multimedia/mpv/files/patch-stream-tvi_v4l2.c b/multimedia/mpv/files/patch-stream-tvi_v4l2.c new file mode 100644 index 000000000000..489fd4323753 --- /dev/null +++ b/multimedia/mpv/files/patch-stream-tvi_v4l2.c @@ -0,0 +1,25 @@ +--- stream/tvi_v4l2.c~ 2012-05-10 23:45:22.000000000 -0500 ++++ stream/tvi_v4l2.c 2012-05-11 00:08:34.930938536 -0500 +@@ -52,7 +52,6 @@ known issues: + #ifdef HAVE_SYS_VIDEOIO_H + #include <sys/videoio.h> + #else +-#include <linux/types.h> + #include <linux/videodev2.h> + #endif + #include "mp_msg.h" +@@ -62,6 +61,14 @@ known issues: + #include "tv.h" + #include "audio_in.h" + ++#include <libv4l2.h> ++#define open v4l2_open ++#define close v4l2_close ++#define dup v4l2_dup ++#define ioctl v4l2_ioctl ++#define mmap v4l2_mmap ++#define munmap v4l2_munmap ++ + #define info tvi_info_v4l2 + static tvi_handle_t *tvi_init_v4l2(tv_param_t* tv_param); + /* information about this file */ diff --git a/multimedia/mpv/pkg-descr b/multimedia/mpv/pkg-descr new file mode 100644 index 000000000000..bda10dde5a16 --- /dev/null +++ b/multimedia/mpv/pkg-descr @@ -0,0 +1,4 @@ +Mpv is a free and open-source general-purpose video player. +Mpv is based on the MPlayer and mplayer2 projects which it greatly improves. + +WWW: http://mpv.io/ diff --git a/multimedia/mpv/pkg-plist b/multimedia/mpv/pkg-plist new file mode 100644 index 000000000000..a0eb10596173 --- /dev/null +++ b/multimedia/mpv/pkg-plist @@ -0,0 +1,5 @@ +bin/mpv +etc/mpv/encoding-example-profiles.conf.sample +etc/mpv/input.conf.sample +etc/mpv/mpv.conf.sample +@dirrmtry etc/mpv |