ffmpeg: 2.3!!

This commit is contained in:
Augustin Cavalier
2014-07-28 17:14:00 -04:00
parent f38c89a888
commit 0466598113
2 changed files with 185 additions and 0 deletions

View File

@@ -0,0 +1,160 @@
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-2.3.tar.bz2"
CHECKSUM_SHA256="6b3dbb64e20951480bfd64bcbe305f6ee9031e5fccfd3b3e94cc5055525f809e"
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.3
cmd:ffmpeg = $portVersion compat >= 2.3
cmd:ffprobe = $portVersion compat >= 2.3
cmd:ffserver = $portVersion compat >= 2.3
lib:libavutil$secondaryArchSuffix = 52.92.100 compat >= 52
lib:libavcodec$secondaryArchSuffix = 55.69.100 compat >= 55
lib:libavformat$secondaryArchSuffix = 55.47.100 compat >= 55
lib:libavdevice$secondaryArchSuffix = 55.13.100 compat >= 55
lib:libavfilter$secondaryArchSuffix = 4.10.100 compat >= 4
lib:libswscale$secondaryArchSuffix = 2.6.100 compat >= 2
lib:libswresample$secondaryArchSuffix = 0.19.100 compat >= 0
lib:libpostproc$secondaryArchSuffix = 52.3.100 compat >= 52
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
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 >= $haikuVersion
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:awk
cmd:make
cmd:perl
cmd:pkg_config$secondaryArchSuffix
cmd:texi2html
cmd:yasm
"
GLOBAL_WRITABLE_FILES="
settings/ffserver.conf
"
PROVIDES_devel="
ffmpeg${secondaryArchSuffix}_devel = $portVersion compat >= 2.3
devel:libavutil$secondaryArchSuffix = 52.92.100 compat >= 52
devel:libavcodec$secondaryArchSuffix = 55.69.100 compat >= 55
devel:libavformat$secondaryArchSuffix = 55.47.100 compat >= 55
devel:libavdevice$secondaryArchSuffix = 55.13.100 compat >= 55
devel:libavfilter$secondaryArchSuffix = 4.10.100 compat >= 4
devel:libswscale$secondaryArchSuffix = 2.6.100 compat >= 2
devel:libswresample$secondaryArchSuffix = 0.19.100 compat >= 0
devel:libpostproc$secondaryArchSuffix = 52.3.100 compat >= 52
"
REQUIRES_devel="
ffmpeg$secondaryArchSuffix == $portVersion base
"
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
make $jobArgs CFLAGS="-fno-PIC -std=c99"
}
INSTALL()
{
make install
# rm -f $prefix/bin/ffprobe
# TODO: Determine and fix what is wrong with ffprobe! The executable
# seems to be broken. The NEEDED entries in the dynamic section look
# weird and the runtime loader fails relocating with "Operation not
# allowed".
prepareInstalledDevelLibs \
libavcodec \
libavdevice \
libavfilter \
libavformat \
libavutil \
libswresample \
libswscale
fixPkgconfig
# include the documented ffserver.conf
mkdir -p $docDir
cp doc/ffserver.conf $docDir
# devel package
packageEntries devel \
$developDir
}

View File

@@ -0,0 +1,25 @@
From b44fcd01d625972a8a4ee18cb72be1d0bd4cde38 Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Mon, 28 Jul 2014 15:54:14 -0400
Subject: [PATCH] configure: remove invalid option. From a StackOverflow post.
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 4ed43a0..6a81e3b 100755
--- a/configure
+++ b/configure
@@ -4297,7 +4297,7 @@ void foo(void) { __asm__ volatile ("" ::); }
EOF
_restrict=
-for restrict_keyword in restrict __restrict__ __restrict; do
+for restrict_keyword in __restrict__ __restrict; do
check_cc <<EOF && _restrict=$restrict_keyword && break
void foo(char * $restrict_keyword p);
EOF
--
1.8.3.4