Skip to content

[libjpeg-turbo] [package list]

libjpeg-turbo/2.1.5.1-cpeAMD-23.12 (libjpeg-turbo-2.1.5.1-cpeAMD-23.12.eb)

To access module help and find out for which stacks and partitions the module is installed, use module spider libjpeg-turbo/2.1.5.1-cpeAMD-23.12.

EasyConfig:

# Contributed by Kurt Lust, LUMI project & UAntwerpen
easyblock = 'CMakeMake'

local_libjpegturbo_version = '2.1.5.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': 'cpeAMD', 'version': '23.12'}
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 = ['61846251941e5791005fb7face196eec24541fce04f12570c308557529e92c75']

builddependencies = [ # Create a reproducible build environment.
    ('buildtools', '%(toolchain_version)s', '', True), # NASM and CMake
]

# 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=0'
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',
              'lib/libjpeg.a', 'lib/libjpeg.%s' % SHLIB_EXT, 'lib/libturbojpeg.a', 'lib/libturbojpeg.%s' % SHLIB_EXT,
              f'share/licenses/{name}/LICENSE.md'],
    'dirs':  ['include', 'share'],
}

sanity_check_commands = [ # Not that much needed as there is a test procedure during the build.
    'cjpeg -version',
    'djpeg -version',
    'jpegtran -version',
    'pkg-config --libs libjpeg',
    'pkg-config --libs libturbojpeg',
]

moduleclass = 'lib'

[libjpeg-turbo] [package list]