2002-11-27 21:02:54 +01:00
|
|
|
# New ports collection makefile for: mplayerxp
|
2001-08-22 08:11:11 +02:00
|
|
|
# Date created: 10 August 2001
|
|
|
|
# Whom: Thomas E. Zander
|
|
|
|
# with lots of help from Vladimir Kushnir
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2002-11-27 21:02:54 +01:00
|
|
|
PORTNAME= mplayerxp
|
2009-02-20 17:02:22 +01:00
|
|
|
PORTVERSION= 0.7.2
|
2012-06-01 07:26:28 +02:00
|
|
|
PORTREVISION= 9
|
2002-11-27 21:02:54 +01:00
|
|
|
CATEGORIES= multimedia audio
|
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 19:56:05 +02:00
|
|
|
MASTER_SITES= SF
|
2001-08-22 08:11:11 +02:00
|
|
|
|
2005-03-05 02:17:09 +01:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2003-02-23 20:58:35 +01:00
|
|
|
COMMENT= Multi-threaded branch of the well known mplayer media player
|
2001-08-22 08:11:11 +02:00
|
|
|
|
2010-02-05 12:46:55 +01:00
|
|
|
LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \
|
2012-06-01 07:26:28 +02:00
|
|
|
png15:${PORTSDIR}/graphics/png \
|
2007-01-09 23:48:40 +01:00
|
|
|
vcdinfo.2:${PORTSDIR}/multimedia/vcdimager
|
2002-11-27 21:02:54 +01:00
|
|
|
RUN_DEPENDS= ${LOCALBASE}/share/mplayer/fonts:${PORTSDIR}/multimedia/mplayer-fonts
|
2001-08-22 08:11:11 +02:00
|
|
|
|
2009-02-20 17:02:22 +01:00
|
|
|
OPTIONS= DVDNAV "Enable libdvdnav support" off \
|
|
|
|
DVDPLAY "Enable libdvdplay support" off \
|
|
|
|
CDPARANOIA "Enable CDDA support" off \
|
|
|
|
OCFLAGS "Use optimized compiler flags" off \
|
|
|
|
SDL "Enable SDL video output" off \
|
|
|
|
TERMCAP "Enable termcap key support" off \
|
|
|
|
WIN32 "Enable win32 codec set" on
|
|
|
|
|
2002-11-27 21:02:54 +01:00
|
|
|
ONLY_FOR_ARCHS= i386
|
2007-01-09 23:48:40 +01:00
|
|
|
|
2001-10-01 16:04:20 +02:00
|
|
|
USE_BZIP2= yes
|
2009-02-20 17:02:22 +01:00
|
|
|
USE_XORG= xinerama xv xxf86dga xxf86vm
|
2004-03-30 21:20:22 +02:00
|
|
|
USE_ICONV= yes
|
2002-11-27 21:02:54 +01:00
|
|
|
USE_GMAKE= yes
|
|
|
|
HAS_CONFIGURE= yes
|
2004-03-08 02:01:31 +01:00
|
|
|
WANT_SDL= yes
|
2007-01-24 21:59:32 +01:00
|
|
|
USE_LDCONFIG= yes
|
2001-08-22 08:11:11 +02:00
|
|
|
|
2002-11-27 21:02:54 +01:00
|
|
|
MAN1= mplayerxp.1
|
2002-01-17 20:55:14 +01:00
|
|
|
|
2002-11-27 21:02:54 +01:00
|
|
|
WIN32_CODEC_PREFIX= ${LOCALBASE}/lib/win32
|
2002-03-06 05:14:08 +01:00
|
|
|
|
2002-11-27 21:02:54 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
2002-08-07 17:08:25 +02:00
|
|
|
|
2002-11-27 21:02:54 +01:00
|
|
|
# add this after <bsd.port.pre.mk> so that we inherit /etc/make.conf
|
2007-01-24 21:59:32 +01:00
|
|
|
CONFIGURE_ARGS+= --with-extralibdir=${LOCALBASE}/lib \
|
2002-11-27 21:02:54 +01:00
|
|
|
--with-extraincdir=${LOCALBASE}/include \
|
|
|
|
--cc=${CC} \
|
|
|
|
--prefix=${PREFIX} \
|
2009-02-20 17:02:22 +01:00
|
|
|
--confdir=${ETCDIR} \
|
2002-11-27 21:02:54 +01:00
|
|
|
--datadir=${LOCALBASE}/share/mplayer \
|
2009-02-20 17:02:22 +01:00
|
|
|
--libdir=${PREFIX}/lib \
|
2002-11-27 21:02:54 +01:00
|
|
|
--disable-fbdev \
|
|
|
|
--disable-lirc \
|
|
|
|
--disable-rtc \
|
|
|
|
--disable-tv-v4l
|
2007-01-24 21:59:32 +01:00
|
|
|
CONFIGURE_ENV+= LANG=C
|
2002-11-27 21:02:54 +01:00
|
|
|
# insure CC,LD safeness
|
2009-02-20 17:02:22 +01:00
|
|
|
MAKE_ARGS+= CC="${CC}" LD="${LD}" INSTALL="${INSTALL}"
|
2002-11-27 21:02:54 +01:00
|
|
|
|
2007-01-09 23:48:40 +01:00
|
|
|
CFLAGS+= -I${LOCALBASE}/include
|
|
|
|
CFLAGS+= -fomit-frame-pointer
|
|
|
|
|
2002-11-27 21:02:54 +01:00
|
|
|
##
|
|
|
|
## Feature activation and Library Dependencies
|
|
|
|
##
|
|
|
|
|
2003-03-04 21:21:08 +01:00
|
|
|
# cdda support
|
2007-01-09 23:48:40 +01:00
|
|
|
.if defined(WITH_CDPARANOIA)
|
2003-03-04 21:21:08 +01:00
|
|
|
LIB_DEPENDS+= cdda_paranoia.0:${PORTSDIR}/audio/cdparanoia
|
2009-02-20 17:02:22 +01:00
|
|
|
|
|
|
|
CONFIGURE_ARGS+= --enable-cdparanoia
|
2003-03-04 21:21:08 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-cdparanoia
|
|
|
|
.endif
|
2002-11-27 21:02:54 +01:00
|
|
|
# dvd support
|
2009-02-20 17:02:22 +01:00
|
|
|
.if defined(WITH_DVDNAV) || defined(WITH_DVDPLAY)
|
2009-02-08 19:45:38 +01:00
|
|
|
LIB_DEPENDS+= dvdread.4:${PORTSDIR}/multimedia/libdvdread
|
2002-09-25 21:13:40 +02:00
|
|
|
|
2009-02-20 17:02:22 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-libdvdread
|
2003-03-08 16:39:32 +01:00
|
|
|
.else
|
2009-02-20 17:02:22 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-libdvdread
|
2002-10-16 17:55:26 +02:00
|
|
|
.endif
|
2002-11-27 21:02:54 +01:00
|
|
|
# xine libdvdnav
|
2009-02-20 17:02:22 +01:00
|
|
|
.if defined(WITH_DVDNAV)
|
2005-10-08 16:22:10 +02:00
|
|
|
LIB_DEPENDS+= dvdnav.4:${PORTSDIR}/multimedia/libdvdnav
|
2002-10-16 17:55:26 +02:00
|
|
|
|
2009-02-20 17:02:22 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-libdvdnav
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-libdvdnav
|
2001-08-22 08:11:11 +02:00
|
|
|
.endif
|
2007-01-09 23:48:40 +01:00
|
|
|
# ogle's libdvdplay
|
2009-02-20 17:02:22 +01:00
|
|
|
.if defined(WITH_DVDPLAY)
|
2007-01-09 23:48:40 +01:00
|
|
|
LIB_DEPENDS+= dvdplay.0:${PORTSDIR}/multimedia/libdvdplay
|
|
|
|
|
2009-02-20 17:02:22 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-libdvdplay
|
2002-09-19 18:42:33 +02:00
|
|
|
.else
|
2009-02-20 17:02:22 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-libdvdplay
|
2001-10-01 16:04:20 +02:00
|
|
|
.endif
|
2009-02-20 17:02:22 +01:00
|
|
|
# compilation optimizations
|
|
|
|
.if defined(WITH_OCFLAGS)
|
|
|
|
CFLAGS+= -O3 -ffast-math
|
2002-06-05 01:49:35 +02:00
|
|
|
.else
|
2009-02-20 17:02:22 +01:00
|
|
|
MAKE_ARGS+= OPTFLAGS="${CFLAGS}" SHCFLAGS="${CFLAGS} -PIC"
|
2002-05-24 17:55:36 +02:00
|
|
|
.endif
|
2009-02-20 17:02:22 +01:00
|
|
|
# sdl
|
|
|
|
.if defined(WITH_SDL)
|
|
|
|
USE_SDL= image sdl
|
|
|
|
CONFIGURE_ARGS+= --enable-sdl --enable-sdl-image
|
2002-11-21 02:52:49 +01:00
|
|
|
.else
|
2009-02-20 17:02:22 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-sdl --disable-sdl-image
|
2002-11-02 03:28:15 +01:00
|
|
|
.endif
|
2002-11-27 21:02:54 +01:00
|
|
|
# termcap key support
|
|
|
|
# mplayerxp does not clean up after itself yet
|
2007-01-09 23:48:40 +01:00
|
|
|
.if defined(WITH_TERMCAP)
|
2002-11-27 21:02:54 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-termcap
|
2002-01-17 20:55:14 +01:00
|
|
|
.else
|
2002-11-27 21:02:54 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-termcap
|
2001-08-22 08:11:11 +02:00
|
|
|
.endif
|
2002-11-27 21:02:54 +01:00
|
|
|
# win32 binary dll codecs
|
2010-05-09 14:47:34 +02:00
|
|
|
.if !defined(WITHOUT_WIN32)
|
2001-10-01 16:04:20 +02:00
|
|
|
RUN_DEPENDS+= ${CODEC_DETECTION_FILE}:${CODEC_PORT}
|
2001-08-22 08:11:11 +02:00
|
|
|
|
2002-11-27 21:02:54 +01:00
|
|
|
CODEC_PORT= ${PORTSDIR}/multimedia/win32-codecs
|
2001-10-01 16:04:20 +02:00
|
|
|
CODEC_DETECTION_FILE!= ${MAKE} -f ${CODEC_PORT}/Makefile -V CODEC_DETECTION_FILE
|
2001-08-25 06:51:38 +02:00
|
|
|
.endif
|
|
|
|
|
2002-11-27 21:02:54 +01:00
|
|
|
post-patch:
|
|
|
|
# win32 codec location
|
2009-02-20 17:02:22 +01:00
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
's|WIN32_PATH|"${WIN32_CODEC_PREFIX}"|' ${WRKSRC}/loader/win32.c
|
2002-11-27 21:02:54 +01:00
|
|
|
# FreeBSD's install utility does not support -D flag
|
2009-02-20 17:02:22 +01:00
|
|
|
@${FIND} ${WRKSRC} -name "Makefile" -print0 | \
|
|
|
|
${XARGS} -0 ${REINPLACE_CMD} -e \
|
|
|
|
'/INSTALL/s| -D | |g ; \
|
|
|
|
/install/s| -D | |g'
|
2002-11-27 21:02:54 +01:00
|
|
|
# PTHREAD_{CFLAGS,LIBS}
|
2009-02-20 17:02:22 +01:00
|
|
|
@${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
|
2001-08-22 08:11:11 +02:00
|
|
|
|
2002-11-27 21:02:54 +01:00
|
|
|
pre-install:
|
|
|
|
# create dirs before installation since the port uses a install
|
|
|
|
# utility option not available in FreeBSD
|
2007-01-09 23:48:40 +01:00
|
|
|
.for dir in etc/mplayerxp lib/mplayerxp/codecs lib/mplayerxp/wine
|
2002-11-27 21:02:54 +01:00
|
|
|
@${MKDIR} ${PREFIX}/${dir}
|
|
|
|
.endfor
|
2001-08-22 08:11:11 +02:00
|
|
|
|
2009-02-20 17:02:22 +01:00
|
|
|
post-install:
|
|
|
|
@${STRIP_CMD} ${PREFIX}/bin/mplayerxp
|
|
|
|
|
2001-08-25 06:51:38 +02:00
|
|
|
.include <bsd.port.post.mk>
|