mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
138 lines
4.0 KiB
Bash
138 lines
4.0 KiB
Bash
SUMMARY="MMX, SSE, and SSE2 SIMD accelerated JPEG library"
|
|
DESCRIPTION="libjpeg-turbo is a JPEG image codec that uses SIMD instructions \
|
|
(MMX, SSE2, AVX2, NEON, AltiVec) to accelerate baseline JPEG compression and \
|
|
decompression on x86, x86-64, ARM, and PowerPC systems. On such systems, \
|
|
libjpeg-turbo is generally 2-6x as fast as libjpeg, all else being equal. On \
|
|
other types of systems, libjpeg-turbo can still outperform libjpeg by a \
|
|
significant amount, by virtue of its highly-optimized Huffman coding routines.
|
|
In many cases, the performance of libjpeg-turbo rivals that of proprietary \
|
|
high-speed JPEG codecs.
|
|
libjpeg-turbo implements both the traditional libjpeg API as well as the less \
|
|
powerful but more straightforward TurboJPEG API. libjpeg-turbo also features \
|
|
colorspace extensions that allow it to compress from/decompress to 32-bit and \
|
|
big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java \
|
|
interface.
|
|
libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated \
|
|
derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and \
|
|
VirtualGL projects made numerous enhancements to the codec in 2009, and in \
|
|
early 2010, libjpeg-turbo spun off into an independent project, with the goal \
|
|
of making high-speed JPEG compression/decompression technology available to \
|
|
a broader range of users and developers."
|
|
HOMEPAGE="https://www.libjpeg-turbo.org/"
|
|
COPYRIGHT="1991-2018 Thomas G. Lane, Guido Vollbeding
|
|
1997-2010 Guido Vollbeding
|
|
2000-2017 D. R. Commander
|
|
2009 Bill Allombert
|
|
1999-2006 MIYASAKA Masaru
|
|
2011 Siarhei Siamashka
|
|
2013 Linaro Limited
|
|
2014 MIPS Technologies, Inc.
|
|
2015 Google, Inc.
|
|
2015 Matthieu Darbois"
|
|
LICENSE="BSD (3-clause)
|
|
IJG
|
|
Zlib"
|
|
REVISION="3"
|
|
SOURCE_URI="https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="b24890e2bb46e12e72a79f7e965f409f4e16466d00e1dd15d93d73ee6b592523"
|
|
SOURCE_DIR="libjpeg-turbo-$portVersion"
|
|
PATCHES="libjpeg_turbo-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64 ?arm"
|
|
SECONDARY_ARCHITECTURES="?x86"
|
|
|
|
libjpegVersion="62.2.0"
|
|
libjpegVersionCompat="$libjpegVersion compat >= ${libjpegVersion%%.*}"
|
|
libturbojpegVersion="0.1.0"
|
|
libturbojpegVersionCompat="$libturbojpegVersion compat >= ${libturbojpegVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
jpeg_turbo$secondaryArchSuffix = $portVersion
|
|
lib:libjpeg$secondaryArchSuffix = $libjpegVersion
|
|
lib:libturbojpeg$secondaryArchSuffix = $libturbojpegVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
jpeg_turbo${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libjpeg$secondaryArchSuffix = $libjpegVersion
|
|
devel:libturbojpeg$secondaryArchSuffix = $libturbojpegVersion
|
|
"
|
|
REQUIRES_devel="
|
|
jpeg_turbo$secondaryArchSuffix == $portVersion base
|
|
"
|
|
CONFLICTS_devel="
|
|
jpeg${secondaryArchSuffix}_devel
|
|
"
|
|
|
|
PROVIDES_tools="
|
|
jpeg_turbo${secondaryArchSuffix}_tools = $portVersion
|
|
cmd:cjpeg$secondaryArchSuffix = $portVersion
|
|
cmd:djpeg$secondaryArchSuffix = $portVersion
|
|
cmd:jpegtran$secondaryArchSuffix = $portVersion
|
|
cmd:rdjpgcom$secondaryArchSuffix = $portVersion
|
|
cmd:tjbench$secondaryArchSuffix = $portVersion
|
|
cmd:wrjpgcom$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES_tools="
|
|
haiku$secondaryArchSuffix
|
|
jpeg_turbo$secondaryArchSuffix == $portVersion base
|
|
"
|
|
CONFLICTS_tools="
|
|
jpeg${secondaryArchSuffix}_tools
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:aclocal
|
|
cmd:automake
|
|
cmd:autoreconf
|
|
cmd:awk
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:grep
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:libtoolize$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:nasm
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
defineDebugInfoPackage jpeg_turbo$secondaryArchSuffix \
|
|
$libDir/libjpeg.so.$libjpegVersion \
|
|
$libDir/libturbojpeg.so.$libturbojpegVersion
|
|
|
|
BUILD()
|
|
{
|
|
autoreconf -fi
|
|
runConfigure ./configure
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make install
|
|
|
|
rm -f "$libDir"/lib*jpeg.la
|
|
|
|
prepareInstalledDevelLibs libjpeg libturbojpeg
|
|
fixPkgconfig
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir
|
|
|
|
# tools package
|
|
packageEntries tools \
|
|
$binDir \
|
|
$documentationDir
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
make test
|
|
}
|