Henrik Friedrichsen said:
> I understand. I have attached another version that fetches all the files
> in the fetch phase.
> 
> Could you give it another try?

I made some changes to the port.  (See attached tarball for details.)

FWIW on my ThinkPad E325 the performance of mpv is really bad.  (MPlayer
does no good here either, although ffplay copes with everything just
fine.)  I also noticed that it has problems with unmuting if master
output was muted before mpv started.  To really unmute I had to mute
sound in mpv by pressing "m" and then unmute it by pressing Mute button
on my keyboard;  no other combination worked out.

Significant changes:


| -DISTFILES=           ${GH_TAGNAME}${EXTRACT_SUFX}
[...]
|  WAF =                        waf-1.7.16
| -DISTFILES += ${WAF}:0
| +SUPDISTFILES =               ${WAF}:0
[...]
| -MASTER_SITES =       https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/archive/
| -MASTER_SITES0 =      http://ftp.waf.io/pub/release/
| -EXTRACT_ONLY =       v${V}${EXTRACT_SUFX}
| +MASTER_SITES0 =              http://ftp.waf.io/pub/release/
| +EXTRACT_ONLY =               ${DISTNAME}${EXTRACT_SUFX}

Although I abuse SUPDISTFILES here, this way it is a bit cleaner and
allows to use GitHub support in ports infrastructure.

FWIW having files with name template "v${V}${EXTRACT_SUFX}" in $DISTDIR
is a bad idea.

 
| -CATEGORIES = x11 multimedia
| +CATEGORIES =         multimedia x11

I am not sure that mpv's primary category should be "x11".  I am not
sure how MPlayer ended up there, but I wouldn't expect mpv at x11/mpv.
 
| -BUILD_DEPENDS =              textproc/py-docutils
| +BUILD_DEPENDS =              audio/ladspa \
| +                     graphics/libmng \
| +                     multimedia/libdvdnav>=4.2.0 \
| +                     textproc/py-docutils
|  
| -LIB_DEPENDS =                devel/libdvdread>=4.1.0 \
| -                                     converters/libiconv \
| -                                     graphics/jpeg \
| -                                     graphics/ffmpeg \
| -                                     graphics/lcms2 \
| -                                     graphics/libmng \
| -                                     audio/libcdio \
| -                                     multimedia/libass \
| -                                     multimedia/libdvdnav>=4.2.0
| +LIB_DEPENDS =                audio/libcdio \
| +                     converters/libiconv \
| +                     devel/libdvdread>=4.1.0 \
| +                     graphics/ffmpeg \
| +                     graphics/jpeg \
| +                     graphics/lcms2 \
| +                     multimedia/libass \
| +                     net/quvi/libquvi \
| +                     net/samba \
| +                     sysutils/e2fsprogs

I enabled quvi (for youtube) and Lua (mpv's website says it is actually
needed for GUI, so let it be).  I also enabled SMB (I need this).
Interestingly, port links against libuuid (sysutils/e2fsprogs), although
it doesn't seem obvious from `waf --help` output.

| -CFLAGS =             -I${LOCALBASE}/include
| -LFLAGS =             -L${LOCALBASE}/lib
| +CFLAGS =             -I.. -I${LOCALBASE}/include
| +LDFLAGS =            -L${LOCALBASE}/lib
|
| -LDFLAGS =            ${LFLAGS}
| -LINKFLAGS =          ${LFLAGS}
| -CPPFLAGS =           ${CFLAGS}
[...]
| -CONFIGURE_ENV =              CFLAGS=${CFLAGS} LFLAGS=${LFLAGS} 
CPPFLAGS=${CFLAGS} \
| -                                     LINKFLAGS=${LFLAGS} LDFLAGS=${LFLAGS}
| +CONFIGURE_ENV +=     CC="${CC}" LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}"

More readable, less problematic.

|  # Update libbluray to 0.3.0 to --enable-libbluray!
| -CONFIGURE_ARGS +=    --enable-sndio \
| -                                     --enable-sdl1  \
| -                                     --disable-oss-audio \
| -                                     --disable-optimize \
| -                                     --disable-joystick \
| -                                     --disable-libbluray \
| -                                     --enable-libass \
| -                                     --enable-libass-osd \
| -                                     --enable-dvdnav \
| -                                     --enable-dvdread \
| -                                     --enable-cdda \
| -                                     --enable-enca
| +CONFIGURE_ARGS +=    --disable-optimize \
| +                     --disable-debug-build \
| +                     --disable-pdf-build \
| +                     --enable-iconv \
| +                     --disable-waio \
| +                     --enable-termios \
| +                     --disable-shm \
| +                     --disable-libguess \
| +                     --enable-libsmbclient \
| +                     --enable-libquvi \
| +                     --enable-libass \
| +                     --enable-libass-osd \
| +                     --enable-encoding \
| +                     --disable-joystick \
| +                     --disable-lirc \
| +                     --disable-libbluray \
| +                     --enable-dvdread \
| +                     --disable-dvdnav \
| +                     --enable-cdda \
| +                     --enable-enca \
| +                     --disable-mpg123 \
| +                     --enable-ladspa \
| +                     --disable-libbs2b \
| +                     --enable-lcms2 \
| +                     --disable-vapoursynth \
| +                     --enable-libavresample \
| +                     --disable-libswresample \
| +                     --enable-libavfilter \
| +                     --enable-libavdevice \
| +                     --enable-libpostproc \
| +                     --disable-oss-audio \
| +                     --disable-rsound \
| +                     --enable-sndio \
| +                     --disable-pulse \
| +                     --disable-jack \
| +                     --disable-alsa \
| +                     --enable-lua

Explicitly enable or disable features waf tries to autodetect.  Makes
builds reproducible and less error-prone.  Probably someone with better
knowledge of mpv should oversee and fix this list.

| +USE_GROFF =          Yes

Apparently mandoc has some formatting issues with this page.  As I
gather mandoc is not yet supposed to deal with rst2man output.

|  post-extract:
| -     perl -pi -e 's,/usr/bin/env python,${MODPY_BIN},g' ${WRKSRC}/TOOLS/umpv
| +     ${MODPY_BIN_ADJ} ${WRKSRC}/TOOLS/umpv
| +     ${INSTALL_SCRIPT} ${FULLDISTDIR}/${WAF} ${WRKDIST}/waf
|  
|  do-configure:
| -     cp ${FULLDISTDIR}/${WAF} ${WRKDIST}/waf
|       cd ${WRKDIST} && ${CONFIGURE_ENV} ${MODPY_BIN} waf configure 
${CONFIGURE_ARGS}

Logically copying waf script belongs to "extract" phase, not configure.
Also, I see no reason to avoid ${MODPY_BIN_ADJ} for fixing python
shebangs.  At least the port won't break if convention is changed.


|  do-build:
| -     cd ${WRKDIST} && ${MODPY_BIN} waf build
| +     cd ${WRKDIST} && ${MODPY_BIN} waf -v build

Helps spotting errors.


| -EXAMPLEDIR =         ${PREFIX}/share/examples/mpv
[...]
|  post-install:
| -     ${INSTALL_SCRIPT} ${WRKDIST}/TOOLS/mpv_identify.sh ${PREFIX}/bin
| -     ${INSTALL_SCRIPT} ${WRKDIST}/TOOLS/umpv ${PREFIX}/bin
| -     ${INSTALL_DATA_DIR} ${EXAMPLEDIR}
| -     ${INSTALL_DATA} ${WRKDIST}/etc/encoding-profiles.conf ${EXAMPLEDIR}
| +     ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mpv
| +     ${INSTALL_DATA} ${WRKDIST}/etc/encoding-profiles.conf \
| +                     ${WRKDIST}/TOOLS/mpv_identify.sh \
| +                     ${WRKDIST}/TOOLS/umpv \
| +                             ${PREFIX}/share/examples/mpv
|  
|  .include <bsd.port.mk>

I would rather not litter /usr/local/bin with shell and python scripts
of questionable worth.  Let the user pick them if needed.  Also, if
python script will be installed, "lang/python" should go to RUN_DEPENDS.

Having "${EXAMPLEDIR}" variable that is mentioned twice in consequential
recipes is not very useful IMO.


-- 
Dmitrij D. Czarkoff

Attachment: mpv.tar.gz
Description: mpv.tgz

Reply via email to