1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00
freebsd-ports/multimedia/mplayer/Makefile.common
Thomas Zander fec7912991 Update to upstream snapshot as of 2018-09-20
Details:
- Update to latest upstream snapshot as of 2018-09-20
- Fix build warnings due to USES for gnome and gl
2018-09-21 09:41:54 +00:00

75 lines
2.3 KiB
Makefile

# Contains the build infrastructural definitions for both
# mplayer and mencoder....the variables that we need to set
# before we include bsd.port.pre.mk
#
# $FreeBSD$
MPLAYER_PORT_VERSION= 1.3.0
MPLAYER_SNAPSHOT_DATE= 2018-09-20
MASTER_SITES= LOCAL/riggs/mplayer
DISTNAME= mplayer-${MPLAYER_PORT_VERSION}.${MPLAYER_SNAPSHOT_DATE:S/-//g}
WRKSRC= ${WRKDIR}/mplayer-export-${MPLAYER_SNAPSHOT_DATE}
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
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 \
--disable-ass-internal \
--disable-bitmap-font \
--disable-crystalhd \
--disable-esd \
--disable-faad \
--disable-ffmpeg_a \
--disable-ggi \
--disable-ggiwmh \
--disable-liba52 \
--disable-libbs2b \
--disable-libilbc \
--disable-libnut \
--disable-libvorbis \
--disable-live \
--disable-joystick \
--disable-mad \
--disable-libmpeg2 \
--disable-nemesi \
--disable-real \
--yasm=''
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'