easyblock = 'ConfigureMake'

name = 'ZeroMQ'
version = '4.2.0'

homepage = 'http://www.zeromq.org/'
description = """ZeroMQ looks like an embeddable networking library but acts like a concurrency framework.
 It gives you sockets that carry atomic messages across various transports like in-process,
 inter-process, TCP, and multicast. You can connect sockets N-to-N with patterns like fanout,
 pub-sub, task distribution, and request-reply. It's fast enough to be the fabric for clustered
 products. Its asynchronous I/O model gives you scalable multicore applications, built as asynchronous
 message-processing tasks. It has a score of language APIs and runs on most operating systems."""

toolchain = {'name': 'foss', 'version': '2016b'}

source_urls = ['https://github.com/zeromq/libzmq/releases/download/v%(version)s/']
sources = [SOURCELOWER_TAR_GZ]
checksums=['1fb2595d2a905a9e820c976a1d8348bc']

# --with-pgm will use shipped OpenPGM (in foreign subdir)
configopts = '--with-pic --with-system-pgm '
configopts += 'OpenPGM_CFLAGS="-I$EBROOTOPENPGM/include/pgm-${EBVERSIONOPENPGM%.*}" '
configopts += 'OpenPGM_LIBS="-L$EBROOTOPENPGM/lib -lpgm -lrt -lpthread -lm" '

dependencies = [
    ('OpenPGM', '5.2.122'),
    ('util-linux', '2.29'),
    ('libsodium', '1.0.11'),
]

sanity_check_paths = {
    'files': ['lib/libzmq.so', 'lib/libzmq.a'],
    'dirs': ['include', 'lib'],
}

moduleclass = 'devel'
