2002-03-30 13:02:14 +01:00
|
|
|
# New ports collection makefile for: transcode
|
|
|
|
# Date created: 17 December 2001
|
|
|
|
# Whom: Hendrik Scholz <hendrik@scholz.net>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2002-03-30 13:17:47 +01:00
|
|
|
PORTNAME= transcode
|
2011-12-21 02:20:34 +01:00
|
|
|
PORTVERSION= 1.1.7
|
2012-04-25 16:19:00 +02:00
|
|
|
PORTREVISION= 6
|
2003-04-04 03:38:40 +02:00
|
|
|
CATEGORIES= multimedia
|
2011-12-21 02:20:34 +01:00
|
|
|
MASTER_SITES= http://cdn.bitbucket.org/france/transcode-tcforge/downloads/
|
2002-03-30 13:02:14 +01:00
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
MAINTAINER= cyberbotx@cyberbotx.com
|
2003-02-21 13:17:17 +01:00
|
|
|
COMMENT= A text-console utility for video stream processing
|
2002-03-30 13:02:14 +01:00
|
|
|
|
2011-12-21 02:20:34 +01:00
|
|
|
LIB_DEPENDS= avcodec.1:${PORTSDIR}/multimedia/ffmpeg
|
2002-04-18 06:53:53 +02:00
|
|
|
|
2007-04-17 19:22:05 +02:00
|
|
|
USE_BZIP2= yes
|
|
|
|
FAKEDIR= ${WRKDIR}/fake
|
|
|
|
PLIST= ${WRKDIR}/plist
|
2002-04-18 06:53:53 +02:00
|
|
|
USE_GMAKE= yes
|
2006-12-22 16:28:42 +01:00
|
|
|
USE_LDCONFIG= yes
|
2005-10-14 18:19:27 +02:00
|
|
|
WANT_SDL= yes
|
2009-07-22 20:01:55 +02:00
|
|
|
WANT_GNOME= yes
|
2010-12-04 08:34:27 +01:00
|
|
|
USE_AUTOTOOLS= libtool
|
2011-06-06 06:31:52 +02:00
|
|
|
CPPFLAGS+= -isystem ${LOCALBASE}/include
|
2011-09-24 00:26:39 +02:00
|
|
|
CONFIGURE_ENV= SDL_CONFIG="${SDL_CONFIG}"
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
2011-12-21 02:20:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-oss
|
2002-04-18 06:53:53 +02:00
|
|
|
|
2003-07-10 10:55:16 +02:00
|
|
|
MAN1= avifix.1 aviindex.1 avimerge.1 avisplit.1 avisync.1 tccat.1 tcdemux.1 \
|
|
|
|
tcprobe.1 tcscan.1 transcode.1 tcextract.1 tcdecode.1 tcmodinfo.1 \
|
2009-07-22 20:01:55 +02:00
|
|
|
tcpvmexportd.1 tcxmlcheck.1 transcode_export.1 transcode_filter.1 \
|
|
|
|
transcode_import.1 tcexport.1 tcmodchain.1
|
|
|
|
|
|
|
|
OPTIONS= OPTIMIZED_CFLAGS "Build with optimizations" off \
|
|
|
|
X11 "Build with X11 support" off \
|
2009-11-05 18:55:37 +01:00
|
|
|
MPEG2 "Enable libmpeg2 support" off \
|
2009-07-22 20:01:55 +02:00
|
|
|
BKTR "Enable bktr support" off \
|
|
|
|
POSTPROC "Enable libpostproc support" off \
|
|
|
|
FREETYPE "Enable FreeType2 support" off \
|
|
|
|
LAME "Enable lame support" on \
|
|
|
|
XVID "Enable Xvid support" off \
|
|
|
|
X264 "Enable x264 support" off \
|
|
|
|
OGG "Enable ogg support" off \
|
|
|
|
VORBIS "Enable vorbis support" off \
|
|
|
|
THEORA "Enable theora support" off \
|
|
|
|
DVDREAD "Enable libdvdread support" on \
|
|
|
|
LIBDV "Enable libdv support" off \
|
|
|
|
QUICKTIME "Enable libquicktime support" off \
|
|
|
|
LZO "Enable LZO support" off \
|
|
|
|
LIBA52 "Enable a52 support (as default decoder)" off \
|
|
|
|
FAAC "Enable faac support" off \
|
|
|
|
XML "Enable libxml2 support" off \
|
|
|
|
MJPEG "Enable mjpegtools support" off \
|
|
|
|
SDL "Enable SDL support" off \
|
|
|
|
IMAGEMAGICK "Enable ImageMagick support" off \
|
|
|
|
JPEG "Enable libjpeg support" on \
|
|
|
|
ICONV "Enable libiconv support" on
|
2002-04-18 06:53:53 +02:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if ${OSVERSION} < 700000
|
2008-09-01 19:20:14 +02:00
|
|
|
CONFIGURE_ENV+= LIBAVCODEC_EXTRA_LIBS="-pthread"
|
|
|
|
.endif
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if !defined(WITHOUT_X11)
|
|
|
|
USE_XORG= xv xaw xpm
|
|
|
|
CONFIGURE_ARGS+= --with-x
|
2005-02-23 19:06:15 +01:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --without-x
|
2004-11-17 23:11:44 +01:00
|
|
|
.endif
|
|
|
|
|
2009-11-05 18:55:37 +01:00
|
|
|
.if defined(WITH_MPEG2)
|
|
|
|
LIB_DEPENDS+= mpeg2.0:${PORTSDIR}/multimedia/libmpeg2
|
2011-12-21 02:20:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-libmpeg2 --enable-libmpeg2convert
|
2009-11-05 18:55:37 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-libmpeg2
|
|
|
|
.endif
|
|
|
|
|
2005-08-29 05:17:57 +02:00
|
|
|
.if defined(WITH_BKTR)
|
|
|
|
CONFIGURE_ARGS+= --enable-bktr
|
|
|
|
.endif
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if !defined(WITHOUT_POSTPROC)
|
2011-12-21 02:20:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-libpostproc
|
2005-02-23 19:06:15 +01:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-libpostproc
|
2005-02-23 19:06:15 +01:00
|
|
|
.endif
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if defined(WITH_FREETYPE)
|
|
|
|
LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2
|
2011-12-21 02:20:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-freetype2
|
2004-02-26 18:58:26 +01:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-freetype2
|
2004-02-26 18:58:26 +01:00
|
|
|
.endif
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if !defined(WITHOUT_LAME)
|
|
|
|
LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame
|
|
|
|
CONFIGURE_ARGS+= --with-lame-prefix=${LOCALBASE} --enable-lame
|
2002-03-30 13:17:47 +01:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-lame
|
2002-04-18 06:53:53 +02:00
|
|
|
.endif
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if defined(WITH_XVID)
|
|
|
|
LIB_DEPENDS+= xvidcore.4:${PORTSDIR}/multimedia/xvid
|
|
|
|
CONFIGURE_ARGS+= --with-xvid-prefix=${LOCALBASE} --enable-xvid
|
2005-05-11 17:04:48 +02:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-xvid
|
2005-05-11 17:04:48 +02:00
|
|
|
.endif
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if defined(WITH_X264)
|
2012-04-25 16:19:00 +02:00
|
|
|
LIB_DEPENDS+= x264.123:${PORTSDIR}/multimedia/x264
|
2011-12-21 02:20:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-x264
|
2002-04-18 06:53:53 +02:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-x264
|
2002-04-18 06:53:53 +02:00
|
|
|
.endif
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if defined(WITH_OGG)
|
2010-06-06 22:44:03 +02:00
|
|
|
LIB_DEPENDS+= ogg.7:${PORTSDIR}/audio/libogg
|
2011-12-21 02:20:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-ogg
|
2002-04-18 06:53:53 +02:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-ogg
|
2002-04-18 06:53:53 +02:00
|
|
|
.endif
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if defined(WITH_VORBIS)
|
|
|
|
LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis
|
2011-12-21 02:20:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-vorbis
|
2002-04-18 06:53:53 +02:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-vorbis
|
2002-04-18 06:53:53 +02:00
|
|
|
.endif
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if defined(WITH_THEORA)
|
|
|
|
LIB_DEPENDS+= theora.0:${PORTSDIR}/multimedia/libtheora
|
2011-12-21 02:20:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-theora
|
2002-03-30 13:17:47 +01:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-theora
|
2002-03-30 13:02:14 +01:00
|
|
|
.endif
|
2002-04-18 06:53:53 +02:00
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if !defined(WITHOUT_DVDREAD)
|
|
|
|
LIB_DEPENDS+= dvdread.4:${PORTSDIR}/multimedia/libdvdread
|
|
|
|
CONFIGURE_ARGS+= --with-libdvdread-prefix=${LOCALBASE} --enable-libdvdread
|
2002-03-30 13:17:47 +01:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-libdvdread
|
2002-03-30 13:02:14 +01:00
|
|
|
.endif
|
2002-04-18 06:53:53 +02:00
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if defined(WITH_LIBDV)
|
|
|
|
LIB_DEPENDS+= dv.4:${PORTSDIR}/multimedia/libdv
|
2011-12-21 02:20:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-libdv
|
2009-07-22 20:01:55 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-libdv
|
2002-03-30 13:02:14 +01:00
|
|
|
.endif
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if defined(WITH_QUICKTIME)
|
|
|
|
LIB_DEPENDS+= quicktime.0:${PORTSDIR}/multimedia/libquicktime
|
2011-12-21 02:20:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-libquicktime
|
2009-07-22 20:01:55 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-libquicktime
|
2002-04-18 06:53:53 +02:00
|
|
|
.endif
|
2002-03-30 13:02:14 +01:00
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if defined(WITH_LZO)
|
|
|
|
LIB_DEPENDS+= lzo2.2:${PORTSDIR}/archivers/lzo2
|
2009-11-05 18:55:37 +01:00
|
|
|
CONFIGURE_ARGS+= --with-lzo-prefix=${LOCALBASE} --with-lzo-includes=${LOCALBASE} \
|
|
|
|
--enable-lzo
|
2009-07-22 20:01:55 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-lzo
|
2005-05-11 17:04:48 +02:00
|
|
|
.endif
|
|
|
|
|
2002-04-18 06:53:53 +02:00
|
|
|
.if defined(WITH_LIBA52)
|
|
|
|
LIB_DEPENDS+= a52.0:${PORTSDIR}/audio/liba52
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --with-a52-prefix=${LOCALBASE} --enable-a52
|
2002-04-18 06:53:53 +02:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-a52
|
2002-04-18 06:53:53 +02:00
|
|
|
.endif
|
2002-03-30 13:02:14 +01:00
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if defined(WITH_FAAC)
|
|
|
|
LIB_DEPENDS+= faac.0:${PORTSDIR}/audio/faac
|
|
|
|
CONFIGURE_ARGS+= --with-faac-prefix=${LOCALBASE} --enable-faac
|
2002-10-29 18:16:55 +01:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-faac
|
2002-10-29 18:16:55 +01:00
|
|
|
.endif
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if !defined(WITHOUT_XML) && (defined(WITH_XML) || ${HAVE_GNOME:Mlibxml2}!="")
|
|
|
|
USE_GNOME+= libxml2
|
2011-12-21 02:20:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-libxml2
|
2003-06-04 18:56:43 +02:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-libxml2
|
2003-06-04 18:56:43 +02:00
|
|
|
.endif
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if defined(WITH_MJPEG)
|
2011-06-06 06:31:52 +02:00
|
|
|
LIB_DEPENDS+= lavjpeg-2.0.0:${PORTSDIR}/multimedia/mjpegtools
|
2011-12-21 02:20:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-mjpegtools
|
2003-06-19 11:08:01 +02:00
|
|
|
.else
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-mjpegtools
|
2003-06-19 11:08:01 +02:00
|
|
|
.endif
|
|
|
|
|
2009-07-22 20:01:55 +02:00
|
|
|
.if !defined(WITHOUT_SDL) && (defined(WITH_SDL) || ${HAVE_SDL:Msdl}!="")
|
|
|
|
USE_SDL+= sdl
|
2011-12-21 02:20:34 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-sdl
|
2009-07-22 20:01:55 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-sdl
|
2002-04-18 06:53:53 +02:00
|
|
|
.endif
|
2009-07-22 20:01:55 +02:00
|
|
|
|
|
|
|
.if defined(WITH_IMAGEMAGICK)
|
2011-10-11 09:17:46 +02:00
|
|
|
LIB_DEPENDS+= MagickWand.5:${PORTSDIR}/graphics/ImageMagick
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --with-imagemagick-prefix=${LOCALBASE} --enable-imagemagick
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-imagemagick
|
2003-06-04 18:56:43 +02:00
|
|
|
.endif
|
2009-07-22 20:01:55 +02:00
|
|
|
|
|
|
|
.if !defined(WITHOUT_JPEG)
|
2010-02-05 12:46:55 +01:00
|
|
|
LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg
|
2009-07-22 20:01:55 +02:00
|
|
|
CONFIGURE_ARGS+= --with-libjpeg-prefix=${LOCALBASE} --enable-libjpeg
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-libjpeg
|
2003-06-19 11:08:01 +02:00
|
|
|
.endif
|
2009-07-22 20:01:55 +02:00
|
|
|
|
|
|
|
.if !defined(WITHOUT_ICONV)
|
|
|
|
USE_ICONV= yes
|
|
|
|
CONFIGURE_ARGS+= --with-iconv-prefix=${LOCALBASE} --enable-iconv
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-iconv
|
2005-08-29 05:17:57 +02:00
|
|
|
.endif
|
2002-04-18 06:53:53 +02:00
|
|
|
|
|
|
|
post-patch:
|
2009-07-22 20:01:55 +02:00
|
|
|
.if defined(WITH_LZO) && !defined(WITHOUT_LZO)
|
2008-09-01 19:20:14 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|%%NUV%%|nuv|' ${WRKSRC}/import/Makefile.in
|
2008-08-16 00:42:37 +02:00
|
|
|
.else
|
2008-09-01 19:20:14 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|%%NUV%%||' ${WRKSRC}/import/Makefile.in
|
2008-08-16 00:42:37 +02:00
|
|
|
.endif
|
2002-04-18 06:53:53 +02:00
|
|
|
.if !defined(WITH_OPTIMIZED_CFLAGS)
|
2002-10-29 18:16:55 +01:00
|
|
|
@${FIND} ${WRKSRC} -type f | ${XARGS} -n 10 -x ${REINPLACE_CMD} \
|
2002-04-18 06:53:53 +02:00
|
|
|
-e 's|-O[236]|${CFLAGS}|'
|
|
|
|
.endif
|
2011-12-21 02:20:34 +01:00
|
|
|
@${REINPLACE_CMD} -E -e 's|loff_t|uint64_t|' ${WRKSRC}/avilib/avidump.c
|
2002-10-29 18:16:55 +01:00
|
|
|
@${REINPLACE_CMD} -E -e 's|<SDL/|<|' ${WRKSRC}/filter/preview/display.h
|
2007-05-31 07:49:09 +02:00
|
|
|
@${REINPLACE_CMD} -e '/^static.*lrint/s|static ||' ${WRKSRC}/filter/filter_modfps.c
|
2002-04-18 06:53:53 +02:00
|
|
|
|
2007-04-11 18:18:19 +02:00
|
|
|
@${REINPLACE_CMD} -E -e 's|(-la52)|\1 ${LIBA52_DEP_LIBS}|g ; \
|
2008-04-23 16:34:36 +02:00
|
|
|
s|FFMPEG_VERSION|LIBAVCODEC_IDENT|g ; \
|
|
|
|
s|-lMagick|-lMagickCore|g' \
|
2007-04-11 18:18:19 +02:00
|
|
|
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
|
2002-05-26 15:41:12 +02:00
|
|
|
|
2002-04-18 06:53:53 +02:00
|
|
|
pre-configure:
|
2002-10-29 18:16:55 +01:00
|
|
|
@${REINPLACE_CMD} -E -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
|
|
|
|
@${REINPLACE_CMD} -E -e 's|-ldl||g' ${WRKSRC}/configure
|
2009-08-04 16:42:01 +02:00
|
|
|
@${REINPLACE_CMD} -E -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/configure
|
2002-10-29 18:16:55 +01:00
|
|
|
@${REINPLACE_CMD} -E -e 's|WRKSRC|${WRKSRC}|g' ${WRKSRC}/export/Makefile.in
|
2005-05-20 16:39:57 +02:00
|
|
|
@${REINPLACE_CMD} -E -e 's|<quicktime/|<lqt/|g' \
|
|
|
|
${WRKSRC}/configure \
|
|
|
|
${WRKSRC}/export/export_mov.c \
|
|
|
|
${WRKSRC}/import/decode_mov.c \
|
|
|
|
${WRKSRC}/import/import_mov.c \
|
|
|
|
${WRKSRC}/import/probe_mov.c
|
2005-08-29 05:17:57 +02:00
|
|
|
|
2007-04-17 19:22:05 +02:00
|
|
|
pre-install:
|
|
|
|
${RM} -rf ${PLIST} ${FAKEDIR}
|
|
|
|
${MKDIR} ${FAKEDIR}
|
|
|
|
${TOUCH} -f ${PLIST}
|
2010-12-27 09:28:05 +01:00
|
|
|
@(cd ${WRKSRC} && ${GMAKE} install prefix=${FAKEDIR} mandir=${FAKEDIR}/man)
|
2007-04-17 19:22:05 +02:00
|
|
|
${RM} -rf ${FAKEDIR}/man # let bsd.port.mk handle man files
|
|
|
|
.for dir in bin share/doc lib
|
|
|
|
@(cd ${FAKEDIR}/${dir} && ${FIND} -s * -type f -o -type l | \
|
|
|
|
${SED} -e 's|^|${dir}/|' >> ${PLIST})
|
|
|
|
@(cd ${FAKEDIR}/${dir} && ${FIND} -d * -type d | \
|
|
|
|
${SED} -e 's|^|@dirrm ${dir}/|' >> ${PLIST})
|
|
|
|
.endfor
|
2004-12-07 20:57:36 +01:00
|
|
|
|
2002-04-18 06:53:53 +02:00
|
|
|
.include <bsd.port.post.mk>
|