mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-18 01:30:07 +02:00
146 lines
3.9 KiB
Bash
146 lines
3.9 KiB
Bash
SUMMARY="A library for encoding and decoding WebP image files"
|
|
DESCRIPTION="WebP is an image format that provides lossless and lossy \
|
|
compression for images on the web. WebP lossless images are 26% smaller \
|
|
in size compared to PNGs. WebP lossy images are 25-34% smaller in size \
|
|
compared to JPEG images at equivalent SSIM index.
|
|
WebP supports lossless transparency (also known as alpha channel) with \
|
|
just 22% additional bytes. Transparency is also supported with lossy \
|
|
compression and typically provides 3x smaller file sizes compared to \
|
|
PNG when lossy compression is acceptable for the red/green/blue color \
|
|
channels."
|
|
HOMEPAGE="https://developers.google.com/speed/webp"
|
|
COPYRIGHT="2011-2022 Google Inc."
|
|
LICENSE="BSD (3-clause)"
|
|
REVISION="1"
|
|
SOURCE_URI="http://downloads.webmproject.org/releases/webp/libwebp-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4"
|
|
|
|
ARCHITECTURES="all"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
webpLibs="\
|
|
libsharpyuv \
|
|
libwebp \
|
|
libwebpdecoder \
|
|
libwebpdemux \
|
|
libwebpmux \
|
|
"
|
|
libsharpyuvVersion="0.0.1"
|
|
libwebpVersion="7.1.8"
|
|
libwebpdecoderVersion="3.1.8"
|
|
libwebpdemuxVersion="2.0.14"
|
|
libwebpmuxVersion="3.0.13"
|
|
for i in $webpLibs; do
|
|
eval "${i}VersionCompat=\"\$${i}Version compat >= \${${i}Version%%.*}\""
|
|
done
|
|
|
|
PROVIDES="
|
|
libwebp$secondaryArchSuffix = $portVersion
|
|
cmd:cwebp$secondaryArchSuffix
|
|
cmd:dwebp$secondaryArchSuffix
|
|
cmd:gif2webp$secondaryArchSuffix
|
|
cmd:img2webp$secondaryArchSuffix
|
|
cmd:webpinfo$secondaryArchSuffix
|
|
cmd:webpmux$secondaryArchSuffix
|
|
lib:libsharpyuv$secondaryArchSuffix = $libsharpyuvVersionCompat
|
|
lib:libwebp$secondaryArchSuffix = $libwebpVersionCompat
|
|
lib:libwebpdecoder$secondaryArchSuffix = $libwebpdecoderVersionCompat
|
|
lib:libwebpdemux$secondaryArchSuffix = $libwebpdemuxVersionCompat
|
|
lib:libwebpmux$secondaryArchSuffix = $libwebpmuxVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libgif$secondaryArchSuffix
|
|
lib:libjpeg$secondaryArchSuffix
|
|
lib:libpng16$secondaryArchSuffix
|
|
lib:libtiff$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
libwebp${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libsharpyuv$secondaryArchSuffix = $libsharpyuvVersionCompat
|
|
devel:libwebp$secondaryArchSuffix = $libwebpVersionCompat
|
|
devel:libwebpdecoder$secondaryArchSuffix = $libwebpdecoderVersionCompat
|
|
devel:libwebpdemux$secondaryArchSuffix = $libwebpdemuxVersionCompat
|
|
devel:libwebpmux$secondaryArchSuffix = $libwebpmuxVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
libwebp$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libgif$secondaryArchSuffix >= 7
|
|
devel:libjpeg$secondaryArchSuffix
|
|
devel:libpng16$secondaryArchSuffix
|
|
# devel:libSDL_1.2$secondaryArchSuffix
|
|
devel:libtiff$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:aclocal
|
|
cmd:autoreconf
|
|
cmd:awk
|
|
cmd:find
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:libtoolize$secondaryArchSuffix
|
|
cmd:make
|
|
"
|
|
|
|
defineDebugInfoPackage libwebp$secondaryArchSuffix \
|
|
"$binDir"/cwebp \
|
|
"$binDir"/dwebp \
|
|
"$binDir"/gif2webp \
|
|
"$binDir"/img2webp \
|
|
"$binDir"/webpmux \
|
|
"$binDir"/webpinfo \
|
|
"$libDir"/libwebp.so.$libwebpVersion \
|
|
"$libDir"/libwebpdecoder.so.$libwebpdecoderVersion \
|
|
"$libDir"/libwebpdemux.so.$libwebpdemuxVersion \
|
|
"$libDir"/libwebpmux.so.$libwebpmuxVersion
|
|
|
|
BUILD()
|
|
{
|
|
autoreconf -vfi
|
|
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
SSE_OPTIONS="--disable-sse4.1 --disable-sse2"
|
|
fi
|
|
|
|
runConfigure ./configure \
|
|
--enable-libwebpdemux --enable-libwebpmux \
|
|
--enable-libwebpdecoder --enable-libwebpextras \
|
|
--enable-swap-16bit-csp --disable-static $SSE_OPTIONS
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make install
|
|
|
|
rm -f $libDir/*.la
|
|
|
|
prepareInstalledDevelLibs $webpLibs
|
|
fixPkgconfig
|
|
|
|
if [ -n "$secondaryArchSuffix" ]; then
|
|
rm -rf $manDir
|
|
maybe_manDir=
|
|
else
|
|
maybe_manDir=$manDir
|
|
fi
|
|
|
|
#devel package
|
|
packageEntries devel \
|
|
$developDir \
|
|
$maybe_manDir
|
|
|
|
rm -r $documentationDir
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
make check
|
|
}
|