libheif/1.23.1-cpeAOCC-26.03 (libheif-1.23.1-cpeAOCC-26.03.eb)
To access module help and find out for which stacks and partitions the module is
installed, use module spider libheif/1.23.1-cpeAOCC-26.03.
EasyConfig:
# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
# Author: Denis Kristak
easyblock = 'CMakeMake'
local_libheif_version = '1.23.1' # https://github.com/strukturag/libheif/releases
local_libaom_version = '3.14.1' # https://aomedia.googlesource.com/aom/
local_libde265_version = '1.1.1' # https://github.com/strukturag/libde265/releases
local_libjpegturbo_version = '3.2.0' # https://github.com/libjpeg-turbo/libjpeg-turbo/releases
local_libpng_version = '1.6.58' # http://www.libpng.org/pub/png/libpng.html (Not yet in EB 2025a when checking)
local_libtiff_version = '4.7.2' # https://download.osgeo.org/libtiff/
local_libwebp_version = '1.6.0' # https://github.com/webmproject/libwebp/releases
local_OpenH264_version = '2.6.0' # https://github.com/cisco/openh264/releases
local_OpenJPEG_version = '2.5.4' # https://github.com/uclouvain/openjpeg/releases
local_x264_version = '20250831' # Just follow EasyBuild as the distribution is currently a mess
local_x265_version = '4.2' # http://download.videolan.org/pub/videolan/x265/
name = 'libheif'
version = local_libheif_version
homepage = 'https://github.com/strukturag/libheif'
whatis = [
'Description: Libheif is an HEIF and AVIF file format decoder and encoder'
]
description = """
Libheif is an ISO/IEC 23008-12 HEIF and AVIF (AV1 Image File Format) file format
decoder and encoder. HEIC and AVIF are new image file formats employing HEVC
(H.265) or AV1 image coding, respectively, for the best compression ratios
currently possible.
On top of HEIC and AVIF, libheif also supports HEIF images coded with VVC, AVC,
JPEG, JPEG-2000, and ISO/IEC 23001-17. The ISO/IEC 23001-17 codec is built-in to
libheif and allows to store lossless images and video in many different formats.
libheif makes use of various codec libraries for implementing each compression
format. For HEIC, libde265 is used by default for decoding and x265 for encoding.
For AVIF, libaom, dav1d, svt-av1, or rav1e are used as codecs. libheif can be
built with a subset of the supported codecs to keep the size and the number of
deps low. Alternatively, the libheif codecs can also be built as
separate plugins that can be installed and loaded dynamically when used.
"""
toolchain = {'name': 'cpeAOCC', 'version': '26.03'}
# https://github.com/strukturag/libheif/releases/download/1.23.1/libheif-1.23.1.tar.gz
source_urls = ['https://github.com/strukturag/libheif/releases/download/v%(version)s/']
sources = [SOURCE_TAR_GZ]
checksums = ['0de0327f60fcd47de90d5654c6fe152232738d60d84fe084ec3e0f35e03b166a']
build_deps = [
('buildtools', '%(toolchain_version)s', '', True), # For CMake and Doxygen
]
deps = [
('libaom', local_libaom_version),
('libpng', local_libpng_version),
('libjpeg-turbo', local_libjpegturbo_version),
('libde265', local_libde265_version),
('LibTIFF', local_libtiff_version),
('libwebp', local_libwebp_version),
('OpenH264', local_OpenH264_version),
('OpenJPEG', local_OpenJPEG_version),
('x264', local_x264_version),
('x265', local_x265_version),
]
# Doesn't need MPI, ROCm or BLAS, and module unload never fails so this is safe.
pre_configure_opts = 'module unload cray-libsci cray-mpich rocm xpmem && '
pre_build_opts = pre_configure_opts
# Build both static and shared libraries
# Include other options also.
local_heif_opts = ' '.join([
'-DWITH_LIBDE265=ON',
'-DWITH_X264=ON',
'-DWITH_X265=ON',
'-DWITH_KVAZAAR=OFF',
'-DWITH_UVG266=OFF',
'-DWITH_VVDEC=OFF',
'-DWITH_VVENC=OFF',
'-DWITH_OpenH264_DECODER=ON' # -DWITH_OpenH264_ENCODER=ON seems to be ignored in this version?
'-DWITH_DAV2D=OFF',
'-DWITH_AOM_DECODER=ON -DWITH_AOM_ENCODER=ON',
'-DWITH_SvtEnc=OFF',
'-DWITH_RAV1E=OFF',
'-DWITH_JPEG_DECODER=ON -DWITH_JPEG_ENCODER=ON',
'-DWITH_OpenJPEG_DECODER=ON -DWITH_OpenJPEG_ENCODER=ON',
'-DWITH_FFMPEG_DECODER=OFF',
'-DWITH_OPENJPH_DECODER=OFF -DWITH_OPENJPH_ENCODER=OFF',
'-DWITH_UNCOMPRESSED_CODEC=OFF', # Experimental in 1.23
'-DWITH_WEBCODES=OFF', # Experimental in 1.23
'-DWITH_GEOTIFF=OFF',
])
configure_opts = [
local_heif_opts + '-DWITH_GEOTIFF=OFF -DBUILD_SHARED_LIBS=OFF',
local_heif_opts + '-DBUILD_SHARED_LIBS=ON',
]
post_install_cmds = [
'mkdir -p %(installdir)s/share/licenses/%(name)s',
'cd ../%(namelower)s-%(version)s && cp COPYING README.md %(installdir)s/share/licenses/%(name)s',
]
env_mod_extra_paths = {
'EB_GDK_PIXBUF_EXTRA_MODULE_FILES': 'lib/gdk-pixbuf-2.0/2.10.0/loaders.cache'
}
sanity_check_paths = {
'files': ['bin/heif-info', 'lib/libheif.a', 'lib/libheif.%s' % SHLIB_EXT, 'lib/pkgconfig/libheif.pc'],
'dirs': ['include/libheif'],
}
sanity_check_cmds = [
'heif-info --help',
'heif-dec --help',
'heif-enc --help',
'pkg-config --libs libheif',
]
env_mod_category = 'tools'