mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 14:38:51 +02:00
136 lines
4.0 KiB
Bash
136 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-2019 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="1"
|
|
SOURCE_URI="https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="4246de500544d4ee408ee57048aa4aadc6f165fc17f141da87669f20ed3241b7"
|
|
SOURCE_DIR="libjpeg-turbo-$portVersion"
|
|
|
|
ARCHITECTURES="?x86_gcc2 ?x86 x86_64 ?arm"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libjpegVersion="62.3.0"
|
|
libjpegVersionCompat="$libjpegVersion compat >= ${libjpegVersion%%.*}"
|
|
libturbojpegVersion="0.2.0"
|
|
libturbojpegVersionCompat="$libturbojpegVersion compat >= ${libturbojpegVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
libjpeg_turbo$secondaryArchSuffix = $portVersion
|
|
lib:libjpeg$secondaryArchSuffix = $libjpegVersion
|
|
lib:libturbojpeg$secondaryArchSuffix = $libturbojpegVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
libjpeg_turbo${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libjpeg$secondaryArchSuffix = $libjpegVersion
|
|
devel:libturbojpeg$secondaryArchSuffix = $libturbojpegVersion
|
|
"
|
|
REQUIRES_devel="
|
|
libjpeg_turbo$secondaryArchSuffix == $portVersion base
|
|
"
|
|
CONFLICTS_devel="
|
|
jpeg${secondaryArchSuffix}_devel
|
|
"
|
|
|
|
PROVIDES_tools="
|
|
libjpeg_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
|
|
libjpeg_turbo$secondaryArchSuffix == $portVersion base
|
|
"
|
|
CONFLICTS_tools="
|
|
jpeg${secondaryArchSuffix}_tools
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:libtoolize$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:nasm
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
defineDebugInfoPackage libjpeg_turbo$secondaryArchSuffix \
|
|
$libDir/libjpeg.so.$libjpegVersion \
|
|
$libDir/libturbojpeg.so.$libturbojpegVersion
|
|
|
|
BUILD()
|
|
{
|
|
mkdir -p haiku_build && cd haiku_build
|
|
cmake .. \
|
|
$cmakeDirArgs
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
cd haiku_build
|
|
make install
|
|
|
|
rm -f "$libDir"/lib*jpeg.la
|
|
|
|
prepareInstalledDevelLibs libjpeg libturbojpeg
|
|
fixPkgconfig
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir
|
|
|
|
# tools package
|
|
packageEntries tools \
|
|
$binDir \
|
|
$documentationDir
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
cd haiku_build
|
|
make test
|
|
}
|