ffmpeg: bump revision for newer libvpx (#5080)

* ffmpeg: remove legacy recipes
This commit is contained in:
kenmays
2020-06-06 03:45:26 -07:00
committed by GitHub
parent 5a75b222bf
commit 06683a173a
7 changed files with 1 additions and 1414 deletions

View File

@@ -1,146 +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="http://www.ffmpeg.org"
COPYRIGHT="2000-2003 Fabrice Bellard
2003-2015 the FFmpeg developers"
LICENSE="GNU LGPL v2.1
GNU GPL v2"
REVISION="1"
SOURCE_URI="http://www.ffmpeg.org/releases/ffmpeg-$portVersion.tar.bz2"
CHECKSUM_SHA256="e77823cbd58dfdb61f88059476070bc432d80e3821c14abcf804ef709d2f3fd1"
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="
ffmpeg$secondaryArchSuffix = $portVersion compat >= 0.10
lib:libavcodec$secondaryArchSuffix = 53.61.100 compat >= 53
lib:libavdevice$secondaryArchSuffix = 53.4.100 compat >= 53
lib:libavfilter$secondaryArchSuffix = 2.61.100 compat >= 2
lib:libavformat$secondaryArchSuffix = 53.32.100 compat >= 53
lib:libavutil$secondaryArchSuffix = 51.35.100 compat >= 51
lib:libpostproc$secondaryArchSuffix = 52.0.100 compat >= 52
lib:libswresample$secondaryArchSuffix = 0.6.100 compat >= 0
lib:libswscale$secondaryArchSuffix = 2.1.100 compat >= 2
"
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="
ffmpeg${secondaryArchSuffix}_devel = $portVersion compat >= 0.10
devel:libavcodec$secondaryArchSuffix = 53.61.100 compat >= 53
devel:libavdevice$secondaryArchSuffix = 53.4.100 compat >= 53
devel:libavfilter$secondaryArchSuffix = 2.61.100 compat >= 2
devel:libavformat$secondaryArchSuffix = 53.32.100 compat >= 53
devel:libavutil$secondaryArchSuffix = 51.35.100 compat >= 51
devel:libpostproc$secondaryArchSuffix = 52.0.100 compat >= 52
devel:libswresample$secondaryArchSuffix = 0.6.100 compat >= 0
devel:libswscale$secondaryArchSuffix = 2.1.100 compat >= 2
"
REQUIRES_devel="
ffmpeg$secondaryArchSuffix == $portVersion
"
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:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:perl
cmd:pkg_config$secondaryArchSuffix
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 (used only during build so /system is fine)
sed -i "s,/usr/bin/perl,/system/bin/perl," \
Doxyfile \
doc/texi2pod.pl
}
BUILD()
{
# not an autotools configure
./configure \
--prefix=$prefix \
--bindir=$binDir \
--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
make $jobArgs CFLAGS="-fno-PIC -std=gnu9x"
}
INSTALL()
{
make install
prepareInstalledDevelLibs \
libavcodec \
libavdevice \
libavfilter \
libavformat \
libavutil \
libswresample \
libswscale \
libpostproc
fixPkgconfig
# include the documented ffserver.conf
mkdir -p $docDir
cp doc/ffserver.conf $docDir
# devel package
packageEntries devel \
$developDir
rm -rf $prefix/bin
}

View File

@@ -1,184 +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-2017 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="6e38ff14f080c98b58cf5967573501b8cb586e3a173b591f3807d8f0660daf7a"
PATCHES="ffmpeg-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
GLOBAL_WRITABLE_FILES="
settings/ffserver.conf
"
PROVIDES="
ffmpeg$secondaryArchSuffix = $portVersion compat >= 3.2
cmd:ffmpeg = $portVersion compat >= 3.2
cmd:ffprobe = $portVersion compat >= 3.2
cmd:ffserver = $portVersion compat >= 3.2
lib:libavcodec$secondaryArchSuffix = 57.64.101 compat >= 57
lib:libavdevice$secondaryArchSuffix = 57.1.100 compat >= 57
lib:libavfilter$secondaryArchSuffix = 6.65.100 compat >= 6
lib:libavformat$secondaryArchSuffix = 57.56.101 compat >= 57
lib:libavresample$secondaryArchSuffix = 3.1.0 compat >= 3
lib:libavutil$secondaryArchSuffix = 55.34.101 compat >= 55
lib:libpostproc$secondaryArchSuffix = 54.1.100 compat >= 54
lib:libswresample$secondaryArchSuffix = 2.3.100 compat >= 2
lib:libswscale$secondaryArchSuffix = 4.2.100 compat >= 4
"
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
"
CONFLICTS="
ffmpeg2${secondaryArchSuffix}_bin
ffmpeg_legacy$secondaryArchSuffix
"
PROVIDES_devel="
ffmpeg${secondaryArchSuffix}_devel = $portVersion compat >= 3.2
devel:libavcodec$secondaryArchSuffix = 57.64.101 compat >= 57
devel:libavdevice$secondaryArchSuffix = 57.1.100 compat >= 57
devel:libavfilter$secondaryArchSuffix = 6.65.100 compat >= 6
devel:libavformat$secondaryArchSuffix = 57.56.101 compat >= 57
devel:libavresample$secondaryArchSuffix = 3.1.0 compat >= 3
devel:libavutil$secondaryArchSuffix = 55.34.101 compat >= 55
devel:libpostproc$secondaryArchSuffix = 54.1.100 compat >= 54
devel:libswresample$secondaryArchSuffix = 2.3.100 compat >= 2
devel:libswscale$secondaryArchSuffix = 4.2.100 compat >= 4
"
REQUIRES_devel="
ffmpeg$secondaryArchSuffix == $portVersion base
devel:libspeex$secondaryArchSuffix
"
CONFLICTS_devel="
ffmpeg2${secondaryArchSuffix}_devel
ffmpeg_legacy${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
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="
cmd:awk
cmd:cmp
cmd:gcc$secondaryArchSuffix >= 5
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
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 \
$dataDir/ffmpeg$secondaryArchSuffix/examples \
$manDir/man3 \
$docDir \
$developDir
}
TEST()
{
make check
}

View File

@@ -1,219 +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-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
}

View File

@@ -1,256 +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 v2.1
GNU GPL v2"
REVISION="3"
SOURCE_URI="https://ffmpeg.org/releases/ffmpeg-$portVersion.tar.xz"
CHECKSUM_SHA256="2b92e9578ef8b3e49eeab229e69305f5f4cbc1fdaa22e927fc7fca18acccd740"
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.78.100"
libavcodecVersion="57.107.100"
libavformatVersion="57.83.100"
libavdeviceVersion="57.10.100"
libavfilterVersion="6.107.100"
libavresampleVersion="3.7.0"
libswscaleVersion="4.8.100"
libswresampleVersion="2.9.100"
libpostprocVersion="54.7.100"
portVersionCompat="$portVersion compat >= 3.2"
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:libgnutls$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
"
CONFLICTS="
ffmpeg_legacy$secondaryArchSuffix
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
cmd:ffserver = $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
ffmpeg2${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libbz2$secondaryArchSuffix
devel:libgnutls$secondaryArchSuffix
devel:libmodplug$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
devel:libsdl2$secondaryArchSuffix
devel:libspeex$secondaryArchSuffix
devel:libtheora$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
devel:libvpx$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:cmp
cmd:gcc$secondaryArchSuffix >= 5
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:perl
cmd:pkg_config$secondaryArchSuffix
cmd:sed
cmd:texi2html
cmd:yasm
"
GLOBAL_WRITABLE_FILES="
settings/ffserver.conf
"
PATCH()
{
# patch hard-coded config file path
sed -i "s,/etc/ffserver.conf,$sysconfDir/ffserver.conf," \
fftools/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
}
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
# Can't get them working
#defineDebugInfoPackage ffmpeg${secondaryArchSuffix}_avdevice \
# $libDir/libavdevice.so.$libavdeviceVersion
#defineDebugInfoPackage ffmpeg${secondaryArchSuffix}_tools \
# $prefix/bin/ffmpeg \
# $prefix/bin/ffplay \
# $prefix/bin/ffprobe \
# $prefix/bin/ffserver
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 \
--disable-stripping \
--enable-gnutls
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
# Split out libs and executables which need libSDL
packageEntries tools $prefix/bin
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="253c37e3f1d3626a2566e496554de9a4c29050753660835909a466d66b12e2ed"
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,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-2019 the FFmpeg developers"
LICENSE="GNU LGPL v3
GNU GPL v3"
REVISION="1"
SOURCE_URI="https://ffmpeg.org/releases/ffmpeg-$portVersion.tar.xz"
CHECKSUM_SHA256="f1f049a82fcfbf156564e73a3935d7e750891fab2abf302e735104fd4050a7e1"
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.22.100"
libavcodecVersion="58.35.100"
libavformatVersion="58.20.100"
libavdeviceVersion="58.5.100"
libavfilterVersion="7.40.101"
libavresampleVersion="4.0.0"
libswscaleVersion="5.3.100"
libswresampleVersion="3.3.100"
libpostprocVersion="55.3.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:libogg$secondaryArchSuffix
lib:libopenmpt$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:libogg$secondaryArchSuffix
devel:libopenmpt$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-libvorbis \
--enable-libspeex \
--enable-libtheora \
--enable-avresample \
--enable-libopenmpt \
$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

@@ -6,7 +6,7 @@ HOMEPAGE="https://ffmpeg.org/"
COPYRIGHT="2000-2003 Fabrice Bellard
2003-2019 the FFmpeg developers"
LICENSE="GNU LGPL v3"
REVISION="3"
REVISION="4"
SOURCE_URI="https://ffmpeg.org/releases/ffmpeg-$portVersion.tar.xz"
CHECKSUM_SHA256="cb754255ab0ee2ea5f66f8850e1bd6ad5cac1cd855d0a2f4990fb8c668b0d29c"
PATCHES="ffmpeg-$portVersion.patchset"