ffmpeg: support building for secondary architecture

This commit is contained in:
Ingo Weinhold
2013-08-09 02:54:52 +02:00
parent 3eb07497a4
commit 74cb8b4aa7

View File

@@ -11,47 +11,53 @@ COPYRIGHT="
"
SRC_URI="http://www.ffmpeg.org/releases/ffmpeg-0.10.2.tar.bz2"
CHECKSUM_MD5="de1bd5fc4bbf3ef730a5361ee596fedd"
REVISION="2"
ARCHITECTURES="x86_gcc2 ?x86"
REVISION="3"
ARCHITECTURES="x86_gcc2 x86"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PATCHES="ffmpeg-0.10.2-gcc2.patch"
PROVIDES="
ffmpeg = $portVersion compat >= 0.10
cmd:ffmpeg = $portVersion compat >= 0.10
cmd:ffprobe = $portVersion compat >= 0.10
cmd:ffserver = $portVersion compat >= 0.10
lib:libavcodec = 53.61.100 compat >= 53
lib:libavdevice = 53.4.100 compat >= 53
lib:libavfilter = 2.61.100 compat >= 2
lib:libavformat = 53.32.100 compat >= 53
lib:libavutil = 51.35.100 compat >= 51
lib:libswresample = 0.6.100 compat >= 0
lib:libswscale = 2.1.100 compat >= 2
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:libswresample$secondaryArchSuffix = 0.6.100 compat >= 0
lib:libswscale$secondaryArchSuffix = 2.1.100 compat >= 2
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES
cmd:ffmpeg = $portVersion compat >= 0.10
cmd:ffprobe = $portVersion compat >= 0.10
cmd:ffserver = $portVersion compat >= 0.10
"
fi
REQUIRES="
haiku >= $haikuVersion
lib:libogg
lib:libspeex
lib:libtheoradec
lib:libtheoraenc
lib:libvorbis
lib:libvorbisenc
lib:libvpx
lib:libz
haiku$secondaryArchSuffix >= $haikuVersion
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:libogg
devel:libspeex
devel:libtheora
devel:libvorbis
devel:libvpx
devel:libz
devel:libogg$secondaryArchSuffix
devel:libspeex$secondaryArchSuffix
devel:libtheora$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
devel:libvpx$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:gcc
cmd:ld
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:perl
cmd:pkg_config
@@ -61,9 +67,7 @@ BUILD_PREREQUIRES="
GLOBAL_WRITABLE_FILES="
settings/ffserver.conf
"
SOURCE_DIR="$portVersionedName"
"
PATCH()
{
@@ -83,8 +87,11 @@ BUILD()
# not an auto tools configure
./configure \
--prefix=$prefix \
--datadir=$dataDir/ffmpeg \
--bindir=$binDir \
--datadir=$dataDir/$portName \
--incdir=$includeDir \
--libdir=$libDir \
--shlibdir=$libDir \
--mandir=$manDir \
--disable-debug \
--enable-shared \
@@ -122,21 +129,26 @@ INSTALL()
# devel package
packageEntries devel \
$developDir
# Remove stuff we don't need in the secondary architecture base package.
if [ -n "$secondaryArchSuffix" ]; then
rm -rf $prefix/bin
rm -rf $documentationDir
fi
}
# ----- devel package -------------------------------------------------------
SUMMARY_devel="The libtheora development files"
PROVIDES_devel="
ffmpeg_devel = $portVersion compat >= 0.10
devel:libavcodec = 53.61.100 compat >= 53
devel:libavdevice = 53.4.100 compat >= 53
devel:libavfilter = 2.61.100 compat >= 2
devel:libavformat = 53.32.100 compat >= 53
devel:libavutil = 51.35.100 compat >= 51
devel:libswresample = 0.6.100 compat >= 0
devel:libswscale = 2.1.100 compat >= 2
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:libswresample$secondaryArchSuffix = 0.6.100 compat >= 0
devel:libswscale$secondaryArchSuffix = 2.1.100 compat >= 2
"
REQUIRES_devel="
ffmpeg == $portVersion
ffmpeg$secondaryArchSuffix == $portVersion
"