easyblock = 'ConfigureMake'

name = "cairo"
version = '1.12.18'

homepage = 'http://cairographics.org'
description = """Cairo is a 2D graphics library with support for multiple output devices.
Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers,
PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB"""

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

source_urls = ['http://cairographics.org/releases/']
sources = [SOURCE_TAR_XZ]

dependencies = [
    ('libpng', '1.6.16'),
    ('freetype', '2.5.5'),
    ('zlib', '1.2.8'),
    ('pixman', '0.32.6'),
    ('fontconfig', '2.11.1'),
    ('expat', '2.1.0'),
    ('bzip2', '1.0.6'),
]

builddependencies = [('Autotools', '20150119', '', ('GCC', '4.9.2'))]

patches = ['cairo-1.12.18-pthread-check.patch']

preconfigopts = " autoconf configure.ac > configure && "

# disable symbol lookup, which requires -lbfd, to avoid link issues with (non-PIC) libiberty.a provided by GCC
configopts = "--enable-symbol-lookup=no"

moduleclass = 'vis'
