PCRE2/10.47-cpeGNU-25.09 (PCRE2-10.47-cpeGNU-25.09.eb)
To access module help and find out for which stacks and partitions the module is
installed, use module spider PCRE2/10.47-cpeGNU-25.09.
EasyConfig:
easyblock = 'ConfigureMake'
local_libreadline_version = '8.3.3' # https://ftp.gnu.org/pub/gnu/readline/, also look at the patches
local_zlib_version = '1.3.1' # https://zlib.net/
local_bzip2_version = '1.0.8' # http://www.bzip.org/downloads.html
local_PCRE2_version = '10.47' # https://github.com/PCRE2Project/pcre2/releases # Not yet in EB 2025a when checked for installation
name = 'PCRE2'
version = local_PCRE2_version
homepage = 'http://www.pcre.org/'
whatis = [
'Description: PCRE2 is a library for Perl-compatible regular expressions, this one with the version 2 API',
'This package provides some command line tools and static and shared libraries'
]
description = """
The PCRE library is a set of functions that implement regular expression pattern
matching using the same syntax and semantics as Perl 5. PCRE has its own native
API, as well as a set of wrapper functions that correspond to the POSIX regular
expression API. The PCRE library is free, even for building proprietary software.
"""
doc_urls = [
"Man pages in section 1 (pcre2grep, pcre2test) and 3 (API, start with pcre2)",
"http://www.pcre.org/current/doc/html/",
]
software_license_urls = [
f'https://github.com/PCRE2Project/pcre2/blob/pcre2-{version}/LICENCE',
]
toolchain = {'name': 'cpeGNU', 'version': '25.09'}
toolchain_opts = {'pic': True}
source_urls = ['https://github.com/PCRE2Project/%(namelower)s/releases/download/%(namelower)s-%(version)s']
sources = [SOURCELOWER_TAR_BZ2]
checksums = ['47fe8c99461250d42f89e6e8fdaeba9da057855d06eb7fc08d9ca03fd08d7bc7']
build_deps = [ # Create a reproducible build environment.
('buildtools', '%(toolchain_version)s', '', True),
]
deps = [
('libreadline', local_libreadline_version),
('zlib', local_zlib_version),
('bzip2', local_bzip2_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
pre_install_opts = pre_configure_opts
configure_opts = "--with-pic --enable-newline-is-any "
configure_opts += "--enable-pcre2-16 --enable-pcre2-32 "
configure_opts += "--enable-jit "
configure_opts += "--enable-pcre2grep-libz --enable-pcre2grep-libbz2 --enable-pcre2test-libreadline "
#configure_opts = "--enable-shared --enable-jit --enable-pcre2-16 --enable-unicode"
post_install_cmds = [
'mkdir -p %(installdir)s/share/licenses/%(name)s',
'cp AUTHORS.md ChangeLog COPYING LICENCE.md NEWS README SECURITY.md %(installdir)s/share/licenses/%(name)s',
]
local_executables = ['pcre2-config', 'pcre2grep', 'pcre2test']
local_lib_variants = ['posix', '8', '16', '32']
sanity_check_paths = {
'files': ['bin/%s' %x for x in local_executables] +
['share/man/man1/%s.1' % x for x in local_executables] +
['lib/libpcre2-%s.%s' % (x,y) for x in local_lib_variants for y in ['a', 'la', SHLIB_EXT]] +
['lib/pkgconfig/libpcre2-%s.pc' % x for x in local_lib_variants] +
['include/pcre2.h', 'include/pcre2posix.h', f'share/licenses/{name}/LICENCE.md'],
'dirs': ['share/doc/pcre2/html', 'share/man/man3'],
}
sanity_check_cmds = [
'%s --version' % x for x in local_executables] + [
'pkg-config --libs libpcre2-%s' % x for x in local_lib_variants]
env_mod_category = 'devel'