mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
x86_64 is used as a baseline: the "x86_64" entry, whatever status it has, is transformed into "all", and then the other entries in ARCHITECTURES either dropped or rearranged appropriately.
131 lines
3.0 KiB
Bash
131 lines
3.0 KiB
Bash
SUMMARY="WebM VP8 video codec library"
|
|
DESCRIPTION="The WebM VP8 SDK allows you to integrate your applications with \
|
|
the VP8 video codec, a high quality, royalty free, open source codec deployed \
|
|
on millions of computers and devices worldwide.
|
|
|
|
This distribution of the WebM VP8 Codec SDK includes the following support:
|
|
- WebM VP8 Encoder
|
|
- WebM VP8 Decoder"
|
|
HOMEPAGE="https://www.webmproject.org/"
|
|
COPYRIGHT="2009-2012 Google Inc.,
|
|
The Mozilla Foundation and
|
|
The Xiph.Org Foundation"
|
|
LICENSE="BSD (3-clause)"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/webmproject/libvpx/archive/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="85803ccbdbdd7a3b03d930187cb055f1353596969c1f92ebec2db839fa4f834a"
|
|
SOURCE_FILENAME="libvpx-$portVersion.tar.gz"
|
|
SOURCE_DIR="libvpx-$portVersion"
|
|
|
|
ARCHITECTURES="all !x86_gcc2 ?x86"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
commandSuffix=$secondaryArchSuffix
|
|
commandBinDir=$binDir
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
libVersion="6.4.0"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
portVersionCompat="$portVersion compat >= ${portVersion%.*}"
|
|
|
|
PROVIDES="
|
|
libvpx$secondaryArchSuffix = $portVersion
|
|
lib:libvpx$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_bin="
|
|
libvpx${secondaryArchSuffix}_bin = $portVersion
|
|
cmd:vpxdec$commandSuffix = $portVersionCompat
|
|
cmd:vpxenc$commandSuffix = $portVersionCompat
|
|
"
|
|
REQUIRES_bin="
|
|
haiku$secondaryArchSuffix
|
|
libvpx$secondaryArchSuffix == $portVersion base
|
|
"
|
|
if [ -n "$secondaryArchSuffix" -a "$commandBinDir" = "$prefix"/bin ]; then
|
|
CONFLICTS_bin="
|
|
libvpx_bin
|
|
"
|
|
fi
|
|
|
|
PROVIDES_devel="
|
|
libvpx${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libvpx$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
libvpx$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
# Note: The build system also looks for libvorbis and SDL, but that seems
|
|
# to be needed only for building the sample player, which we don't need.
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:awk
|
|
cmd:make
|
|
cmd:perl
|
|
cmd:yasm
|
|
cmd:egrep
|
|
cmd:grep
|
|
cmd:sed
|
|
cmd:find
|
|
cmd:xargs
|
|
cmd:diff
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
export CONFIG_SPATIAL_SVC=yes
|
|
# not an auto tools configure
|
|
./configure \
|
|
--prefix="$prefix" \
|
|
--libdir="$libDir" \
|
|
--as=yasm \
|
|
--enable-pic \
|
|
--enable-shared \
|
|
--enable-vp8 \
|
|
--enable-vp9 \
|
|
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
CONFIG_SPATIAL_SVC=yes \
|
|
make install
|
|
|
|
prepareInstalledDevelLibs libvpx
|
|
fixPkgconfig
|
|
|
|
mkdir -p $includeDir
|
|
mv $prefix/include/* $includeDir
|
|
rmdir $prefix/include
|
|
|
|
if [ -n "$secondaryArchSuffix" -a "$commandBinDir" != "$prefix/bin" ]; then
|
|
mkdir -p "$commandBinDir"
|
|
mv "$prefix"/bin/vpxdec "$commandBinDir"
|
|
mv "$prefix"/bin/vpxenc "$commandBinDir"
|
|
fi
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
"$developDir"
|
|
|
|
# bin package
|
|
packageEntries bin \
|
|
"$commandBinDir"
|
|
|
|
if [ -n "$secondaryArchSuffix" -a "$commandBinDir" != "$prefix"/bin ]; then
|
|
rmdir "$prefix"/bin
|
|
fi
|
|
}
|