summaryrefslogtreecommitdiff
path: root/media-video
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2012-09-11 18:20:59 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2012-09-11 18:20:59 +0300
commit2d7d250662cb735cc2c22c78f6b8cec1b3c282ce (patch)
treeaaffc96336c51b98357f3234d2f386e75fc6b0ff /media-video
parente543b01583b453ed3df227c351d88ad31db5d6b2 (diff)
modified: media-video/ffmpeg/ffmpeg-9999.ebuild
new file: net-analyzer/barnyard2/barnyard2-9999.ebuild new file: net-analyzer/barnyard2/files/barnyard2.confd new file: net-analyzer/barnyard2/files/barnyard2.initd new file: net-analyzer/barnyard2/files/makefile.patch deleted: net-analyzer/snort/files deleted: net-analyzer/snort/snort-2.8.3.1.ebuild new file: net-analyzer/snort/snort/files/disabledynamic.patch new file: net-analyzer/snort/snort/files/snort.confd new file: net-analyzer/snort/snort/files/snort.confd.2 new file: net-analyzer/snort/snort/files/snort.rc10 new file: net-analyzer/snort/snort/files/snort.rc11 new file: net-analyzer/snort/snort/snort-2.9.3.1.ebuild new file: net-libs/daq/daq-1.1.1.ebuild
Diffstat (limited to 'media-video')
-rw-r--r--media-video/ffmpeg/ffmpeg-9999.ebuild332
1 files changed, 220 insertions, 112 deletions
diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild
index ce90a0d..1a554dd 100644
--- a/media-video/ffmpeg/ffmpeg-9999.ebuild
+++ b/media-video/ffmpeg/ffmpeg-9999.ebuild
@@ -1,128 +1,213 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: $
+# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-9999.ebuild,v 1.103 2012/08/17 13:05:23 aballier Exp $
-EAPI=1
-ESVN_REPO_URI="svn://svn.mplayerhq.hu/ffmpeg/trunk"
+EAPI="4"
-inherit eutils flag-o-matic multilib toolchain-funcs subversion
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-2"
+ EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git"
+fi
-DESCRIPTION="Complete solution to record, convert and stream audio and video"
+inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
+
+DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec."
HOMEPAGE="http://ffmpeg.org/"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SRC_URI=""
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+ SRC_URI="mirror://gentoo/${P}.tar.bz2"
+else # Release
+ SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2"
+fi
+FFMPEG_REVISION="${PV#*_p}"
-LICENSE="GPL-2"
+LICENSE="GPL-2 amr? ( GPL-3 ) encode? ( aac? ( GPL-3 ) )"
SLOT="0"
-KEYWORDS=""
-IUSE="+3dnow +3dnowext +alsa altivec amr custom-cflags debug dirac doc ieee1394
- +encode +faac gsm ipv6 +mmx +mmxext +vorbis test theora +threads
- +x264 +xvid network zlib sdl X +mp3 oss schroedinger +hardcoded-tables
- bindist v4l v4l2 speex +ssse3 jpeg2k"
+if [ "${PV#9999}" = "${PV}" ] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+fi
+IUSE="
+ aac aacplus alsa amr avresample bindist bluray +bzip2 cdio celt
+ cpudetection debug doc +encode faac flite fontconfig frei0r gnutls gsm
+ +hardcoded-tables iec61883 ieee1394 jack jpeg2k libass libcaca libv4l
+ modplug mp3 network openal openssl opus oss pic pulseaudio rtmp schroedinger
+ sdl speex static-libs test theora threads truetype twolame v4l vaapi vdpau
+ vorbis vpx X x264 xvid +zlib
+ "
+
+# String for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext altivec avx mmx mmxext ssse3 vis neon"
+
+for i in ${CPU_FEATURES}; do
+ IUSE="${IUSE} ${i%:*}"
+done
-RDEPEND="sdl? ( >=media-libs/libsdl-1.2.10 )
+FFTOOLS="aviocat cws2fws ffeval graph2dot ismindex pktdumper qt-faststart trasher"
+
+for i in ${FFTOOLS}; do
+ IUSE="${IUSE} +fftools_$i"
+done
+
+RDEPEND="
alsa? ( media-libs/alsa-lib )
+ amr? ( media-libs/opencore-amr )
+ bluray? ( media-libs/libbluray )
+ bzip2? ( app-arch/bzip2 )
+ cdio? ( dev-libs/libcdio )
+ celt? ( >=media-libs/celt-0.11.1 )
encode? (
+ aac? ( media-libs/vo-aacenc )
+ aacplus? ( media-libs/libaacplus )
+ amr? ( media-libs/vo-amrwbenc )
faac? ( media-libs/faac )
- mp3? ( media-sound/lame )
- vorbis? ( media-libs/libvorbis media-libs/libogg )
- theora? ( media-libs/libtheora media-libs/libogg )
- x264? ( >=media-libs/x264-0.0.20081006 )
- xvid? ( >=media-libs/xvid-1.1.0 ) )
- zlib? ( sys-libs/zlib )
- ieee1394? ( media-libs/libdc1394
- sys-libs/libraw1394 )
- dirac? ( media-video/dirac )
+ mp3? ( >=media-sound/lame-3.98.3 )
+ theora? ( >=media-libs/libtheora-1.1.1[encode] media-libs/libogg )
+ twolame? ( media-sound/twolame )
+ x264? ( >=media-libs/x264-0.0.20111017 )
+ xvid? ( >=media-libs/xvid-1.1.0 )
+ )
+ flite? ( app-accessibility/flite )
+ fontconfig? ( media-libs/fontconfig )
+ frei0r? ( media-plugins/frei0r-plugins )
+ gnutls? ( >=net-libs/gnutls-2.12.16 )
gsm? ( >=media-sound/gsm-1.0.12-r1 )
+ iec61883? ( media-libs/libiec61883 sys-libs/libraw1394 sys-libs/libavc1394 )
+ ieee1394? ( media-libs/libdc1394 sys-libs/libraw1394 )
+ jack? ( media-sound/jack-audio-connection-kit )
jpeg2k? ( >=media-libs/openjpeg-1.3-r2 )
+ libass? ( media-libs/libass )
+ libcaca? ( media-libs/libcaca )
+ libv4l? ( media-libs/libv4l )
+ modplug? ( media-libs/libmodplug )
+ openal? ( >=media-libs/openal-1.1 )
+ opus? ( media-libs/opus )
+ pulseaudio? ( media-sound/pulseaudio )
+ rtmp? ( >=media-video/rtmpdump-2.2f )
+ sdl? ( >=media-libs/libsdl-1.2.13-r1[audio,video] )
schroedinger? ( media-libs/schroedinger )
speex? ( >=media-libs/speex-1.2_beta3 )
- X? ( x11-libs/libX11 x11-libs/libXext )
- amr? ( media-libs/opencore-amr )"
+ truetype? ( media-libs/freetype:2 )
+ vaapi? ( >=x11-libs/libva-0.32 )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? ( media-libs/libvorbis media-libs/libogg )
+ vpx? ( >=media-libs/libvpx-0.9.6 )
+ X? ( x11-libs/libX11 x11-libs/libXext x11-libs/libXfixes )
+ zlib? ( sys-libs/zlib )
+ !media-video/qt-faststart
+ !media-libs/libpostproc
+"
DEPEND="${RDEPEND}
>=sys-devel/make-3.81
- mmx? ( dev-lang/yasm )
doc? ( app-text/texi2html )
+ fontconfig? ( virtual/pkgconfig )
+ gnutls? ( virtual/pkgconfig )
+ ieee1394? ( virtual/pkgconfig )
+ libv4l? ( virtual/pkgconfig )
+ mmx? ( dev-lang/yasm )
+ rtmp? ( virtual/pkgconfig )
+ schroedinger? ( virtual/pkgconfig )
test? ( net-misc/wget )
+ truetype? ( virtual/pkgconfig )
v4l? ( sys-kernel/linux-headers )
- v4l2? ( sys-kernel/linux-headers )"
+"
+# faac is license-incompatible with ffmpeg
+REQUIRED_USE="bindist? ( encode? ( !faac !aacplus ) !openssl )
+ libv4l? ( v4l )
+ fftools_cws2fws? ( zlib )
+ test? ( encode zlib )"
-src_compile() {
- local myconf="${EXTRA_ECONF}"
+S=${WORKDIR}/${P/_/-}
- # enabled by default
- use debug || myconf="${myconf} --disable-debug"
- use zlib || myconf="${myconf} --disable-zlib"
- use sdl || myconf="${myconf} --disable-ffplay"
-
- if use network; then
- use ipv6
- else
- myconf="${myconf} --disable-network"
+src_prepare() {
+ if [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
+ export revision=git-N-${FFMPEG_REVISION}
fi
+}
- use custom-cflags && myconf="${myconf} --disable-optimizations"
+src_configure() {
+ local myconf="${EXTRA_FFMPEG_CONF}"
+ # Set to --enable-version3 if (L)GPL-3 is required
+ local version3=""
# enabled by default
+ for i in debug doc network vaapi vdpau zlib; do
+ use ${i} || myconf="${myconf} --disable-${i}"
+ done
+ use bzip2 || myconf="${myconf} --disable-bzlib"
+ use sdl || myconf="${myconf} --disable-ffplay"
+
+ use cpudetection && myconf="${myconf} --enable-runtime-cpudetect"
+ use openssl && myconf="${myconf} --enable-openssl --enable-nonfree"
+ for i in gnutls ; do
+ use $i && myconf="${myconf} --enable-$i"
+ done
+
+ # Encoders
if use encode
then
use mp3 && myconf="${myconf} --enable-libmp3lame"
- use vorbis && myconf="${myconf} --enable-libvorbis"
- use theora && myconf="${myconf} --enable-libtheora"
- use x264 && myconf="${myconf} --enable-libx264"
- use xvid && myconf="${myconf} --enable-libxvid"
+ use aac && { myconf="${myconf} --enable-libvo-aacenc" ; version3=" --enable-version3" ; }
+ use amr && { myconf="${myconf} --enable-libvo-amrwbenc" ; version3=" --enable-version3" ; }
+ for i in theora twolame x264 xvid; do
+ use ${i} && myconf="${myconf} --enable-lib${i}"
+ done
+ use aacplus && myconf="${myconf} --enable-libaacplus --enable-nonfree"
+ use faac && myconf="${myconf} --enable-libfaac --enable-nonfree"
else
myconf="${myconf} --disable-encoders"
fi
# libavdevice options
- use ieee1394 && myconf="${myconf} --enable-libdc1394"
- # Demuxers
- for i in v4l v4l2 alsa oss ; do
- use $i || myconf="${myconf} --disable-demuxer=$i"
+ for i in cdio iec61883 ; do
+ use ${i} && myconf="${myconf} --enable-lib${i}"
done
- # Muxers
- for i in alsa oss ; do
- use $i || myconf="${myconf} --disable-muxer=$i"
+ use ieee1394 && myconf="${myconf} --enable-libdc1394"
+ use libcaca && myconf="${myconf} --enable-libcaca"
+ use openal && myconf="${myconf} --enable-openal"
+ # Indevs
+ # v4l1 is gone since linux-headers-2.6.38
+ myconf="${myconf} --disable-indev=v4l"
+ use v4l || myconf="${myconf} --disable-indev=v4l2"
+ for i in alsa oss jack ; do
+ use ${i} || myconf="${myconf} --disable-indev=${i}"
done
use X && myconf="${myconf} --enable-x11grab"
+ use pulseaudio && myconf="${myconf} --enable-libpulse"
+ use libv4l && myconf="${myconf} --enable-libv4l2"
+ # Outdevs
+ for i in alsa oss sdl ; do
+ use ${i} || myconf="${myconf} --disable-outdev=${i}"
+ done
+ # libavfilter options
+ for i in frei0r fontconfig libass ; do
+ use ${i} && myconf="${myconf} --enable-${i}"
+ done
+ use truetype && myconf="${myconf} --enable-libfreetype"
+ use flite && myconf="${myconf} --enable-libflite"
# Threads; we only support pthread for now but ffmpeg supports more
use threads && myconf="${myconf} --enable-pthreads"
# Decoders
- use dirac && myconf="${myconf} --enable-libdirac"
- use schroedinger && myconf="${myconf} --enable-libschroedinger"
- use speex && myconf="${myconf} --enable-libspeex"
+ use amr && { myconf="${myconf} --enable-libopencore-amrwb --enable-libopencore-amrnb" ; version3=" --enable-version3" ; }
+ for i in bluray celt gsm modplug opus rtmp schroedinger speex vorbis vpx; do
+ use ${i} && myconf="${myconf} --enable-lib${i}"
+ done
use jpeg2k && myconf="${myconf} --enable-libopenjpeg"
- if use gsm; then
- myconf="${myconf} --enable-libgsm"
- # Crappy detection or our installation is weird, pick one (FIXME)
- append-flags -I/usr/include/gsm
- fi
- if use bindist
- then
- if use faac; then
- ewarn "FAAC is considered nonfree by ffmpeg developers and the resulting"
- ewarn "ffmpeg binary can therefore not be freely redistributed."
- ewarn "Disabling faac support."
- fi
- else
- use amr && myconf="${myconf} --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 \
- --enable-nonfree"
- use faac && myconf="${myconf} --enable-libfaac --enable-nonfree"
- fi
# CPU features
- for i in mmx ssse3 altivec ; do
- use $i || myconf="${myconf} --disable-$i"
+ for i in ${CPU_FEATURES}; do
+ use ${i%:*} || myconf="${myconf} --disable-${i#*:}"
done
- use mmxext || myconf="${myconf} --disable-mmx2"
- use 3dnow || myconf="${myconf} --disable-amd3dnow"
- use 3dnowext || myconf="${myconf} --disable-amd3dnowext"
- # disable mmx accelerated code if PIC is required
- # as the provided asm decidedly is not PIC.
- if gcc-specs-pie ; then
- myconf="${myconf} --disable-mmx --disable-mmx2"
+ if use pic ; then
+ myconf="${myconf} --enable-pic"
+ # disable asm code if PIC is required
+ # as the provided asm decidedly is not PIC for x86.
+ use x86 && myconf="${myconf} --disable-asm"
fi
# Try to get cpu type based on CFLAGS.
@@ -131,60 +216,83 @@ src_compile() {
# If they contain an unknown CPU it will not hurt since ffmpeg's configure
# will just ignore it.
for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
- myconf="${myconf} --cpu=$i"
+ [ "${i}" = "native" ] && i="host" # bug #273421
+ myconf="${myconf} --cpu=${i}"
break
done
# Mandatory configuration
- myconf="${myconf} --enable-gpl --enable-postproc \
- --enable-avfilter --enable-avfilter-lavf \
- --disable-stripping"
+ myconf="
+ --enable-gpl
+ ${version3}
+ --enable-postproc
+ --enable-avfilter
+ --disable-stripping
+ ${myconf}"
# cross compile support
- tc-is-cross-compiler && myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)"
+ if tc-is-cross-compiler ; then
+ myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
+ case ${CHOST} in
+ *freebsd*)
+ myconf="${myconf} --target-os=freebsd"
+ ;;
+ mingw32*)
+ myconf="${myconf} --target-os=mingw32"
+ ;;
+ *linux*)
+ myconf="${myconf} --target-os=linux"
+ ;;
+ esac
+ fi
+
+ # avresample support for libav compatibility
+ use avresample && myconf="${myconf} --enable-avresample"
# Misc stuff
use hardcoded-tables && myconf="${myconf} --enable-hardcoded-tables"
- # Specific workarounds for too-few-registers arch...
- if [[ $(tc-arch) == "x86" ]]; then
- filter-flags -fforce-addr -momit-leaf-frame-pointer
- append-flags -fomit-frame-pointer
- is-flag -O? || append-flags -O2
- if (use debug); then
- # no need to warn about debug if not using debug flag
- ewarn ""
- ewarn "Debug information will be almost useless as the frame pointer is omitted."
- ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
- ewarn "difficult to fix. Please have that in mind."
- ewarn ""
- fi
- fi
-
cd "${S}"
./configure \
- --prefix=/usr \
- --libdir=/usr/$(get_libdir) \
- --shlibdir=/usr/$(get_libdir) \
- --mandir=/usr/share/man \
- --enable-static --enable-shared \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --enable-shared \
--cc="$(tc-getCC)" \
- ${myconf} || die "configure failed"
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --optflags="${CFLAGS}" \
+ --extra-cflags="${CFLAGS}" \
+ --extra-cxxflags="${CXXFLAGS}" \
+ $(use_enable static-libs static) \
+ ${myconf} || die
+}
- emake version.h || die #252269
- emake || die "make failed"
+src_compile() {
+ emake
+
+ for i in ${FFTOOLS} ; do
+ if use fftools_$i ; then
+ emake tools/$i
+ fi
+ done
}
src_install() {
- emake DESTDIR="${D}" install || die "Install Failed"
+ emake DESTDIR="${D}" install install-man
dodoc Changelog README INSTALL
- dodoc doc/*
+ dodoc -r doc/*
+
+ for i in ${FFTOOLS} ; do
+ if use fftools_$i ; then
+ dobin tools/$i
+ fi
+ done
}
-# Never die for now...
src_test() {
- for t in codectest libavtest seektest ; do
- emake ${t} || ewarn "Some tests in ${t} failed"
- done
+ LD_LIBRARY_PATH="${S}/libpostproc:${S}/libswscale:${S}/libswresample:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavutil" \
+ emake fate
}