Files
ports/multimedia/mplayer/Makefile.common
T
Thomas Zander c1612985de multimedia/{mplayer|mencoder} Update to upstream snapshot 2026-04-04
This updates multimedia/mplayer and mencoder to an up-to-date
snapshot as of 2026-04-04.
* Due to upstream development slowing down, distfiles are now
  incremental diffs.
* This marks the JACK option broken for now due to ffmpeg API
  retirements.
PR:		292157
MFH:		2026Q2
2026-04-05 10:48:36 +02:00

79 lines
2.5 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
MPLAYER_PORT_VERSION= 1.5.0
MPLAYER_BASE_SNAPSHOT_DATE= 2025-08-16
MPLAYER_SNAPSHOT_DATE= 2026-04-04
MASTER_SITES= LOCAL/riggs/mplayer
PATCH_SITES= ${MASTER_SITES}
PATCHFILES= ${DISTNAME}-${MPLAYER_SNAPSHOT_DATE:S/-//g}.patch.xz:-p1
DISTNAME= mplayer-${MPLAYER_PORT_VERSION}.${MPLAYER_BASE_SNAPSHOT_DATE:S/-//g}
WRKSRC= ${WRKDIR}/mplayer-export-${MPLAYER_BASE_SNAPSHOT_DATE}
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libpng.so:graphics/png \
libavcodec.so:multimedia/ffmpeg \
libfreetype.so:print/freetype2
BUILD_DEPENDS= ${BUILD_DEPENDS_${ARCH}}
BUILD_DEPENDS_i386= as:devel/binutils
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}/share/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}
@${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}|' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} \
${CONFIGURE_WRKSRC}/Makefile
@${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'
@${RM} ${WRKSRC}/binary.ver