mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
ffmpeg: bump to 3.3.6, add debuginfo, use custom variables. (#2252)
This commit is contained in:
219
media-video/ffmpeg/ffmpeg-3.3.6.recipe
Normal file
219
media-video/ffmpeg/ffmpeg-3.3.6.recipe
Normal file
@@ -0,0 +1,219 @@
|
||||
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="https://ffmpeg.org/"
|
||||
COPYRIGHT="2000-2003 Fabrice Bellard
|
||||
2003-2017 the FFmpeg developers"
|
||||
LICENSE="GNU LGPL v2.1
|
||||
GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://ffmpeg.org/releases/ffmpeg-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="d2fb2223532ab15f1b51765a8665c396feebf81f7e77775e2f4c323c8d1b8906"
|
||||
PATCHES="ffmpeg-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
ffmpegLibs="\
|
||||
libavcodec \
|
||||
libavdevice \
|
||||
libavfilter \
|
||||
libavformat \
|
||||
libavresample \
|
||||
libavutil \
|
||||
libpostproc \
|
||||
libswresample \
|
||||
libswscale \
|
||||
"
|
||||
# Do not sort alphabetically
|
||||
libavutilVersion="55.58.100"
|
||||
libavcodecVersion="57.89.100"
|
||||
libavformatVersion="57.71.100"
|
||||
libavdeviceVersion="57.6.100"
|
||||
libavfilterVersion="6.82.100"
|
||||
libavresampleVersion="3.5.0"
|
||||
libswscaleVersion="4.6.100"
|
||||
libswresampleVersion="2.7.100"
|
||||
libpostprocVersion="54.5.100"
|
||||
portVersionCompat="$portVersion compat >= 3.2"
|
||||
for i in $ffmpegLibs; do
|
||||
eval "${i}VersionCompat=\"\$${i}Version compat >= \${${i}Version%%.*}\""
|
||||
done
|
||||
|
||||
PROVIDES="
|
||||
ffmpeg$secondaryArchSuffix = $portVersionCompat
|
||||
cmd:ffmpeg = $portVersionCompat
|
||||
cmd:ffprobe = $portVersionCompat
|
||||
cmd:ffserver = $portVersionCompat
|
||||
lib:libavutil$secondaryArchSuffix = $libavutilVersionCompat
|
||||
lib:libavcodec$secondaryArchSuffix = $libavcodecVersionCompat
|
||||
lib:libavformat$secondaryArchSuffix = $libavformatVersionCompat
|
||||
lib:libavdevice$secondaryArchSuffix = $libavdeviceVersionCompat
|
||||
lib:libavfilter$secondaryArchSuffix = $libavfilterVersionCompat
|
||||
lib:libavresample$secondaryArchSuffix = $libavresampleVersionCompat
|
||||
lib:libswscale$secondaryArchSuffix = $libswscaleVersionCompat
|
||||
lib:libswresample$secondaryArchSuffix = $libswresampleVersionCompat
|
||||
lib:libpostproc$secondaryArchSuffix = $libpostprocVersionCompat
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libogg$secondaryArchSuffix
|
||||
lib:libopus$secondaryArchSuffix
|
||||
lib:libspeex$secondaryArchSuffix
|
||||
lib:libmodplug$secondaryArchSuffix
|
||||
lib:libtheoradec$secondaryArchSuffix
|
||||
lib:libtheoraenc$secondaryArchSuffix
|
||||
lib:libvorbis$secondaryArchSuffix
|
||||
lib:libvorbisenc$secondaryArchSuffix
|
||||
lib:libvpx$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
CONFLICTS="
|
||||
ffmpeg_legacy$secondaryArchSuffix
|
||||
ffmpeg2${secondaryArchSuffix}_bin
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
ffmpeg${secondaryArchSuffix}_devel = $portVersionCompat
|
||||
devel:libavutil$secondaryArchSuffix = $libavutilVersionCompat
|
||||
devel:libavcodec$secondaryArchSuffix = $libavcodecVersionCompat
|
||||
devel:libavformat$secondaryArchSuffix = $libavformatVersionCompat
|
||||
devel:libavdevice$secondaryArchSuffix = $libavdeviceVersionCompat
|
||||
devel:libavfilter$secondaryArchSuffix = $libavfilterVersionCompat
|
||||
devel:libavresample$secondaryArchSuffix = $libavresampleVersionCompat
|
||||
devel:libswscale$secondaryArchSuffix = $libswscaleVersionCompat
|
||||
devel:libswresample$secondaryArchSuffix = $libswresampleVersionCompat
|
||||
devel:libpostproc$secondaryArchSuffix = $libpostprocVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
ffmpeg$secondaryArchSuffix == $portVersion base
|
||||
devel:libspeex$secondaryArchSuffix
|
||||
"
|
||||
CONFLICTS_devel="
|
||||
ffmpeg_legacy${secondaryArchSuffix}_devel
|
||||
ffmpeg2${secondaryArchSuffix}_devel
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libmodplug$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
devel:libopus$secondaryArchSuffix
|
||||
devel:libspeex$secondaryArchSuffix
|
||||
devel:libtheora$secondaryArchSuffix
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
devel:libvpx$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix >= 5
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:awk
|
||||
cmd:cmp
|
||||
cmd:grep
|
||||
cmd:make
|
||||
cmd:perl
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:sed
|
||||
cmd:texi2html
|
||||
cmd:yasm
|
||||
"
|
||||
|
||||
GLOBAL_WRITABLE_FILES="
|
||||
settings/ffserver.conf
|
||||
"
|
||||
|
||||
defineDebugInfoPackage ffmpeg$secondaryArchSuffix \
|
||||
$libDir/libavcodec.so.$libavcodecVersion \
|
||||
$libDir/libavfilter.so.$libavfilterVersion \
|
||||
$libDir/libavformat.so.$libavformatVersion \
|
||||
$libDir/libavresample.so.$libavresampleVersion \
|
||||
$libDir/libavutil.so.$libavutilVersion \
|
||||
$libDir/libpostproc.so.$libpostprocVersion \
|
||||
$libDir/libswresample.so.$libswresampleVersion \
|
||||
$libDir/libswscale.so.$libswscaleVersion \
|
||||
$prefix/bin/ffmpeg \
|
||||
$prefix/bin/ffprobe \
|
||||
$prefix/bin/ffserver
|
||||
|
||||
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-libmodplug \
|
||||
--enable-libopus \
|
||||
--enable-libspeex \
|
||||
--enable-libtheora \
|
||||
--enable-libvorbis \
|
||||
--enable-libvpx \
|
||||
--enable-gpl \
|
||||
--enable-avresample \
|
||||
--disable-stripping
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
prepareInstalledDevelLibs $ffmpegLibs
|
||||
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 \
|
||||
$dataDir/ffmpeg$secondaryArchSuffix/examples \
|
||||
$manDir/man3 \
|
||||
$docDir \
|
||||
$developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
Reference in New Issue
Block a user