aboutsummaryrefslogtreecommitdiff
path: root/multimedia/ffmpeg
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2010-04-18 12:07:45 +0000
committerMartin Matuska <mm@FreeBSD.org>2010-04-18 12:07:45 +0000
commitc69b1d74dff303eb8d4d3fc4e86b4290e9314853 (patch)
tree1fd893f174f736ae7b5a35372bac352570d59b6f /multimedia/ffmpeg
parent67753e7103763ad3ede91b65b58bd2b367c73a00 (diff)
downloadports-c69b1d74dff303eb8d4d3fc4e86b4290e9314853.tar.gz
ports-c69b1d74dff303eb8d4d3fc4e86b4290e9314853.zip
Notes
Diffstat (limited to 'multimedia/ffmpeg')
-rw-r--r--multimedia/ffmpeg/Makefile25
1 files changed, 21 insertions, 4 deletions
diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile
index 54c7cf87bc52..82da753406f7 100644
--- a/multimedia/ffmpeg/Makefile
+++ b/multimedia/ffmpeg/Makefile
@@ -8,7 +8,7 @@
PORTNAME= ffmpeg
PORTVERSION= 0.5.1
PORTEPOCH= 1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= multimedia audio ipv6 net
MASTER_SITES= http://ffmpeg.org/releases/
@@ -45,6 +45,7 @@ OPTIONS= AMR_NB "AMR Narrow Band encoder" off \
VORBIS "Vorbis encoder via libvorbis (implies OGG)" on \
X11GRAB "enable X11 grabbing" off \
X264 "H.264 encoder" on \
+ X264_DEV "Require x264 from multimedia/x264-devel" off \
XVID "Xvid encoder via xvidcore" on
COMPAT_HEADERS=libavcodec/avcodec.h \
@@ -111,19 +112,19 @@ USE_RC_SUBR= ffserver
.endif
# sse hardware vector support
-.if (defined(MACHINE_CPU) && ${MACHINE_CPU:Msse} == "sse")
+.if defined(MACHINE_CPU) && (${MACHINE_CPU:Msse} == "sse" || ${MACHINE_CPU:Mamd64} == "amd64")
WITH_BUILTIN_VECTOR= yes
.else
CONFIGURE_ARGS+= --disable-sse
.endif
# mmx support
-.if ${MACHINE_CPU:Mmmx} == ""
+.if defined(MACHINE_CPU) && ${MACHINE_CPU:Mmmx} == "" && ${MACHINE_CPU:Mamd64} == ""
CONFIGURE_ARGS+= --disable-mmx
WITHOUT_BUILTIN_VECTOR= yes
.endif
-# builtin vector, requires mmx
+# builtin vector, requires mmx and sse
.if !defined(WITHOUT_BUILTIN_VECTOR) && defined(WITH_BUILTIN_VECTOR)
FFMPEG_CFLAGS+= -msse
.endif
@@ -289,7 +290,23 @@ CONFIGURE_ARGS+= --disable-x11grab
# x264
.ifndef(WITHOUT_X264)
+# Automatically choose the multimedia/x264-devel port if installed
+. if !defined(WITH_X264_DEV)
+. if exists(${LOCALBASE}/include/x264.h)
+X264_BUILD!= ${GREP} "define X264_BUILD .." ${LOCALBASE}/include/x264.h | ${AWK} '{ print $$3 }'
+. if ${X264_BUILD} == "85"
+_WANT_X264_DEVEL= yes
+. endif
+. endif
+. else
+_WANT_X264_DEVEL=yes
+. endif
+
+. if defined(_WANT_X264_DEVEL)
+LIB_DEPENDS+= x264.85:${PORTSDIR}/multimedia/x264-devel
+. else
LIB_DEPENDS+= x264.65:${PORTSDIR}/multimedia/x264
+. endif
CONFIGURE_ARGS+= --enable-libx264
.else
CONFIGURE_ARGS+= --disable-libx264