mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 05:28:53 +02:00
190 lines
5.1 KiB
Plaintext
190 lines
5.1 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-$portVersion.tar.bz2"
|
|
CHECKSUM_SHA256="974f90a9d7bde835213ab970c2190402e5d6566e47a7bb657d756ee92540fa7e"
|
|
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.4
|
|
cmd:ffmpeg = $portVersion compat >= 2.4
|
|
cmd:ffprobe = $portVersion compat >= 2.4
|
|
cmd:ffserver = $portVersion compat >= 2.4
|
|
lib:libavutil$secondaryArchSuffix = 54.7.100 compat >= 54
|
|
lib:libavcodec$secondaryArchSuffix = 56.1.100 compat >= 56
|
|
lib:libavformat$secondaryArchSuffix = 56.4.101 compat >= 56
|
|
lib:libavdevice$secondaryArchSuffix = 56.0.100 compat >= 56
|
|
lib:libavfilter$secondaryArchSuffix = 5.1.100 compat >= 5
|
|
lib:libavresample$secondaryArchSuffix = 2.1.0 compat >= 2
|
|
lib:libswscale$secondaryArchSuffix = 3.0.100 compat >= 3
|
|
lib:libswresample$secondaryArchSuffix = 1.1.100 compat >= 1
|
|
lib:libpostproc$secondaryArchSuffix = 53.0.100 compat >= 53
|
|
"
|
|
|
|
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:grep
|
|
cmd:make
|
|
cmd:perl
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:sed
|
|
cmd:texi2html
|
|
cmd:yasm
|
|
"
|
|
|
|
GLOBAL_WRITABLE_FILES="
|
|
settings/ffserver.conf
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
ffmpeg${secondaryArchSuffix}_devel = $portVersion compat >= 2.4
|
|
devel:libavutil$secondaryArchSuffix = 54.7.100 compat >= 54
|
|
devel:libavcodec$secondaryArchSuffix = 56.1.100 compat >= 56
|
|
devel:libavformat$secondaryArchSuffix = 56.4.101 compat >= 56
|
|
devel:libavdevice$secondaryArchSuffix = 56.0.100 compat >= 56
|
|
devel:libavfilter$secondaryArchSuffix = 5.1.100 compat >= 5
|
|
devel:libavresample$secondaryArchSuffix = 2.1.0 compat >= 2
|
|
devel:libswscale$secondaryArchSuffix = 3.0.100 compat >= 3
|
|
devel:libswresample$secondaryArchSuffix = 1.1.100 compat >= 1
|
|
devel:libpostproc$secondaryArchSuffix = 53.0.100 compat >= 53
|
|
"
|
|
|
|
REQUIRES_devel="
|
|
ffmpeg$secondaryArchSuffix == $portVersion base
|
|
devel:libspeex$secondaryArchSuffix
|
|
"
|
|
|
|
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
|
|
|
|
# The pkgconfig file reference other libraries using the wrong paths, which
|
|
# creates a lot of confusion. Fix them so correct paths are used.
|
|
local develPackageName="${portName}_devel-$portFullVersion"
|
|
local packageLinksDir=$(dirname $portPackageLinksDir)
|
|
local linksDir="$packageLinksDir/${develPackageName}/devel~libspeex$secondaryArchSuffix/$relativeDevelopLibDir"
|
|
sed -i -e "s,^\(Libs.private.*\)-L.*speex.* \(-lspeex.*\),\1-L$linksDir \2," \
|
|
$developLibDir/pkgconfig/libavcodec.pc \
|
|
$developLibDir/pkgconfig/libavdevice.pc \
|
|
$developLibDir/pkgconfig/libavfilter.pc \
|
|
$developLibDir/pkgconfig/libavformat.pc
|
|
|
|
# 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
|
|
}
|