aboutsummaryrefslogtreecommitdiff
path: root/multimedia/mplayer/Makefile.common
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/mplayer/Makefile.common')
-rw-r--r--multimedia/mplayer/Makefile.common33
1 files changed, 30 insertions, 3 deletions
diff --git a/multimedia/mplayer/Makefile.common b/multimedia/mplayer/Makefile.common
index c68d49ab10dd..7c391fbd0dac 100644
--- a/multimedia/mplayer/Makefile.common
+++ b/multimedia/mplayer/Makefile.common
@@ -5,8 +5,8 @@
# $FreeBSD$
MPLAYER_PORT_VERSION= 1.3.0
-MPLAYER_SNAPSHOT_DATE= 2016-09-12
-PORTREVISION?= 3
+MPLAYER_SNAPSHOT_DATE= 2016-12-28
+PORTREVISION?= 0
MASTER_SITES= LOCAL/riggs/mplayer
DISTNAME= mplayer-${MPLAYER_PORT_VERSION}.${MPLAYER_SNAPSHOT_DATE:S/-//g}
WRKSRC= ${WRKDIR}/mplayer-export-${MPLAYER_SNAPSHOT_DATE}
@@ -15,15 +15,17 @@ LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libpng.so:graphics/png \
+ libavcodec.so:multimedia/ffmpeg \
libfreetype.so:print/freetype2
USES= compiler:c11 gmake iconv ncurses tar:xz
NOPRECIOUSMAKEVARS= yes # ARCH
-GNU_CONFIGURE= yes
+HAS_CONFIGURE= yes
CONFIGURE_ENV= TMPDIR="${WRKSRC}"
CONFIGURE_ARGS= --cc="${CC}" \
--host-cc="${CC}" \
--as="${AS}" \
+ --mandir="${PREFIX}/man" \
--extra-cflags="-I${PREFIX}/include -I${LOCALBASE}/include" \
--extra-libs="-L${PREFIX}/lib" \
--disable-alsa \
@@ -31,6 +33,7 @@ CONFIGURE_ARGS= --cc="${CC}" \
--disable-crystalhd \
--disable-esd \
--disable-faad \
+ --disable-ffmpeg_a \
--disable-ggi \
--disable-ggiwmh \
--disable-liba52 \
@@ -48,3 +51,27 @@ CONFIGURE_ARGS= --cc="${CC}" \
--enable-ass-internal
WANT_GNOME= yes
+
+common-post-patch:
+ @${REINPLACE_CMD} \
+ -e 's|/dev/dvd|${DEFAULT_DVD_DEVICE}|; \
+ s|/dev/cdrom|${DEFAULT_CDROM_DEVICE}|' \
+ -e 's|/usr/local|${LOCALBASE}|' \
+ -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
+ -e 's|-lbz2|/usr/lib/libbz2.so|' \
+ -e 's|-lncurses|/usr/lib/libncurses.so|' \
+ -e 's|-liconv|${ICONV_LIB}|' \
+ ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+ @${FIND} -E ${WRKSRC} -type f \
+ -iregex ".*(configure|.sh|Makefile)" -print0 | \
+ ${XARGS} -x -0 -n 10 \
+ ${REINPLACE_CMD} -E \
+ -e 's|[[:space:]]gcc[-[:digit:]\.]+| ${CC}|' \
+ -e 's|[[:space:]]gcc| ${CC}|' \
+ -e 's|\$$\(CC\)|${CC}|' \
+ -e 's|/usr/X11R6|${LOCALBASE}|' \
+ -e 's|%%LOCALBASE%%|${LOCALBASE}|'
+ @${FIND} ${WRKSRC}/DOCS/man -name "mplayer.1" | ${XARGS} ${REINPLACE_CMD} -E -e \
+ 's|/usr/\\:local/\\:etc/\\:mplayer|${DATADIR:S/\//\/\\\:/g}|g ; \
+ s|/dev/\\:(dvd[[:alnum:]]*[[:>:]])|${DEFAULT_DVD_DEVICE:S/dev\//dev\/\\\:/}|g ; \
+ s|/dev/\\:(cdrom[[:alnum:]]*[[:>:]])|${DEFAULT_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g'