aboutsummaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorCarlos J. Puga Medina <cpm@FreeBSD.org>2017-06-20 20:50:34 +0000
committerCarlos J. Puga Medina <cpm@FreeBSD.org>2017-06-20 20:50:34 +0000
commit97d03458f6679c28566592da9d39fcb6d8b5bbea (patch)
tree58e096c3de3ccef154651fa48c940379b8ffe649 /multimedia
parenta7ea9c8fe67a9c2a449bb8665f4dbb193a98ac83 (diff)
downloadports-97d03458f6679c28566592da9d39fcb6d8b5bbea.tar.gz
ports-97d03458f6679c28566592da9d39fcb6d8b5bbea.zip
Notes
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/mpv/Makefile34
1 files changed, 22 insertions, 12 deletions
diff --git a/multimedia/mpv/Makefile b/multimedia/mpv/Makefile
index 37f39b677960..f731bd1f21b0 100644
--- a/multimedia/mpv/Makefile
+++ b/multimedia/mpv/Makefile
@@ -28,10 +28,10 @@ USES= compiler:c11 desktop-file-utils iconv jpeg localbase:ldflags \
pkgconfig python:build waf
USE_LDCONFIG= yes
-CONFIGURE_ENV= BIN_PYTHON=${PYTHON_CMD}
-CONFIGURE_ARGS= --docdir=${EXAMPLESDIR} \
- --htmldir=${DOCSDIR}/html \
- --mandir=${MANPREFIX}/man \
+CONFIGURE_ENV= BIN_PYTHON="${PYTHON_CMD}"
+CONFIGURE_ARGS= --docdir="${EXAMPLESDIR}" \
+ --htmldir="${DOCSDIR}/html" \
+ --mandir="${MANPREFIX}/man" \
--disable-debug-build \
--disable-d3d-hwaccel \
--disable-optimize \
@@ -45,8 +45,8 @@ CONFIGURE_ARGS= --docdir=${EXAMPLESDIR} \
--disable-wayland \
--enable-libmpv-shared
-OPTIONS_DEFINE= ASS DOCS LCMS2 LIBARCHIVE LUAJIT MANPAGES UCHARDET ZSH
-OPTIONS_DEFAULT= ASS DVDREAD DVDNAV LIBARCHIVE MANPAGES OPENGL UCHARDET \
+OPTIONS_DEFINE= ARCHIVE ASS DOCS LCMS2 LUAJIT MANPAGES TEST UCHARDET ZSH
+OPTIONS_DEFAULT= ARCHIVE ASS DVDREAD DVDNAV MANPAGES OPENGL UCHARDET \
V4L VAAPI VDPAU X11 YTDL ZSH
OPTIONS_GROUP= IN VO AO
OPTIONS_GROUP_IN= CDIO DVDREAD DVDNAV LIBBLURAY V4L YTDL SMB
@@ -57,10 +57,9 @@ OPTIONS_SUB= yes
ASS_DESC= ASS/SSA subtitle and OSD rendering
DVDREAD_DESC= DVD Playback support
DVDNAV_DESC= DVD menu navigation
-LIBARCHIVE_DESC= Enable libarchive support
LUAJIT_DESC= Use LuaJIT instead of Lua scripting language support
-YTDL_DESC= Install youtube-dl
UCHARDET_DESC= Guess subtitle encoding via uchardet
+YTDL_DESC= Install youtube-dl
IN_DESC= Input
VO_DESC= Video Output
AO_DESC= Audio Output
@@ -68,6 +67,9 @@ AO_DESC= Audio Output
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
ALSA_CONFIGURE_OFF= --disable-alsa
+ARCHIVE_USES= libarchive
+ARCHIVE_CONFIGURE_ON= --enable-libarchive
+
ASS_LIB_DEPENDS= libass.so:multimedia/libass
ASS_CONFIGURE_OFF= --disable-libass
@@ -94,9 +96,6 @@ JACK_CONFIGURE_OFF= --disable-jack
LCMS2_LIB_DEPENDS= liblcms2.so:graphics/lcms2
LCMS2_CONFIGURE_OFF= --disable-lcms2
-LIBARCHIVE_USES= libarchive
-LIBARCHIVE_CONFIGURE_ON= --enable-libarchive
-
LIBBLURAY_LIB_DEPENDS= libbluray.so:multimedia/libbluray
LIBBLURAY_CONFIGURE_OFF= --disable-libbluray
@@ -126,6 +125,10 @@ SNDIO_CONFIGURE_OFF= --disable-sndio
SMB_USES= samba:lib
SMB_CONFIGURE_OFF= --disable-libsmbclient
+TEST_BUILD_DEPENDS= cmocka>=1.1.0:sysutils/cmocka
+TEST_CONFIGURE_ON= --enable-test
+TEST_UNITTESTFILES= chmap chmap_sel gl_video
+
UCHARDET_LIB_DEPENDS= libuchardet.so:textproc/uchardet
UCHARDET_CONFIGURE_OFF= --disable-uchardet
@@ -147,17 +150,24 @@ YTDL_RUN_DEPENDS= youtube-dl:www/youtube_dl
ZSH_USES= perl5
ZSH_USE= PERL5=build
-ZSH_CONFIGURE_ENV= BIN_PERL=${PERL}
+ZSH_CONFIGURE_ENV= BIN_PERL="${PERL}"
ZSH_CONFIGURE_ENABLE= zsh-comp
post-patch:
@${REINPLACE_CMD} -e 's|/pkgconfig/mpv.pc|data/pkgconfig/mpv.pc|g' \
${WRKSRC}/wscript_build.py
+ @${REINPLACE_CMD} -e 's|DBL_EPSILON|FLT_EPSILON|'g \
+ ${WRKSRC}/test/test_helpers.h
post-patch-MANPAGES-on:
@${FIND} ${WRKSRC}/DOCS/man -name '*.rst' | ${XARGS} ${REINPLACE_CMD} \
-e 's|/usr/local|${PREFIX}|g'
+pre-install-TEST-on:
+.for test in ${TEST_UNITTESTFILES}
+ cd ${WRKSRC}/build/test && ./${test}
+.endfor
+
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/mpv
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmpv.so