ffmpeg: Remove a lot of old versions.

This commit is contained in:
Augustin Cavalier
2019-09-02 11:43:25 -04:00
parent 43c6283463
commit 4f214fa0c1
3 changed files with 0 additions and 804 deletions

View File

@@ -1,303 +0,0 @@
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-2018 the FFmpeg developers"
LICENSE="GNU LGPL v3
GNU GPL v3"
REVISION="2"
SOURCE_URI="https://ffmpeg.org/releases/ffmpeg-$portVersion.tar.xz"
CHECKSUM_SHA256="605f5c01c60db35d3b617a79cabb2c7032412be243554602eeed1b628125c0ee"
PATCHES="ffmpeg-$portVersion.patchset"
ADDITIONAL_FILES="gcc_runtime.c"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
ffmpegLibs="\
libavcodec \
libavdevice \
libavfilter \
libavformat \
libavresample \
libavutil \
libpostproc \
libswresample \
libswscale \
"
# Do not sort alphabetically
libavutilVersion="56.14.100"
libavcodecVersion="58.18.100"
libavformatVersion="58.12.100"
libavdeviceVersion="58.3.100"
libavfilterVersion="7.16.100"
libavresampleVersion="4.0.0"
libswscaleVersion="5.1.100"
libswresampleVersion="3.1.100"
libpostprocVersion="55.1.100"
portVersionCompat="$portVersion compat >= 4"
for i in $ffmpegLibs; do
eval "${i}VersionCompat=\"\$${i}Version compat >= \${${i}Version%%.*}\""
done
PROVIDES="
ffmpeg$secondaryArchSuffix = $portVersionCompat
lib:libavcodec$secondaryArchSuffix = $libavcodecVersionCompat
lib:libavfilter$secondaryArchSuffix = $libavfilterVersionCompat
lib:libavformat$secondaryArchSuffix = $libavformatVersionCompat
lib:libavresample$secondaryArchSuffix = $libavresampleVersionCompat
lib:libavutil$secondaryArchSuffix = $libavutilVersionCompat
lib:libpostproc$secondaryArchSuffix = $libpostprocVersionCompat
lib:libswresample$secondaryArchSuffix = $libswresampleVersionCompat
lib:libswscale$secondaryArchSuffix = $libswscaleVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libmodplug$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libspeex$secondaryArchSuffix
lib:libtheoradec$secondaryArchSuffix
lib:libtheoraenc$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
lib:libvorbisenc$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
REQUIRES+="
lib:libvpx$secondaryArchSuffix
lib:libgnutls$secondaryArchSuffix
"
fi
CONFLICTS="
ffmpeg_legacy$secondaryArchSuffix
ffmpeg${secondaryArchSuffix}_bin
ffmpeg2${secondaryArchSuffix}_bin
"
PROVIDES_avdevice="
ffmpeg${secondaryArchSuffix}_avdevice = $portVersionCompat
lib:libavdevice$secondaryArchSuffix = $libavdeviceVersionCompat
"
REQUIRES_avdevice="
haiku$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix == $libavcodecVersion
lib:libavfilter$secondaryArchSuffix == $libavfilterVersion
lib:libavformat$secondaryArchSuffix == $libavformatVersion
lib:libavutil$secondaryArchSuffix == $libavutilVersion
lib:libSDL2_2.0$secondaryArchSuffix
"
PROVIDES_tools="
ffmpeg${secondaryArchSuffix}_tools = $portVersion
cmd:ffmpeg = $portVersionCompat
cmd:ffplay = $portVersionCompat
cmd:ffprobe = $portVersionCompat
"
REQUIRES_tools="
haiku$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix == $libavcodecVersion
lib:libavdevice$secondaryArchSuffix == $libavdeviceVersion
lib:libavfilter$secondaryArchSuffix == $libavfilterVersion
lib:libavformat$secondaryArchSuffix == $libavformatVersion
lib:libavutil$secondaryArchSuffix == $libavutilVersion
lib:libSDL2_2.0$secondaryArchSuffix
"
PROVIDES_devel="
ffmpeg${secondaryArchSuffix}_devel = $portVersionCompat
devel:libavcodec$secondaryArchSuffix = $libavcodecVersionCompat
devel:libavdevice$secondaryArchSuffix = $libavdeviceVersionCompat
devel:libavfilter$secondaryArchSuffix = $libavfilterVersionCompat
devel:libavformat$secondaryArchSuffix = $libavformatVersionCompat
devel:libavresample$secondaryArchSuffix = $libavresampleVersionCompat
devel:libavutil$secondaryArchSuffix = $libavutilVersionCompat
devel:libpostproc$secondaryArchSuffix = $libpostprocVersionCompat
devel:libswresample$secondaryArchSuffix = $libswresampleVersionCompat
devel:libswscale$secondaryArchSuffix = $libswscaleVersionCompat
"
REQUIRES_devel="
ffmpeg$secondaryArchSuffix == $portVersion base
devel:libspeex$secondaryArchSuffix
"
CONFLICTS_devel="
ffmpeg_legacy${secondaryArchSuffix}_devel
ffmpeg${secondaryArchSuffix}_devel
ffmpeg2${secondaryArchSuffix}_devel
"
# -- HACK! --
# ffmpeg ~0.10 has perpetually had & caused problems when compiled with GCC 2.
# (Later versions do not compile with GCC 2 at all.) So instead, we now compile
# FFmpeg for x86_gcc2 with a modern GCC.
#
# This works because GCC's C ABI has not changed between 2 and 7; only the C++
# ABI has, and no BeOS applications expect a system FFmpeg at all, so we can
# break its ABI all we like.
if [ "$effectiveTargetArchitecture" = x86_gcc2 ] && \
[ "$targetArchitecture" = x86_gcc2 ]; then
gccSuffix="_x86"
elif [ "$effectiveTargetArchitecture" = x86_gcc2 ] && \
[ "$targetArchitecture" = x86 ]; then
gccSuffix=""
else
gccSuffix="$secondaryArchSuffix"
fi
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libbz2$secondaryArchSuffix
devel:libmodplug$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
devel:libsdl2$secondaryArchSuffix
devel:libspeex$secondaryArchSuffix
devel:libtheora$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
BUILD_REQUIRES+="
devel:libvpx$secondaryArchSuffix
devel:libgnutls$secondaryArchSuffix
"
fi
BUILD_PREREQUIRES="
cmd:awk
cmd:cmp
cmd:gcc$gccSuffix >= 7
cmd:g++$secondaryArchSuffix
cmd:ld$gccSuffix
cmd:grep
cmd:make
cmd:perl
cmd:pkg_config$secondaryArchSuffix
cmd:sed
cmd:texi2html
cmd:yasm
"
PATCH()
{
# patch hard-coded paths to perl
sed -i "s,/usr/bin/perl,$portPackageLinksDir/cmd~perl/bin/perl," \
doc/Doxyfile \
doc/texi2pod.pl
# force no-undefined-symbols
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
sed -i "s/SHFLAGS='-shared/SHFLAGS='-shared -Wl,--no-undefined/g" \
configure
fi
}
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 \
"$(getPackagePrefix avdevice)/$relativeLibDir"/libavdevice.so.$libavdeviceVersion \
"$(getPackagePrefix tools)/$relativeBinDir"/ffmpeg \
"$(getPackagePrefix tools)/$relativeBinDir"/ffplay \
"$(getPackagePrefix tools)/$relativeBinDir"/ffprobe
BUILD()
{
ccArgs=""
extraArgs=""
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
cc="gcc${gccSuffix/_/-}"
ccArgs="--cc=$cc --cxx=g++${secondaryArchSuffix/_/-}
--ld=gcc${secondaryArchSuffix/_/-}
--host-ld=gcc${secondaryArchSuffix/_/-}"
# Hack up base headers to make them think we're on GCC2 ABI
mkdir -p include_hacks include_hacks/os include_hacks/config
pushd include_hacks
rm -f os/BeBuild.h config/HaikuConfig.h
cp /system/develop/headers/os/BeBuild.h os
cp /system/develop/headers/config/HaikuConfig.h config
sed -i 's/__GNUC__ == 2/1/g' os/BeBuild.h config/HaikuConfig.h
popd
# Compile gcc_runtime.c (subset of libgcc that GCC 7 utilizes here)
$cc -fvisibility=hidden -c $portDir/additional-files/gcc_runtime.c \
-o gcc_runtime.o
baseLDFLAGS="-B/system/bin/${gccSuffix/_/}"
ccArgs="$ccArgs --host-ldflags=\"${baseLDFLAGS}\""
export CFLAGS="-isystem$(pwd) -isystem$(pwd)/os -isystem$(pwd)/config"
export LDFLAGS="$baseLDFLAGS $(pwd)/gcc_runtime.o"
else
extraArgs="--enable-libvpx --enable-gnutls"
fi
# not an autotools configure
./configure \
$ccArgs \
--prefix=$prefix \
--bindir=$binDir \
--datadir=$dataDir/$portName \
--incdir=$includeDir \
--libdir=$libDir \
--shlibdir=$libDir \
--mandir=$manDir \
--disable-debug \
--disable-stripping \
--enable-gpl \
--enable-version3 \
--enable-shared \
--disable-static \
--enable-libmodplug \
--enable-libvorbis \
--enable-libspeex \
--enable-libtheora \
--enable-avresample \
$extraArgs
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
# Move html docs to the right place.
mkdir -p $docDir
mv $prefix/share/doc/ffmpeg $docDir
rm -r $prefix/share
# Split out libs and executables which need libSDL
packageEntries tools $binDir
packageEntries avdevice $libDir/libavdevice*
# devel package
packageEntries devel \
$dataDir/ffmpeg$secondaryArchSuffix/examples \
$manDir/man3 \
$docDir \
$developDir
}
TEST()
{
make check
}

View File

@@ -1,304 +0,0 @@
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-2018 the FFmpeg developers"
LICENSE="GNU LGPL v3
GNU GPL v3"
REVISION="1"
SOURCE_URI="https://ffmpeg.org/releases/ffmpeg-$portVersion.tar.xz"
CHECKSUM_SHA256="a95c0cc9eb990e94031d2183f2e6e444cc61c99f6f182d1575c433d62afb2f97"
PATCHES="ffmpeg-$portVersion.patchset"
ADDITIONAL_FILES="gcc_runtime.c"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
ffmpegLibs="\
libavcodec \
libavdevice \
libavfilter \
libavformat \
libavresample \
libavutil \
libpostproc \
libswresample \
libswscale \
"
# Do not sort alphabetically
libavutilVersion="56.14.100"
libavcodecVersion="58.18.100"
libavformatVersion="58.12.100"
libavdeviceVersion="58.3.100"
libavfilterVersion="7.16.100"
libavresampleVersion="4.0.0"
libswscaleVersion="5.1.100"
libswresampleVersion="3.1.100"
libpostprocVersion="55.1.100"
portVersionCompat="$portVersion compat >= 4"
for i in $ffmpegLibs; do
eval "${i}VersionCompat=\"\$${i}Version compat >= \${${i}Version%%.*}\""
done
PROVIDES="
ffmpeg$secondaryArchSuffix = $portVersionCompat
lib:libavcodec$secondaryArchSuffix = $libavcodecVersionCompat
lib:libavfilter$secondaryArchSuffix = $libavfilterVersionCompat
lib:libavformat$secondaryArchSuffix = $libavformatVersionCompat
lib:libavresample$secondaryArchSuffix = $libavresampleVersionCompat
lib:libavutil$secondaryArchSuffix = $libavutilVersionCompat
lib:libpostproc$secondaryArchSuffix = $libpostprocVersionCompat
lib:libswresample$secondaryArchSuffix = $libswresampleVersionCompat
lib:libswscale$secondaryArchSuffix = $libswscaleVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libmodplug$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libspeex$secondaryArchSuffix
lib:libtheoradec$secondaryArchSuffix
lib:libtheoraenc$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
lib:libvorbisenc$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
REQUIRES+="
lib:libvpx$secondaryArchSuffix
lib:libgnutls$secondaryArchSuffix
"
fi
CONFLICTS="
ffmpeg_legacy$secondaryArchSuffix
ffmpeg${secondaryArchSuffix}_bin
ffmpeg2${secondaryArchSuffix}_bin
"
PROVIDES_avdevice="
ffmpeg${secondaryArchSuffix}_avdevice = $portVersionCompat
lib:libavdevice$secondaryArchSuffix = $libavdeviceVersionCompat
"
REQUIRES_avdevice="
haiku$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix == $libavcodecVersion
lib:libavfilter$secondaryArchSuffix == $libavfilterVersion
lib:libavformat$secondaryArchSuffix == $libavformatVersion
lib:libavutil$secondaryArchSuffix == $libavutilVersion
lib:libSDL2_2.0$secondaryArchSuffix
"
PROVIDES_tools="
ffmpeg${secondaryArchSuffix}_tools = $portVersion
cmd:ffmpeg = $portVersionCompat
cmd:ffplay = $portVersionCompat
cmd:ffprobe = $portVersionCompat
"
REQUIRES_tools="
haiku$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix == $libavcodecVersion
lib:libavdevice$secondaryArchSuffix == $libavdeviceVersion
lib:libavfilter$secondaryArchSuffix == $libavfilterVersion
lib:libavformat$secondaryArchSuffix == $libavformatVersion
lib:libavutil$secondaryArchSuffix == $libavutilVersion
lib:libSDL2_2.0$secondaryArchSuffix
"
PROVIDES_devel="
ffmpeg${secondaryArchSuffix}_devel = $portVersionCompat
devel:libavcodec$secondaryArchSuffix = $libavcodecVersionCompat
devel:libavdevice$secondaryArchSuffix = $libavdeviceVersionCompat
devel:libavfilter$secondaryArchSuffix = $libavfilterVersionCompat
devel:libavformat$secondaryArchSuffix = $libavformatVersionCompat
devel:libavresample$secondaryArchSuffix = $libavresampleVersionCompat
devel:libavutil$secondaryArchSuffix = $libavutilVersionCompat
devel:libpostproc$secondaryArchSuffix = $libpostprocVersionCompat
devel:libswresample$secondaryArchSuffix = $libswresampleVersionCompat
devel:libswscale$secondaryArchSuffix = $libswscaleVersionCompat
"
REQUIRES_devel="
ffmpeg$secondaryArchSuffix == $portVersion base
ffmpeg${secondaryArchSuffix}_avdevice == $portVersion
devel:libspeex$secondaryArchSuffix
"
CONFLICTS_devel="
ffmpeg_legacy${secondaryArchSuffix}_devel
ffmpeg${secondaryArchSuffix}_devel
ffmpeg2${secondaryArchSuffix}_devel
"
# -- HACK! --
# ffmpeg ~0.10 has perpetually had & caused problems when compiled with GCC 2.
# (Later versions do not compile with GCC 2 at all.) So instead, we now compile
# FFmpeg for x86_gcc2 with a modern GCC.
#
# This works because GCC's C ABI has not changed between 2 and 7; only the C++
# ABI has, and no BeOS applications expect a system FFmpeg at all, so we can
# break its ABI all we like.
if [ "$effectiveTargetArchitecture" = x86_gcc2 ] && \
[ "$targetArchitecture" = x86_gcc2 ]; then
gccSuffix="_x86"
elif [ "$effectiveTargetArchitecture" = x86_gcc2 ] && \
[ "$targetArchitecture" = x86 ]; then
gccSuffix=""
else
gccSuffix="$secondaryArchSuffix"
fi
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libbz2$secondaryArchSuffix
devel:libmodplug$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
devel:libsdl2$secondaryArchSuffix
devel:libspeex$secondaryArchSuffix
devel:libtheora$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
BUILD_REQUIRES+="
devel:libvpx$secondaryArchSuffix
devel:libgnutls$secondaryArchSuffix
"
fi
BUILD_PREREQUIRES="
cmd:awk
cmd:cmp
cmd:gcc$gccSuffix >= 7
cmd:g++$secondaryArchSuffix
cmd:ld$gccSuffix
cmd:grep
cmd:make
cmd:perl
cmd:pkg_config$secondaryArchSuffix
cmd:sed
cmd:texi2html
cmd:yasm
"
PATCH()
{
# patch hard-coded paths to perl
sed -i "s,/usr/bin/perl,$portPackageLinksDir/cmd~perl/bin/perl," \
doc/Doxyfile \
doc/texi2pod.pl
# force no-undefined-symbols
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
sed -i "s/SHFLAGS='-shared/SHFLAGS='-shared -Wl,--no-undefined/g" \
configure
fi
}
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 \
"$(getPackagePrefix avdevice)/$relativeLibDir"/libavdevice.so.$libavdeviceVersion \
"$(getPackagePrefix tools)/$relativeBinDir"/ffmpeg \
"$(getPackagePrefix tools)/$relativeBinDir"/ffplay \
"$(getPackagePrefix tools)/$relativeBinDir"/ffprobe
BUILD()
{
ccArgs=""
extraArgs=""
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
cc="gcc${gccSuffix/_/-}"
ccArgs="--cc=$cc --cxx=g++${secondaryArchSuffix/_/-}
--ld=gcc${secondaryArchSuffix/_/-}
--host-ld=gcc${secondaryArchSuffix/_/-}"
# Hack up base headers to make them think we're on GCC2 ABI
mkdir -p include_hacks include_hacks/os include_hacks/config
pushd include_hacks
rm -f os/BeBuild.h config/HaikuConfig.h
cp /system/develop/headers/os/BeBuild.h os
cp /system/develop/headers/config/HaikuConfig.h config
sed -i 's/__GNUC__ == 2/1/g' os/BeBuild.h config/HaikuConfig.h
popd
# Compile gcc_runtime.c (subset of libgcc that GCC 7 utilizes here)
$cc -fvisibility=hidden -c $portDir/additional-files/gcc_runtime.c \
-o gcc_runtime.o
baseLDFLAGS="-B/system/bin/${gccSuffix/_/}"
ccArgs="$ccArgs --host-ldflags=\"${baseLDFLAGS}\""
export CFLAGS="-isystem$(pwd) -isystem$(pwd)/os -isystem$(pwd)/config"
export LDFLAGS="$baseLDFLAGS $(pwd)/gcc_runtime.o"
else
extraArgs="--enable-libvpx --enable-gnutls"
fi
# not an autotools configure
./configure \
$ccArgs \
--prefix=$prefix \
--bindir=$binDir \
--datadir=$dataDir/$portName \
--incdir=$includeDir \
--libdir=$libDir \
--shlibdir=$libDir \
--mandir=$manDir \
--disable-debug \
--disable-stripping \
--enable-gpl \
--enable-version3 \
--enable-shared \
--disable-static \
--enable-libmodplug \
--enable-libvorbis \
--enable-libspeex \
--enable-libtheora \
--enable-avresample \
$extraArgs
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
# Move html docs to the right place.
mkdir -p $docDir
mv $prefix/share/doc/ffmpeg $docDir
rm -r $prefix/share
# Split out libs and executables which need libSDL
packageEntries tools $binDir
packageEntries avdevice $libDir/libavdevice*
# devel package
packageEntries devel \
$dataDir/ffmpeg$secondaryArchSuffix/examples \
$manDir/man3 \
$docDir \
$developDir
}
TEST()
{
make check
}

View File

@@ -1,197 +0,0 @@
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-2016 the FFmpeg developers"
LICENSE="GNU LGPL v2.1
GNU GPL v2"
REVISION="2"
SOURCE_URI="https://ffmpeg.org/releases/ffmpeg-$portVersion.tar.xz"
CHECKSUM_SHA256="38aa3aec93c480b34d33f3648aff9278581d151488b521995c084258613e1fe6"
SOURCE_DIR="ffmpeg-$portVersion"
PATCHES="ffmpeg-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 ?x86"
GLOBAL_WRITABLE_FILES="
settings/ffserver.conf
"
PROVIDES="
ffmpeg2$secondaryArchSuffix = $portVersion compat >= 2.8
lib:libavcodec$secondaryArchSuffix = 56.60.100 compat >= 56
lib:libavdevice$secondaryArchSuffix = 56.4.100 compat >= 56
lib:libavfilter$secondaryArchSuffix = 5.40.101 compat >= 5
lib:libavformat$secondaryArchSuffix = 56.40.101 compat >= 56
lib:libavresample$secondaryArchSuffix = 2.1.0 compat >= 2
lib:libavutil$secondaryArchSuffix = 54.31.100 compat >= 54
lib:libpostproc$secondaryArchSuffix = 53.3.100 compat >= 53
lib:libswresample$secondaryArchSuffix = 1.2.101 compat >= 1
lib:libswscale$secondaryArchSuffix = 3.1.101 compat >= 3
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libmodplug$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
"
PROVIDES_devel="
ffmpeg2${secondaryArchSuffix}_devel = $portVersion compat >= 2.4
devel:libavcodec$secondaryArchSuffix = 56.60.100 compat >= 56
devel:libavdevice$secondaryArchSuffix = 56.4.100 compat >= 56
devel:libavfilter$secondaryArchSuffix = 5.40.101 compat >= 5
devel:libavformat$secondaryArchSuffix = 56.40.101 compat >= 56
devel:libavresample$secondaryArchSuffix = 2.1.0 compat >= 2
devel:libavutil$secondaryArchSuffix = 54.31.100 compat >= 54
devel:libpostproc$secondaryArchSuffix = 53.3.100 compat >= 53
devel:libswresample$secondaryArchSuffix = 1.2.101 compat >= 1
devel:libswscale$secondaryArchSuffix = 3.1.101 compat >= 3
"
REQUIRES_devel="
ffmpeg2$secondaryArchSuffix == $portVersion base
devel:libspeex$secondaryArchSuffix
"
CONFLICTS_devel="
ffmpeg${secondaryArchSuffix}_devel
ffmpeg_legacy${secondaryArchSuffix}_devel
"
SUMMARY_bin="Command line tools for ffmpeg-2.8.x"
PROVIDES_bin="
ffmpeg2${secondaryArchSuffix}_bin = $portVersion compat >= 2.8
cmd:ffmpeg = $portVersion compat >= 2.8
cmd:ffprobe = $portVersion compat >= 2.8
cmd:ffserver = $portVersion compat >= 2.8
"
REQUIRES_bin="
ffmpeg2$secondaryArchSuffix == $portVersion base
haiku$secondaryArchSuffix
"
CONFLICTS_bin="
ffmpeg$secondaryArchSuffix
ffmpeg_legacy$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libbz2$secondaryArchSuffix
devel:libmodplug$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:awk
cmd:cmp
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:perl
cmd:pkg_config$secondaryArchSuffix
cmd:sed
cmd:texi2html
cmd:yasm
"
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-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
rm -rf $prefix/share $dataDir
# bin package
packageEntries bin \
$prefix/bin \
$manDir/man1
# devel package
packageEntries devel \
$developDir \
$manDir
}
TEST()
{
make check
}