2013-03-23 16:45:25 +01:00
|
|
|
# Created by: Thomas E. Zander
|
2007-08-07 14:42:44 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= mencoder
|
|
|
|
PORTVERSION= ${MPLAYER_PORT_VERSION}
|
2016-03-27 16:57:59 +02:00
|
|
|
PORTREVISION= 1
|
2015-08-23 18:41:23 +02:00
|
|
|
CATEGORIES= multimedia audio
|
2012-04-17 20:50:38 +02:00
|
|
|
|
2015-08-23 18:41:23 +02:00
|
|
|
MAINTAINER= riggs@FreeBSD.org
|
2007-08-07 14:42:44 +02:00
|
|
|
COMMENT= Convenient video file and movie encoder
|
|
|
|
|
2015-08-23 18:41:23 +02:00
|
|
|
.include "${.CURDIR}/../mplayer/Makefile.common"
|
2007-08-07 14:42:44 +02:00
|
|
|
|
2015-01-24 19:32:07 +01:00
|
|
|
OPTIONS_DEFINE= AMR_NB AMR_WB BLURAY CDIO DEBUG DV FAAC FONTCONFIG \
|
|
|
|
FRIBIDI GIF GNUTLS GSM IPV6 JACK LADSPA LIBMNG LZO \
|
|
|
|
MAD NAS OCFLAGS OPENAL OPENJPEG OPUS PULSEAUDIO REAL \
|
2016-03-20 21:40:34 +01:00
|
|
|
RTMP SCHROEDINGER SMB SPEEX THEORA TWOLAME V4L VPX \
|
2015-08-01 19:16:39 +02:00
|
|
|
X264 XVID
|
2013-03-23 16:45:25 +01:00
|
|
|
|
2015-08-31 23:26:40 +02:00
|
|
|
OPTIONS_DEFAULT=GIF GNUTLS IPV6 OCFLAGS X264 XVID
|
|
|
|
|
|
|
|
OPTIONS_DEFINE_i386= RTCPU
|
|
|
|
OPTIONS_DEFINE_amd64= RTCPU
|
2015-09-01 22:08:53 +02:00
|
|
|
OPTIONS_DEFINE_powerpc= RTCPU
|
2015-08-31 23:26:40 +02:00
|
|
|
|
|
|
|
OPTIONS_DEFAULT_i386= RTCPU
|
|
|
|
OPTIONS_DEFAULT_amd64= RTCPU
|
2015-09-01 22:08:53 +02:00
|
|
|
OPTIONS_DEFAULT_powerpc=RTCPU
|
2013-03-23 16:45:25 +01:00
|
|
|
|
|
|
|
BLURAY_DESC?= BluRay support
|
2013-04-16 17:01:00 +02:00
|
|
|
LZO_DESC?= Enable external liblzo library
|
2013-03-23 16:45:25 +01:00
|
|
|
OCFLAGS_DESC?= Use optimized compiler flags
|
|
|
|
REAL_DESC?= Enable realplayer plugin
|
2015-08-31 23:26:40 +02:00
|
|
|
RTCPU_DESC?= Use runtime CPU detection
|
2007-08-07 14:42:44 +02:00
|
|
|
|
2012-09-01 17:22:09 +02:00
|
|
|
RESTRICTED= Port has restricted dependencies
|
|
|
|
|
2007-08-07 14:42:44 +02:00
|
|
|
PATCHDIR= ${.CURDIR}/../mplayer/files
|
2012-01-15 23:31:53 +01:00
|
|
|
FILESDIR= ${PATCHDIR}
|
2007-08-07 14:42:44 +02:00
|
|
|
DATADIR= ${PREFIX}/share/mplayer
|
|
|
|
|
2010-04-21 15:07:23 +02:00
|
|
|
TOOLFILES= aconvert.sh binary_codecs.sh calcbpp.pl \
|
|
|
|
checktree.sh countquant.pl divx2svcd.sh \
|
|
|
|
dvd2divxscript.pl edgedetect.fp edgeenh.fp \
|
|
|
|
emboss.fp mencvcd.sh midentify.sh \
|
2012-01-15 23:31:53 +01:00
|
|
|
mpconsole.sh mphelp_check.py mplmult.sh \
|
|
|
|
plotpsnr.pl psnr-video.sh qepdvcd.sh \
|
|
|
|
subedit.pl subsearch.sh vobshift.py \
|
|
|
|
w32codec_dl.pl wma2ogg.pl
|
2007-08-07 14:42:44 +02:00
|
|
|
|
2014-11-20 22:42:42 +01:00
|
|
|
USES+= alias iconv pkgconfig shebangfix
|
2013-12-15 19:50:51 +01:00
|
|
|
SHEBANG_FILES= TOOLS/calcbpp.pl TOOLS/checktree.sh TOOLS/countquant.pl \
|
|
|
|
TOOLS/divx2svcd.sh TOOLS/dvd2divxscript.pl TOOLS/mencvcd.sh \
|
|
|
|
TOOLS/mphelp_check.py TOOLS/plotpsnr.pl TOOLS/psnr-video.sh \
|
|
|
|
TOOLS/qepdvcd.sh TOOLS/subedit.pl TOOLS/w32codec_dl.pl \
|
|
|
|
TOOLS/wma2ogg.pl
|
2007-08-07 14:42:44 +02:00
|
|
|
|
2013-12-15 19:50:51 +01:00
|
|
|
.include "${.CURDIR}/../mplayer/Makefile.optvars"
|
|
|
|
.include <bsd.port.pre.mk>
|
2007-08-07 14:42:44 +02:00
|
|
|
|
2010-04-21 15:07:23 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-mplayer \
|
2010-04-25 10:29:23 +02:00
|
|
|
--disable-libdca \
|
2007-08-07 14:42:44 +02:00
|
|
|
--disable-x11 \
|
2010-04-21 15:07:23 +02:00
|
|
|
--disable-vdpau \
|
2007-08-07 14:42:44 +02:00
|
|
|
--disable-rtc \
|
|
|
|
--disable-arts \
|
|
|
|
--disable-caca \
|
|
|
|
--disable-lirc \
|
|
|
|
--disable-sdl \
|
|
|
|
--disable-svga \
|
|
|
|
--disable-aa \
|
2007-12-13 00:26:37 +01:00
|
|
|
--disable-joystick \
|
2009-01-06 19:57:27 +01:00
|
|
|
--disable-directfb \
|
2010-12-02 10:18:01 +01:00
|
|
|
--disable-mpg123 \
|
2012-02-11 00:26:29 +01:00
|
|
|
--disable-enca \
|
2010-10-05 07:57:28 +02:00
|
|
|
--disable-musepack
|
2007-08-07 14:42:44 +02:00
|
|
|
|
2016-04-01 16:16:16 +02:00
|
|
|
LIB_DEPENDS+= libmp3lame.so:audio/lame
|
2013-12-15 19:50:51 +01:00
|
|
|
|
2010-04-21 15:07:23 +02:00
|
|
|
ALL_TARGET= mencoder
|
|
|
|
|
2007-08-07 14:42:44 +02:00
|
|
|
.include "${.CURDIR}/../mplayer/Makefile.options"
|
|
|
|
|
|
|
|
pre-everything::
|
|
|
|
@${ECHO_MSG} "N - O - T - E"
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "There are some knobs which *can* *not* be selected via the"
|
2014-06-07 15:24:16 +02:00
|
|
|
@${ECHO_MSG} "OPTIONS framework. At the moment, these settings are:"
|
|
|
|
@${ECHO_MSG} "DEFAULT_DVD_DEVICE=${DEFAULT_DVD_DEVICE}"
|
|
|
|
@${ECHO_MSG} "DEFAULT_CDROM_DEVICE=${DEFAULT_CDROM_DEVICE}"
|
2007-08-07 14:42:44 +02:00
|
|
|
|
|
|
|
post-patch:
|
2010-12-02 10:18:01 +01:00
|
|
|
@${REINPLACE_CMD} \
|
|
|
|
-e 's|/dev/dvd|${DEFAULT_DVD_DEVICE}|; \
|
2007-08-07 14:42:44 +02:00
|
|
|
s|/dev/cdrom|${DEFAULT_CDROM_DEVICE}|' \
|
2010-12-02 10:18:01 +01:00
|
|
|
-e 's|/usr/local|${LOCALBASE}|' \
|
2014-04-27 16:22:25 +02:00
|
|
|
-e 's|%%LOCALBASE%%|${LOCALBASE}|' \
|
2010-12-02 10:18:01 +01:00
|
|
|
-e 's|-lbz2|/usr/lib/libbz2.so|' \
|
2012-01-18 11:52:56 +01:00
|
|
|
-e 's|-lncurses|/usr/lib/libncurses.so|' \
|
2014-11-16 18:20:32 +01:00
|
|
|
-e 's|-liconv|${ICONV_LIB}|' \
|
2010-04-21 15:07:23 +02:00
|
|
|
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
|
2007-08-07 14:42:44 +02:00
|
|
|
@${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}|' \
|
2015-12-19 21:22:02 +01:00
|
|
|
-e 's|/usr/X11R6|${LOCALBASE}|' \
|
|
|
|
-e 's|%%LOCALBASE%%|${LOCALBASE}|'
|
2007-08-07 14:42:44 +02:00
|
|
|
@${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'
|
|
|
|
|
|
|
|
do-install:
|
2014-12-29 09:39:33 +01:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/mencoder ${STAGEDIR}${PREFIX}/bin
|
2007-08-07 14:42:44 +02:00
|
|
|
|
|
|
|
post-install:
|
2014-12-29 09:39:33 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/DOCS/man/en/mplayer.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/mencoder.1
|
2013-12-15 19:50:51 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}
|
|
|
|
@${CHMOD} 755 ${STAGEDIR}${DATADIR}
|
|
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}/tools
|
|
|
|
@${CHMOD} 755 ${STAGEDIR}${DATADIR}/tools
|
2007-08-07 14:42:44 +02:00
|
|
|
.for tool in ${TOOLFILES}
|
2014-12-29 09:39:33 +01:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/TOOLS/${tool} ${STAGEDIR}${DATADIR}/tools
|
2007-08-07 14:42:44 +02:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|