1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00
freebsd-ports/multimedia/mplayerxp/Makefile
Ganael LAPLANCHE 8e3dcb3c28 - Update multimedia/libdvdread to 4.9.9
- Bump dependent ports' PORTREVISIONS and update LIB_DEPENDS [1]
- multimedia/libdvdnav: remove dependency to (now removed) dvdread-config
- sysutils/vstrip: remove useless dependency to multimedia/libdvdread

Approved by:	portmgr (implicit) [1]
2014-05-13 10:17:04 +00:00

164 lines
4.3 KiB
Makefile

# Created by: Thomas E. Zander with lots of help from Vladimir Kushnir
# $FreeBSD$
PORTNAME= mplayerxp
PORTVERSION= 0.7.2
PORTREVISION= 11
CATEGORIES= multimedia audio
MASTER_SITES= SF
MAINTAINER= ports@FreeBSD.org
COMMENT= Multi-threaded branch of the well known mplayer media player
LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \
png15:${PORTSDIR}/graphics/png \
vcdinfo.2:${PORTSDIR}/multimedia/vcdimager
RUN_DEPENDS= ${LOCALBASE}/share/mplayer/fonts:${PORTSDIR}/multimedia/mplayer-fonts
OPTIONS_DEFINE= DVDNAV CDPARANOIA OPTIMIZED_CFLAGS SDL TERMCAP WIN32
DVDNAV_DESC= Enable libdvdnav support
TERMCAP_DESC= Enable termcap key support
WIN32_DESC= Enable win32 codec set
OPTIONS_DEFAULT= WIN32
ONLY_FOR_ARCHS= i386
MAKE_JOBS_UNSAFE= yes
USE_BZIP2= yes
USE_XORG= xinerama xv xxf86dga xxf86vm
USES= iconv gmake
HAS_CONFIGURE= yes
WANT_SDL= yes
USE_LDCONFIG= yes
MAN1= mplayerxp.1
WIN32_CODEC_PREFIX= ${LOCALBASE}/lib/win32
NO_STAGE= yes
.include <bsd.port.pre.mk>
# add this after <bsd.port.pre.mk> so that we inherit /etc/make.conf
CONFIGURE_ARGS+= --with-extralibdir=${LOCALBASE}/lib \
--with-extraincdir=${LOCALBASE}/include \
--cc=${CC} \
--prefix=${PREFIX} \
--confdir=${ETCDIR} \
--datadir=${LOCALBASE}/share/mplayer \
--libdir=${PREFIX}/lib \
--disable-fbdev \
--disable-lirc \
--disable-rtc \
--disable-tv-v4l
CONFIGURE_ENV+= LANG=C
# insure CC,LD safeness
MAKE_ARGS+= CC="${CC}" LD="${LD}" INSTALL="${INSTALL}"
CFLAGS+= -I${LOCALBASE}/include
CFLAGS+= -fomit-frame-pointer
##
## Feature activation and Library Dependencies
##
# cdda support
.if ${PORT_OPTIONS:MCDPARANOIA}
LIB_DEPENDS+= cdda_paranoia.0:${PORTSDIR}/audio/cdparanoia
CONFIGURE_ARGS+= --enable-cdparanoia
.else
CONFIGURE_ARGS+= --disable-cdparanoia
.endif
# dvd support
.if ${PORT_OPTIONS:MDVDNAV}
LIB_DEPENDS+= libdvdread.so:${PORTSDIR}/multimedia/libdvdread
CONFIGURE_ARGS+= --enable-libdvdread
.else
CONFIGURE_ARGS+= --disable-libdvdread
.endif
# xine libdvdnav
.if ${PORT_OPTIONS:MDVDNAV}
LIB_DEPENDS+= dvdnav.4:${PORTSDIR}/multimedia/libdvdnav
CONFIGURE_ARGS+= --enable-libdvdnav
.else
CONFIGURE_ARGS+= --disable-libdvdnav
.endif
# compilation optimizations
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
CFLAGS+= -O3 -ffast-math
.else
MAKE_ARGS+= OPTFLAGS="${CFLAGS}" SHCFLAGS="${CFLAGS} -PIC"
.endif
# sdl
.if ${PORT_OPTIONS:MSDL}
USE_SDL= image sdl
CONFIGURE_ARGS+= --enable-sdl --enable-sdl-image
.else
CONFIGURE_ARGS+= --disable-sdl --disable-sdl-image
.endif
# termcap key support
# mplayerxp does not clean up after itself yet
.if ${PORT_OPTIONS:MTERMCAP}
CONFIGURE_ARGS+= --enable-termcap
.else
CONFIGURE_ARGS+= --disable-termcap
.endif
# win32 binary dll codecs
.if ${PORT_OPTIONS:MWIN32}
RUN_DEPENDS+= ${CODEC_DETECTION_FILE}:${CODEC_PORT}
CODEC_PORT= ${PORTSDIR}/multimedia/win32-codecs
CODEC_DETECTION_FILE!= ${MAKE} -f ${CODEC_PORT}/Makefile -V CODEC_DETECTION_FILE
.endif
post-patch:
# win32 codec location
@${REINPLACE_CMD} -e \
's|WIN32_PATH|"${WIN32_CODEC_PREFIX}"|' ${WRKSRC}/loader/win32.c
# FreeBSD's install utility does not support -D flag
@${FIND} ${WRKSRC} -name "Makefile" -print0 | \
${XARGS} -0 ${REINPLACE_CMD} -e \
'/INSTALL/s| -D | |g ; \
/install/s| -D | |g'
# PTHREAD_{CFLAGS,LIBS}
@${REINPLACE_CMD} -e \
'/pthread/s|_ld_i in .* ;|_ld_i in "${PTHREAD_LIBS}" ;|g ; \
s|pkg-config|true|g ; \
s|^MAKE=|#MAKE=|g' ${WRKSRC}/codecs/configure
@${REINPLACE_CMD} -e \
'/pthread/s|_ld_i in .* ;|_ld_i in "${PTHREAD_LIBS}" ;|g ; \
s|-D_THREAD_SAFE|${PTHREAD_CFLAGS}|g' ${WRKSRC}/mplayerxp/configure
#
@${REINPLACE_CMD} -e \
's|-Wl,-rpath |-Wl,-rpath,|g' ${WRKSRC}/codecs/common.mak
@${REINPLACE_CMD} -e \
'/install -d/d' ${WRKSRC}/codecs/subdir.mak
post-configure:
@cd ${WRKSRC}/codecs && ./configure --cc=${CC} \
--prefix=${PREFIX} \
--confdir=${ETCDIR} \
--datadir=${LOCALBASE}/share/mplayer \
--libdir=${PREFIX}/lib
.if !defined(WITH_OCFLAGS)
@${FIND} ${WRKSRC} -name "config.h" -print0 | \
${XARGS} -0 ${REINPLACE_CMD} -e \
'/CAN_COMPILE_/s|^#define|// #undef|g ; \
/_CLOBBERED/s|^#define|// #undef|g'
.endif
pre-install:
# create dirs before installation since the port uses a install
# utility option not available in FreeBSD
.for dir in etc/mplayerxp lib/mplayerxp/codecs lib/mplayerxp/wine
@${MKDIR} ${PREFIX}/${dir}
.endfor
post-install:
@${STRIP_CMD} ${PREFIX}/bin/mplayerxp
.include <bsd.port.post.mk>