diff options
author | cpm <cpm@FreeBSD.org> | 2017-06-21 04:50:34 +0800 |
---|---|---|
committer | cpm <cpm@FreeBSD.org> | 2017-06-21 04:50:34 +0800 |
commit | 8df6bd31517c0eee85f09235209870c2d9154eb8 (patch) | |
tree | 58e096c3de3ccef154651fa48c940379b8ffe649 /multimedia/mpv | |
parent | de16d5743e0f956fcbcbba84b3aa756acf1f267d (diff) | |
download | freebsd-ports-gnome-8df6bd31517c0eee85f09235209870c2d9154eb8.tar.gz freebsd-ports-gnome-8df6bd31517c0eee85f09235209870c2d9154eb8.tar.zst freebsd-ports-gnome-8df6bd31517c0eee85f09235209870c2d9154eb8.zip |
multimedia/mpv: add TEST option
- Rename LIBARCHIVE option to ARCHIVE and use _DESC from Mk/bsd.options.desc.mk
- Use FLT_EPSILON constant to fix gl_video unittest on i386
- Cosmetic fixes
Reviewed by: jbeich
Differential Revision: https://reviews.freebsd.org/D11005
Diffstat (limited to 'multimedia/mpv')
-rw-r--r-- | multimedia/mpv/Makefile | 34 |
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 |