OpenJPEG/2.5.4-cpeAMD-25.09 (OpenJPEG-2.5.4-cpeAMD-25.09.eb)
To access module help and find out for which stacks and partitions the module is
installed, use module spider OpenJPEG/2.5.4-cpeAMD-25.09.
EasyConfig:
easyblock = 'CMakeMake'
local_libpng_version = '1.6.54' # http://www.libpng.org/pub/png/libpng.html (Not yet in EB 2025a when checking)
local_libtiff_version = '4.7.1' # https://download.osgeo.org/libtiff/
local_LittleCMS_version = '2.17' # https://sourceforge.net/projects/lcms/files/lcms/
local_zlib_version = '1.3.1' # https://zlib.net/
local_OpenJPEG_version = '2.5.4' # https://github.com/uclouvain/openjpeg/releases
name = 'OpenJPEG'
version = local_OpenJPEG_version
homepage = 'https://www.openjpeg.org/'
whatis = [
'Description: OpenJPEG is an open-source JPEG 2000 codec'
]
description = """
OpenJPEG is an open-source JPEG 2000 codec written in
C language. It has been developed in order to promote the use of JPEG 2000,
a still-image compression standard from the Joint Photographic Experts Group
(JPEG). Since may 2015, it is officially recognized by ISO/IEC and ITU-T as
a JPEG 2000 Reference Software.
"""
toolchain = {'name': 'cpeAMD', 'version': '25.09'}
toolchain_opts = {'pic': True}
# https://github.com/uclouvain/openjpeg/archive/v2.5.4.tar.gz
sources = [{
'download_filename': 'v%(version)s.tar.gz',
'filename': SOURCE_TAR_GZ,
'source_urls': ['https://github.com/uclouvain/%(namelower)s/archive'],
}]
checksums = ['a695fbe19c0165f295a8531b1e4e855cd94d0875d2f88ec4b61080677e27188a']
build_deps = [
('buildtools', '%(toolchain_version)s', '', SYSTEM),
]
# for running the binary of openjpeg like opj_compress you need the libraries like zlib etc.
deps = [
('zlib', local_zlib_version),
('libpng', local_libpng_version),
('LibTIFF', local_libtiff_version),
('LittleCMS', local_LittleCMS_version)
]
# Doesn't need MPI or BLAS, and module unload never fails so this is safe.
pre_configure_opts = 'module unload cray-libsci cray-mpich xpmem && '
pre_install_opts = pre_test_opts = pre_build_opts = pre_configure_opts
configure_opts = '-DCMAKE_INSTALL_LIBDIR=lib ' # It will install shared and static libraries automatically.
post_install_cmds = [
'mkdir -p %(installdir)s/share/licenses/%(name)s',
'cd ../%(namelower)s-%(version)s && cp AUTHORS.md CHANGELOG.md LICENSE NEWS.md README.md THANKS.md %(installdir)s/share/licenses/%(name)s',
]
sanity_check_paths = {
'files': [
'bin/opj_compress',
'bin/opj_decompress',
'bin/opj_dump',
'include/openjpeg-%(version_major)s.%(version_minor)s/openjpeg.h',
'lib/libopenjp2.%s' % SHLIB_EXT,
'share/licenses/%(name)s/LICENSE'
],
'dirs': ['bin', 'include', 'lib'],
}
sanity_check_cmds = [ # No easy test on the executables themselves though...
f'pkg-config --modversion libopenjp2 | grep -q {local_OpenJPEG_version}',
'pkg-config --libs libopenjp2 | grep -q lopenjp2',
]
env_mod_category = 'lib'