[libjpeg-turbo] [package list]
libjpeg-turbo/3.0.1-cpeCray-24.03 (libjpeg-turbo-3.0.1-cpeCray-24.03.eb)
To access module help and find out for which stacks and partitions the module is
installed, use module spider libjpeg-turbo/3.0.1-cpeCray-24.03
.
EasyConfig:
# Contributed by Kurt Lust, LUMI project & UAntwerpen
easyblock = 'CMakeMake'
local_libjpegturbo_version = '3.0.1' # https://github.com/libjpeg-turbo/libjpeg-turbo/releases
name = 'libjpeg-turbo'
version = local_libjpegturbo_version
homepage = 'https://github.com/libjpeg-turbo/libjpeg-turbo'
whatis = [
'Description: SIMD-accelerated libjpeg-compatible JPEG codec library',
'This module provides a number of command line tools and static and shared libraries.'
]
description = """
libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2,
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.).
"""
usage = """
The libjpeg-turbo package contains a number of command line utilities:
+ cjpeg: compress an image file to a JPEG file
+ djpeg: Decompress a JPEG file to an image file
+ jpegtran: Lossless transformation of JPEG files
+ rdjpgcom: Display text comments from a JPEG file
+ wrjpgcom: Insert text comments into a JPEG file
Extensive help is available for these commands as Linux man pages. All
commands also support the --help command line option.
The module also provides the benchmarking tool tjbench.
The API-documentation is web-based.
"""
docurls = [
'Web-based API-documentation: https://libjpeg-turbo.org/Documentation',
'Man pages for the command line utilities cjpeg, djpeg, jpegtran, rdjpgcom and wrjpgcom',
]
software_license_urls = [
f'https://github.com/libjpeg-turbo/libjpeg-turbo/blob/{version}/LICENSE.md',
]
toolchain = {'name': 'cpeCray', 'version': '24.03'}
toolchainopts = {'pic': True}
# https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/2.1.0.tar.gz
sources = {
'download_filename': '%(version)s.tar.gz',
'filename': SOURCELOWER_TAR_GZ,
'source_urls': ['https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/'],
}
checksums = ['5b9bbca2b2a87c6632c821799438d358e27004ab528abf798533c15d50b39f82']
builddependencies = [ # Create a reproducible build environment.
('buildtools', '%(toolchain_version)s', '', True), # NASM and CMake
]
#skipsteps = ['tests']
# Doesn't need MPI, ROCm or BLAS, and module unload never fails so this is safe.
preconfigopts = 'module unload cray-libsci cray-mpich rocm xpmem && '
prebuildopts = preconfigopts
pretestopts = preconfigopts
# Note: In 2.0.14 with the CMake from the 2019b build set, 12-bit support causes a failure
# during the configure step in CMakeLists.txt (wrong number of arguments for the
# add_bittest macro).
configopts = '-G"Unix Makefiles" -DWITH_JPEG7=1 -DWITH_JPEG8=1 -DWITH_12BIT=1 -DCMAKE_INSTALL_LIBDIR:PATH=lib'
pretestopts += 'sed -e \'/djpeg12-.*-3x2-float-prog-cmp/d\' -i CTestTestfile.cmake && '
runtest = "test"
postinstallcmds = [
'mkdir -p %(installdir)s/share/licenses/%(name)s',
'cd ../%(namelower)s-%(version)s && cp ChangeLog.md LICENSE.md README.md %(installdir)s/share/licenses/%(name)s',
]
sanity_check_paths = {
'files': ['bin/cjpeg', 'bin/djpeg', 'bin/jpegtran', 'bin/rdjpgcom', 'bin/tjbench', 'bin/wrjpgcom',
'include/jpeglib.h', 'include/turbojpeg.h',
'lib/libjpeg.a', 'lib/libjpeg.%s' % SHLIB_EXT, 'lib/libturbojpeg.a', 'lib/libturbojpeg.%s' % SHLIB_EXT,
f'share/licenses/{name}/LICENSE.md'],
'dirs': ['share/man/man1'],
}
sanity_check_commands = [ # Not that much needed as there is a test procedure during the build.
'cjpeg -version',
'djpeg -version',
'jpegtran -version',
# no easy test for rdjpgcom, wrjpgcom and tjbench.
'pkg-config --libs libjpeg',
'pkg-config --libs libturbojpeg',
]
moduleclass = 'lib'