aboutsummaryrefslogtreecommitdiff
path: root/multimedia/ffmpeg045/Makefile
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2002-10-11 19:28:30 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2002-10-11 19:28:30 +0000
commit4f2162a0d54f5d95c741a618577a2aafd500308f (patch)
tree3144bcec3109220690d47df1929e65caea18da15 /multimedia/ffmpeg045/Makefile
parent40c11279c3ef2d1e8688134702e0baafaf7dfebf (diff)
downloadports-4f2162a0d54f5d95c741a618577a2aafd500308f.tar.gz
ports-4f2162a0d54f5d95c741a618577a2aafd500308f.zip
Notes
Diffstat (limited to 'multimedia/ffmpeg045/Makefile')
-rw-r--r--multimedia/ffmpeg045/Makefile98
1 files changed, 86 insertions, 12 deletions
diff --git a/multimedia/ffmpeg045/Makefile b/multimedia/ffmpeg045/Makefile
index 77f823afa071..234c5083b7f5 100644
--- a/multimedia/ffmpeg045/Makefile
+++ b/multimedia/ffmpeg045/Makefile
@@ -7,10 +7,10 @@
PORTNAME= ffmpeg
PORTVERSION= 0.4.5
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= graphics
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR= ${PORTNAME}
+MASTER_SITES= http://ffmpeg.sourceforge.net/
+DISTNAME= ffmpeg-cvs
MAINTAINER= lioux@FreeBSD.org
@@ -23,31 +23,100 @@ ONLY_FOR_ARCHS= i386
HAS_CONFIGURE= yes
USE_GMAKE= yes
USE_REINPLACE= yes
-MAKE_ARGS= MAKE="${GMAKE}" LOCALBASE="${LOCALBASE}"
CONFIGURE_ARGS= --cc="${CC}" --prefix="${PREFIX}" \
- --disable-grab
+ --make="${GMAKE}" --enable-shared \
+ --extra-cflags="-I${LOCALBASE}/include" \
+ --extra-libs="-L${LOCALBASE}/lib"
+PLIST_SUB= SHLIB_VERSION=${SHLIB_VERSION}
+INSTALLS_SHLIB= yes
-DOC_FILES= README
+SHLIB_VERSION= 0
+#
+DOC_FILES= COPYING Changelog README VERSION
# under subdir doc
DOC_DOCFILES= FAQ README.dev README.tech \
TODO bench.txt ffmpeg.txt \
+ HOWTO-STREAM README.beos \
ffserver.txt
HEADER_FILES= libavcodec/avcodec.h libavcodec/common.h \
libavcodec/dsputil.h
-LIB_FILES= libav/libav.a libavcodec/libavcodec.a
+LIB_FILES= libavcodec/libavcodec.a libav/libavformat.a
+
+.include <bsd.port.pre.mk>
+
+## lib detection
+##
+## lame mp3
+.if exists(${LOCALBASE}/lib/libmp3lame.so.0)
+WITH_MP3=yes
+.endif
+## vorbis
+.if exists(${LOCALBASE}/lib/libvorbisenc.so.2)
+WITH_VORBIS=yes
+.endif
+## support activation
+##
+## disable mmx
.ifdef(WITHOUT_MMX)
CONFIGURE_ARGS+= --disable-mmx
.endif
+## mp3
+.ifdef(WITH_MP3)
+LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame
+
+CONFIGURE_ARGS+= --enable-mp3lame
+.endif
+## vorbis
+.ifdef(WITH_VORBIS)
+LIB_DEPENDS+= vorbisenc.2:${PORTSDIR}/audio/libvorbis
+
+CONFIGURE_ARGS+= --enable-vorbis
+.endif
-.ifndef(WITHOUT_MMX)
pre-everything::
+.ifndef(WITHOUT_MMX)
@${ECHO_MSG} "Define WITHOUT_MMX if your system does not support MMX"
.endif
+.ifndef(WITH_MP3)
+ @${ECHO_MSG} 'Define WITH_MP3 to enable lame MP3 codec'
+.endif
+.ifndef(WITH_VORBIS)
+ @${ECHO_MSG} 'Define WITH_VORBIS to enable libvorbisenc VORBIS codec'
+.endif
+.if !(defined(WITH_BKTR_FORMAT) && defined(WITH_BKTR_DEV))
+ @${ECHO_MSG}
+ @${ECHO_MSG} 'If you want to capture from a bktr(4) supported card'
+ @${ECHO_MSG} 'you will probably need to set the input device and format'
+ @${ECHO_MSG} 'You can set WITH_BKTR_FORMAT to NTSC or PAL and you can set'
+ @${ECHO_MSG} 'WITH_BKTR_DEV to 0, 1, 2 or 3 (1 is usually the tuner)'
+ @${ECHO_MSG} 'so for a PAL tuner make WITH_BKTR_FORMAT=PAL WITH_BKTR_DEV=1'
+ @${ECHO_MSG}
+ @${ECHO_MSG} 'Warning: invalid settings will probably dump cores'
+ @${ECHO_MSG}
+.endif
+
+post-extract:
+# install booktree extension
+ @${CP} ${FILESDIR}/grab_bsdbktr.c ${WRKSRC}/libav/
post-patch:
@${REINPLACE_CMD} -e "s!/etc/ffserver.conf!${PREFIX}/etc/ffserver.conf!g" \
${WRKSRC}/ffserver.c
+# malloc.h was deprecated in favor of stdlib.h
+ @${FIND} ${WRKSRC} -type f | \
+ ${XARGS} -n 10 ${REINPLACE_CMD} -e \
+ 's|malloc.h|stdlib.h|'
+.ifdef(WITH_BKTR_FORMAT)
+ @${REINPLACE_CMD} -e \
+ "s!VIDEO_FORMAT NTSC!VIDEO_FORMAT ${WITH_BKTR_FORMAT}!" \
+ ${WRKSRC}/libav/grab_bsdbktr.c
+.endif
+.ifdef(WITH_BKTR_DEV)
+ @${REINPLACE_CMD} -e \
+ "s!VIDEO_INPUT METEOR_INPUT_DEV0!VIDEO_INPUT METEOR_INPUT_DEV${WITH_BKTR_DEV}!" \
+ ${WRKSRC}/libav/grab_bsdbktr.c
+.endif
post-install:
.ifndef(NOPORTDOCS)
@@ -63,13 +132,18 @@ post-install:
${PREFIX}/etc/ffserver.conf.sample
.for file in ${HEADER_FILES}
# fix header references prior to installation
- @${REINPLACE_CMD} -e 's|"common.h"|<libavcodec/common.h>|' \
+ @${REINPLACE_CMD} -e 's|"common.h"|<ffmpeg/common.h>|; \
+ s|"avcodec.h"|<ffmpeg/avcodec.h>|' \
${WRKSRC}/${file}
- @${MKDIR} ${PREFIX}/include/${file:H}
- @${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/include/${file}
+ @${INSTALL_DATA} ${WRKSRC}/${file} \
+ ${PREFIX}/include/ffmpeg/${file:T}
.endfor
.for file in ${LIB_FILES}
@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/lib/${file:T}
.endfor
+# add shared lib link
+ @${LN} -sf libavcodec.so \
+ ${PREFIX}/lib/libavcodec.so.${SHLIB_VERSION}
+
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>