easyblock = 'ConfigureMake'

name = 'potrace'
version = '1.16'

homepage = 'http://potrace.sourceforge.net/'
description = """Potrace is a tool for tracing a bitmap, which means transforming
a bitmap into a smooth, scalable image."""

toolchain = {'name': 'foss', 'version': '2024a'}

source_urls = ['https://sourceforge.net/projects/potrace/files/']
sources = [SOURCELOWER_TAR_GZ]

checksums = [
    'be8248a17dedd6ccbaab2fcc45835bb0502d062e40fbded3bc56028ce5eb7acc',
]

builddependencies = [
    ('Autotools', '20231222'),
]

configopts = ['--with-libpotrace --enable-shared --disable-static --libdir=%(installdir)s/lib --includedir=%(installdir)s/include']

install_cmd = 'make install'

sanity_check_paths = {
    'dirs': [
        'bin',
    ],
    'files': [
        'bin/potrace',
        'lib/libpotrace.so',
        'include/potracelib.h',
    ],
}

sanity_check_commands = [
    'potrace --version',
]

moduleclass = 'tools'
