# IT4Innovations 2018

easyblock = 'ConfigureMake'

name = 'FFmpeg'
version = '3.1.3'

homepage = 'https://www.ffmpeg.org/'
description = """A local_complete, cross-platform solution to record, convert and stream audio and video."""

toolchain = {'name': 'intel', 'version': '2017a'}

sources = [SOURCELOWER_TAR_BZ2]
source_urls = ['http://ffmpeg.org/releases/']

dependencies = [
    ('NASM', '2.12.02', '', True),
    ('zlib', '1.2.11', '', True),
    ('x264', '20160430'),
]

configopts = '--enable-pic --enable-shared --enable-gpl --enable-version3 --enable-nonfree --cc="$CC" --cxx="$CXX" '
configopts += '--enable-libx264'

sanity_check_paths = {
    'files': [
        'bin/ff%s' %
        x for x in [
            'mpeg',
            'probe',
            'server']] +
    [
        'lib/lib%s.%s' %
        (x,
         y) for x in [
            'avdevice',
            'avfilter',
            'avformat',
            'avcodec',
            'postproc',
            'swresample',
            'swscale',
            'avutil'] for y in [
            'so',
            'a']],
    'dirs': ['include']}

moduleclass = 'vis'
