# IT4Innovations
# PH 2025

easyblock = 'ConfigureMake'

name = 'tcl-thread'
version = '2.8.8'

homepage = 'https://openacs.org/xowiki/libthread'
description = """Libthread is the standard Tcl thread library, providing functionality to create and manage threads 
in Tcl. It enables event loop-based threads and enhances Tcl applications such as OpenACS, xotcl-core, and others."""

toolchain = {'name': 'GCCcore', 'version': '13.2.0'}

# https://downloads.sourceforge.net/sourceforge/tcl/thread2.8.8.tar.gz
source_urls = ['https://downloads.sourceforge.net/sourceforge/tcl/']
sources = [f'thread{version}.tar.gz']
patches = [
    ('tcl-thread-2.8.8-fix_pkgdir.patch')
]

checksums = [
    '35db93f681317942f31dfa0bddea01a464b1d83ada22db7707a1919ba780f091',  # thread2.8.8.tar.gz
    '5a1f75edf183be64cf0d07af21693588fff013697e722410407a98c698e6ac10',  # tcl-thread-2.8.8-fix_pkgdir.patch
]

configopts = '--libdir=/apps/all/tcl-thread/2.8.8-GCCcore-13.2.0'

sanity_check_paths = {
    'files': ['lib/libthread2.8.8.so'],
    'dirs': ['share/man/mann'],
}

moduleclass = 'tools'

