Files
haikuports/media-video/ffmpeg/ffmpeg-2.3.recipe
Oliver Tappe 52b344b97b Drop references to $haikuVersion.
* Referring the current haiku version explicitly is not needed, since
  the RequiresUpdater takes care of setting the version of Haiku used
  for building a package.
2014-12-14 23:08:52 +01:00

176 lines
4.4 KiB
Plaintext

SUMMARY="Audio and video recording, conversion, and streaming library."
DESCRIPTION="FFmpeg is a complete, cross-platform solution to record, convert \
and stream audio and video. It includes libavcodec - the leading audio/video \
codec library."
HOMEPAGE="http://www.ffmpeg.org"
LICENSE="
GNU LGPL v2.1
GNU GPL v2
"
COPYRIGHT="
2000-2003 Fabrice Bellard
2003-2014 the FFmpeg developers
"
SRC_URI="http://www.ffmpeg.org/releases/ffmpeg-2.3.tar.bz2"
CHECKSUM_SHA256="6b3dbb64e20951480bfd64bcbe305f6ee9031e5fccfd3b3e94cc5055525f809e"
REVISION="1"
ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
else
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
PATCHES="ffmpeg-2.3.patch"
PROVIDES="
ffmpeg$secondaryArchSuffix = $portVersion compat >= 2.3
cmd:ffmpeg = $portVersion compat >= 2.3
cmd:ffprobe = $portVersion compat >= 2.3
cmd:ffserver = $portVersion compat >= 2.3
lib:libavutil$secondaryArchSuffix = 52.92.100 compat >= 52
lib:libavcodec$secondaryArchSuffix = 55.69.100 compat >= 55
lib:libavformat$secondaryArchSuffix = 55.47.100 compat >= 55
lib:libavdevice$secondaryArchSuffix = 55.13.100 compat >= 55
lib:libavfilter$secondaryArchSuffix = 4.10.100 compat >= 4
lib:libavresample$secondaryArchSuffix = 1.3.0 compat >= 1
lib:libswscale$secondaryArchSuffix = 2.6.100 compat >= 2
lib:libswresample$secondaryArchSuffix = 0.19.100 compat >= 0
lib:libpostproc$secondaryArchSuffix = 52.3.100 compat >= 52
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libspeex$secondaryArchSuffix
lib:libtheoradec$secondaryArchSuffix
lib:libtheoraenc$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
lib:libvorbisenc$secondaryArchSuffix
lib:libvpx$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libbz2$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
devel:libspeex$secondaryArchSuffix
devel:libtheora$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
devel:libvpx$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:awk
cmd:make
cmd:perl
cmd:pkg_config$secondaryArchSuffix
cmd:texi2html
cmd:yasm
"
GLOBAL_WRITABLE_FILES="
settings/ffserver.conf
"
PROVIDES_devel="
ffmpeg${secondaryArchSuffix}_devel = $portVersion compat >= 2.3
devel:libavutil$secondaryArchSuffix = 52.92.100 compat >= 52
devel:libavcodec$secondaryArchSuffix = 55.69.100 compat >= 55
devel:libavformat$secondaryArchSuffix = 55.47.100 compat >= 55
devel:libavdevice$secondaryArchSuffix = 55.13.100 compat >= 55
devel:libavresample$secondaryArchSuffix = 1.3.0 compat >= 1
devel:libavfilter$secondaryArchSuffix = 4.10.100 compat >= 4
devel:libswscale$secondaryArchSuffix = 2.6.100 compat >= 2
devel:libswresample$secondaryArchSuffix = 0.19.100 compat >= 0
devel:libpostproc$secondaryArchSuffix = 52.3.100 compat >= 52
"
REQUIRES_devel="
ffmpeg$secondaryArchSuffix == $portVersion base
"
PATCH()
{
# patch hard-coded config file path
sed -i "s,/etc/ffserver.conf,$sysconfDir/ffserver.conf," \
ffserver.c \
doc/ffserver.texi
# patch hard-coded paths to perl
sed -i "s,/usr/bin/perl,$portPackageLinksDir/cmd~perl/bin/perl," \
doc/Doxyfile \
doc/texi2pod.pl
}
BUILD()
{
# not an autotools configure
./configure \
--prefix=$prefix \
--bindir=$prefix/bin \
--datadir=$dataDir/$portName \
--incdir=$includeDir \
--libdir=$libDir \
--shlibdir=$libDir \
--mandir=$manDir \
--disable-debug \
--enable-shared \
--enable-libvorbis \
--enable-libspeex \
--enable-libtheora \
--enable-libvpx \
--enable-gpl \
--enable-avresample
if [ $targetArchitecture = x86_64 ]; then
cflags="-fPIC -std=c99"
else
cflags="-fno-PIC -std=c99"
fi
make $jobArgs CFLAGS="$cflags"
}
INSTALL()
{
make install
prepareInstalledDevelLibs \
libavcodec \
libavdevice \
libavfilter \
libavformat \
libavresample \
libavutil \
libswresample \
libswscale \
libpostproc
fixPkgconfig
# include the documented ffserver.conf
mkdir -p $docDir
cp doc/ffserver.conf $docDir
# Move html docs to the right place.
mv $prefix/share/doc/ffmpeg $docDir
rm -r $prefix/share
# devel package
packageEntries devel \
$developDir
}
TEST()
{
make check
}