easyblock = 'ConfigureMake'

name = 'NSPR'
version = '4.25'

homepage = 'https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR'
description = """Netscape Portable Runtime (NSPR) provides a platform-neutral API for system level
 and libc-like functions."""

toolchain = SYSTEM

source_urls = ['https://archive.mozilla.org/pub/nspr/releases/v%(version)s/src/']
sources = [SOURCELOWER_TAR_GZ]

builddependencies = [('binutils', '2.27')]

configopts = "--disable-debug --enable-optimize --enable-64bit"

sanity_check_paths = {
    'files': ['bin/nspr-config', 'lib/libnspr%(version_major)s.a', 'lib/libnspr%%(version_major)s.%s' % SHLIB_EXT,
              'lib/libplc%(version_major)s.a', 'lib/libplc%%(version_major)s.%s' % SHLIB_EXT,
              'lib/libplds%(version_major)s.a', 'lib/libplds%%(version_major)s.%s' % SHLIB_EXT,
              'lib/pkgconfig/nspr.pc'],
    'dirs': ['include/nspr'],
}

moduleclass = 'lib'
