2002-05-31 20:19:48 +02:00
|
|
|
# New ports collection makefile for: mjpegtools
|
|
|
|
# Date created: Wed May 29 21:12:38 UTC 2002
|
|
|
|
# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= mjpegtools
|
2005-09-28 00:14:24 +02:00
|
|
|
DISTVERSION= 1.8.0
|
2006-02-23 11:40:44 +01:00
|
|
|
PORTREVISION= 2
|
2002-11-28 01:09:51 +01:00
|
|
|
CATEGORIES= multimedia
|
2002-05-31 20:19:48 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
|
|
|
MASTER_SITE_SUBDIR= mjpeg
|
|
|
|
|
2005-03-10 04:08:59 +01:00
|
|
|
MAINTAINER= ahze@FreeBSD.org
|
2003-02-23 20:58:35 +01:00
|
|
|
COMMENT= Set of tools to record/playback/edit videos in MPEG format
|
2002-05-31 20:19:48 +02:00
|
|
|
|
2005-04-02 18:43:31 +02:00
|
|
|
LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png
|
2002-05-31 20:19:48 +02:00
|
|
|
|
2005-03-11 01:45:41 +01:00
|
|
|
CONFLICTS= mplex-*
|
2002-05-31 20:19:48 +02:00
|
|
|
USE_GMAKE= yes
|
2005-11-15 07:52:12 +01:00
|
|
|
USE_AUTOTOOLS= libtool:15
|
2002-05-31 20:19:48 +02:00
|
|
|
USE_XLIB= yes
|
|
|
|
GNU_CONFIGURE= yes
|
2004-06-26 06:31:08 +02:00
|
|
|
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
|
2004-08-20 17:57:33 +02:00
|
|
|
LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
|
2005-07-14 09:32:44 +02:00
|
|
|
USE_GNOME= gnomehack gnometarget
|
2002-07-15 20:12:08 +02:00
|
|
|
WANT_GNOME= yes
|
2004-03-08 02:01:31 +01:00
|
|
|
WANT_SDL= yes
|
2004-08-20 17:57:33 +02:00
|
|
|
INSTALLS_SHLIB= yes
|
2002-05-31 20:19:48 +02:00
|
|
|
|
2004-06-26 06:31:08 +02:00
|
|
|
INFO= mjpeg-howto
|
|
|
|
MAN1= jpeg2yuv.1 lav2mpeg.1 lav2wav.1 lav2yuv.1 \
|
2002-05-31 20:19:48 +02:00
|
|
|
lavpipe.1 lavplay.1 lavrec.1 lavtrans.1 mjpegtools.1 mp2enc.1 \
|
2005-07-14 09:32:44 +02:00
|
|
|
mpeg2enc.1 mplex.1 pgmtoy4m.1 png2yuv.1 pnmtoy4m.1 ppmtoy4m.1 \
|
|
|
|
y4mcolorbars.1 y4mdenoise.1 y4munsharp.1 y4mtopnm.1 y4mtoppm.1 \
|
2004-06-26 06:31:08 +02:00
|
|
|
yuv2lav.1 yuvdenoise.1 yuvfps.1 yuvinactive.1 yuvkineco.1 \
|
|
|
|
yuvmedianfilter.1 yuvplay.1 yuvscaler.1 yuvycsnoise.1
|
2002-05-31 20:19:48 +02:00
|
|
|
MAN5= yuv4mpeg.5
|
|
|
|
|
|
|
|
DOC_FILES= AUTHORS BUGS CHANGES COPYING ChangeLog HINTS NEWS \
|
|
|
|
PLANS README README.DV README.avilib README.glav \
|
2004-06-26 06:31:08 +02:00
|
|
|
README.AltiVec \
|
2002-05-31 20:19:48 +02:00
|
|
|
README.lavpipe README.transist TODO
|
|
|
|
|
2004-06-26 06:31:08 +02:00
|
|
|
PORTDOCS= ${DOC_FILES}
|
|
|
|
|
2002-05-31 20:19:48 +02:00
|
|
|
post-install:
|
|
|
|
.ifndef(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${DOCSDIR}
|
|
|
|
.for file in ${DOC_FILES}
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
|
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2005-04-02 18:43:31 +02:00
|
|
|
.if ${ARCH} == "i386" || ${ARCH} == "amd64"
|
|
|
|
.if !defined(WITHOUT_AVIFILE) && !defined(PACKAGE_BUILDING)
|
|
|
|
LIB_DEPENDS+= aviplay.0:${PORTSDIR}/multimedia/avifile
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2004-06-26 06:54:26 +02:00
|
|
|
.if ${ARCH} == "i386"
|
|
|
|
BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm
|
2002-06-07 18:12:48 +02:00
|
|
|
.endif
|
|
|
|
|
2002-05-31 20:19:48 +02:00
|
|
|
# pre-detection
|
2004-12-15 02:42:49 +01:00
|
|
|
# JPEGMMX
|
|
|
|
.if exists(${LOCALBASE}/lib/libjpeg-mmx.a)
|
|
|
|
WITH_JPEGMMX= yes
|
|
|
|
.endif
|
2002-05-31 20:19:48 +02:00
|
|
|
# LIBDV
|
2004-03-14 04:56:07 +01:00
|
|
|
.if exists(${LOCALBASE}/lib/libdv.a)
|
2002-05-31 20:19:48 +02:00
|
|
|
WITH_LIBDV= yes
|
|
|
|
.endif
|
2002-12-21 17:21:53 +01:00
|
|
|
# LIBGNUGETOPT
|
2003-04-19 14:37:13 +02:00
|
|
|
# -CURRENT after 500041 has getopt_long
|
|
|
|
.if ${OSVERSION} < 500041
|
2002-12-21 17:21:53 +01:00
|
|
|
WITH_LIBGNUGETOPT= yes
|
|
|
|
.endif
|
2002-05-31 20:19:48 +02:00
|
|
|
# LIBMOVTAR
|
|
|
|
.if exists(${LOCALBASE}/lib/libmovtar.a)
|
|
|
|
WITH_LIBMOVTAR= yes
|
|
|
|
.endif
|
|
|
|
# QUICKTIME
|
2004-08-20 17:57:33 +02:00
|
|
|
.if exists(${LOCALBASE}/lib/libquicktime.so.0)
|
2002-05-31 20:19:48 +02:00
|
|
|
WITH_QUICKTIME= yes
|
|
|
|
.endif
|
|
|
|
# SDL
|
2004-03-08 02:01:31 +01:00
|
|
|
.if ${HAVE_SDL}:Msdl}!=""
|
2002-05-31 20:19:48 +02:00
|
|
|
WITH_SDL= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# option activation
|
2002-07-15 20:12:08 +02:00
|
|
|
.if ${HAVE_GNOME:Mgtk12}!=""
|
|
|
|
USE_GNOME+= gtk12
|
2003-05-11 05:55:35 +02:00
|
|
|
PLIST_SUB+= GTK=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= GTK="@comment "
|
2002-05-31 20:19:48 +02:00
|
|
|
.endif
|
|
|
|
#
|
2004-12-15 02:42:49 +01:00
|
|
|
.ifdef(WITH_JPEGMMX)
|
|
|
|
LIB_DEPENDS+= jpeg-mmx.62:${PORTSDIR}/graphics/jpeg-mmx
|
|
|
|
.else
|
|
|
|
LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg
|
|
|
|
.endif
|
|
|
|
#
|
2002-05-31 20:19:48 +02:00
|
|
|
.ifdef(WITH_LIBDV)
|
2004-03-14 04:56:07 +01:00
|
|
|
LIB_DEPENDS+= dv.4:${PORTSDIR}/multimedia/libdv
|
2002-05-31 20:19:48 +02:00
|
|
|
|
|
|
|
CONFIGURE_ARGS+= --with-dv=${LOCALBASE}
|
|
|
|
.endif
|
|
|
|
#
|
2004-06-26 06:54:26 +02:00
|
|
|
.ifdef(WITH_LIBDV_PAL)
|
|
|
|
CONFIGURE_ARGS+= --with-dv-yv12
|
|
|
|
|
|
|
|
WITH_LIBDV= yes
|
|
|
|
.endif
|
|
|
|
#
|
2002-12-21 17:21:53 +01:00
|
|
|
.ifdef(WITH_LIBGNUGETOPT)
|
2003-04-18 06:08:57 +02:00
|
|
|
USE_GETOPT_LONG= yes
|
2002-12-21 17:21:53 +01:00
|
|
|
.endif
|
|
|
|
#
|
2002-05-31 20:19:48 +02:00
|
|
|
.ifdef(WITH_LIBMOVTAR)
|
2002-11-28 01:09:51 +01:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/lib/libmovtar.a:${PORTSDIR}/multimedia/libmovtar
|
2002-05-31 20:19:48 +02:00
|
|
|
|
|
|
|
CONFIGURE_ARGS+= --with-movtar-prefix=${LOCALBASE}
|
|
|
|
.endif
|
|
|
|
#
|
|
|
|
.ifdef(WITH_SDL)
|
2004-03-08 02:01:31 +01:00
|
|
|
USE_SDL= sdl
|
2002-05-31 20:19:48 +02:00
|
|
|
CONFIGURE_ARGS+= --with-sdl
|
|
|
|
.endif
|
|
|
|
#
|
|
|
|
.ifdef(WITH_QUICKTIME)
|
2004-08-20 17:57:33 +02:00
|
|
|
LIB_DEPENDS+= quicktime.0:${PORTSDIR}/multimedia/libquicktime
|
2002-05-31 20:19:48 +02:00
|
|
|
|
2004-08-20 17:57:33 +02:00
|
|
|
CONFIGURE_ARGS+= --with-quicktime
|
2002-05-31 20:19:48 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-everything::
|
2002-07-15 20:12:08 +02:00
|
|
|
.if ${HAVE_GNOME:Mgtk12}==""
|
|
|
|
@${ECHO_MSG} "====> You can enable GTK support by defining WITH_GNOME"
|
2002-05-31 20:19:48 +02:00
|
|
|
.endif
|
2004-12-15 02:42:49 +01:00
|
|
|
.ifndef(WITH_JPEGMMX)
|
|
|
|
@${ECHO_MSG} "====> You can enable Jpeg-MMX support by defining WITH_JPEGMMX"
|
|
|
|
.endif
|
2002-05-31 20:19:48 +02:00
|
|
|
.ifndef(WITH_LIBDV)
|
|
|
|
@${ECHO_MSG} "====> You can enable DV support by defining WITH_LIBDV"
|
|
|
|
.endif
|
2004-06-26 06:54:26 +02:00
|
|
|
.ifndef(WITH_LIBDV_PAL)
|
|
|
|
@${ECHO_MSG} "====> You can enable DV PAL support by defining WITH_LIBDV_PAL"
|
|
|
|
.endif
|
2002-05-31 20:19:48 +02:00
|
|
|
.ifndef(WITH_LIBMOVTAR)
|
|
|
|
@${ECHO_MSG} "====> You can enable movtar support by defining WITH_LIBMOVTAR"
|
|
|
|
.endif
|
|
|
|
.ifndef(WITH_QUICKTIME)
|
|
|
|
@${ECHO_MSG} "====> You can enable quicktime support by defining WITH_QUICKTIME"
|
|
|
|
.endif
|
|
|
|
.ifndef(WITH_SDL)
|
|
|
|
@${ECHO_MSG} "====> You can enable SDL support by defining WITH_SDL"
|
|
|
|
.endif
|
2005-04-02 18:43:31 +02:00
|
|
|
.if ${ARCH} == "i386" || ${ARCH} == "amd64"
|
|
|
|
.ifndef(WITHOUT_AVIFILE)
|
|
|
|
@${ECHO_MSG} "====> You can disable AVIFILE support by defining WITHOUT_AVIFILE"
|
|
|
|
.endif
|
|
|
|
.endif
|
2002-05-31 20:19:48 +02:00
|
|
|
|
|
|
|
post-patch:
|
2002-07-03 21:15:17 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|SDL/|SDL11/|' \
|
2002-05-31 20:19:48 +02:00
|
|
|
${WRKSRC}/lavtools/liblavplay.c \
|
2005-07-14 09:32:44 +02:00
|
|
|
${WRKSRC}/lavtools/yuvplay.c \
|
|
|
|
${WRKSRC}/lavtools/lavplay.c
|
2002-07-17 23:07:13 +02:00
|
|
|
# a bug that is happening with configure. It's not detecting that
|
|
|
|
# FreeBSD has pthreads. It might happen in other OSes but I'm not
|
|
|
|
# risking such a general patch
|
|
|
|
.if ${OPSYS:L} == "freebsd"
|
|
|
|
@${REINPLACE_CMD} -E -e 's|^(have_pthread=).+$$|\1true|' \
|
|
|
|
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
|
|
|
|
.endif
|
2002-12-21 17:21:53 +01:00
|
|
|
.ifdef(WITH_LIBGNUGETOPT)
|
|
|
|
@${REINPLACE_CMD} -E -e 's|(AVIPLAY_LIBS \=.*)|\1 -lgnugetopt|' \
|
|
|
|
${WRKSRC}/lavtools/Makefile.in
|
|
|
|
.endif
|
2003-04-18 06:08:57 +02:00
|
|
|
# link to pthreads
|
|
|
|
@${REINPLACE_CMD} -E -e 's|(AVIPLAY_LIBS \=.*)|\1 ${PTHREAD_LIBS}|' \
|
|
|
|
${WRKSRC}/lavtools/Makefile.in
|
2002-05-31 20:19:48 +02:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|