mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
ffmpeg: add recipe for version 3.3.
This commit is contained in:
185
media-video/ffmpeg/ffmpeg-3.3.recipe
Normal file
185
media-video/ffmpeg/ffmpeg-3.3.recipe
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
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="599e7f7c017221c22011c4037b88bdcd1c47cd40c1e466838bc3c465f3e9569d"
|
||||||
|
PATCHES="ffmpeg-$portVersion.patchset"
|
||||||
|
|
||||||
|
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
||||||
|
SECONDARY_ARCHITECTURES="!x86_gcc2 ?x86"
|
||||||
|
|
||||||
|
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:libavutil$secondaryArchSuffix = 55.58.100 compat >= 55
|
||||||
|
lib:libavcodec$secondaryArchSuffix = 57.89.100 compat >= 57
|
||||||
|
lib:libavformat$secondaryArchSuffix = 57.71.100 compat >= 57
|
||||||
|
lib:libavdevice$secondaryArchSuffix = 57.6.100 compat >= 57
|
||||||
|
lib:libavfilter$secondaryArchSuffix = 6.82.100 compat >= 6
|
||||||
|
lib:libavresample$secondaryArchSuffix = 3.5.0 compat >= 3
|
||||||
|
lib:libswscale$secondaryArchSuffix = 4.6.100 compat >= 4
|
||||||
|
lib:libswresample$secondaryArchSuffix = 2.7.100 compat >= 2
|
||||||
|
lib:libpostproc$secondaryArchSuffix = 54.5.100 compat >= 54
|
||||||
|
"
|
||||||
|
|
||||||
|
REQUIRES="
|
||||||
|
haiku$secondaryArchSuffix
|
||||||
|
lib:libbz2$secondaryArchSuffix
|
||||||
|
lib:libogg$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 = $portVersion compat >= 3.2
|
||||||
|
devel:libavutil$secondaryArchSuffix = 55.58.100 compat >= 55
|
||||||
|
devel:libavcodec$secondaryArchSuffix = 57.89.100 compat >= 57
|
||||||
|
devel:libavformat$secondaryArchSuffix = 57.71.100 compat >= 57
|
||||||
|
devel:libavdevice$secondaryArchSuffix = 57.6.100 compat >= 57
|
||||||
|
devel:libavfilter$secondaryArchSuffix = 6.82.100 compat >= 6
|
||||||
|
devel:libavresample$secondaryArchSuffix = 3.5.0 compat >= 3
|
||||||
|
devel:libswscale$secondaryArchSuffix = 4.6.100 compat >= 4
|
||||||
|
devel:libswresample$secondaryArchSuffix = 2.7.100 compat >= 2
|
||||||
|
devel:libpostproc$secondaryArchSuffix = 54.5.100 compat >= 54
|
||||||
|
"
|
||||||
|
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: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
|
||||||
|
"
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
21
media-video/ffmpeg/patches/ffmpeg-3.3.patchset
Normal file
21
media-video/ffmpeg/patches/ffmpeg-3.3.patchset
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
From 88bf339b083a0945ddb56ca5b78708bbc1141fa6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jerome Duval <jerome.duval@gmail.com>
|
||||||
|
Date: Sat, 9 Apr 2016 17:37:09 +0000
|
||||||
|
Subject: disable ebx on x86.
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/configure b/configure
|
||||||
|
index a1818dc..26af622 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -6324,6 +6324,7 @@ enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pt
|
||||||
|
if test $target_os = "haiku"; then
|
||||||
|
disable memalign
|
||||||
|
disable posix_memalign
|
||||||
|
+ enabled x86_32 && enabled shared && disable ebx_available
|
||||||
|
fi
|
||||||
|
|
||||||
|
enabled_all dxva2 dxva2api_cobj CoTaskMemFree &&
|
||||||
|
--
|
||||||
|
2.7.0
|
||||||
|
|
||||||
Reference in New Issue
Block a user