Skip to content

[cairo] [package list]

cairo/1.18.4-cpeAOCC-25.03 (cairo-1.18.4-cpeAOCC-25.03.eb)

To access module help and find out for which stacks and partitions the module is installed, use module spider cairo/1.18.4-cpeAOCC-25.03.

EasyConfig:

easyblock = 'MesonNinja'

local_bzip2_version =        '1.0.8'         # http://www.bzip.org/downloads.html
local_expat_version =        '2.6.4'         # https://github.com/libexpat/libexpat/releases
local_fontconfig_version =   '2.16.2'        # https://www.freedesktop.org/software/fontconfig/release/
local_freetype_version =     '2.13.3'        # https://download.savannah.gnu.org/releases/freetype/ (Not yet in EB 2025a when checking)
local_GLib_version =         '2.85.1'        # https://ftp.gnome.org/pub/GNOME/sources/glib/ Not the one from 2025a, but with newer versions we had trouble with GObject-Introspection
local_libpng_version =       '1.6.47'        # http://www.libpng.org/pub/png/libpng.html (Not yet in EB 2025a when checking)
local_LZO_version =          '2.10'          # http://www.oberhumer.com/opensource/lzo/#download
local_pixman_version =       '0.42.2'        # https://www.cairographics.org/releases/
local_zlib_version =         '1.3.1'         # https://zlib.net/

local_craypython_version =   '3.11.7'

local_cairo_version =        '1.18.4'        # https://www.cairographics.org/

local_craypython_maj_min = '.'.join( local_craypython_version.split('.')[:2] )

name =    'cairo'
version = local_cairo_version

homepage = 'https://www.cairographics.org/'

whatis = [
    'Description: 2D graphics library with support for multiple output devices',
    'This module includes command line tools for debugging Cairo applications and static and shared libraries',
]

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 and DirectFB.

Cairo is designed to produce consistent output on all output media while taking
advantage of display hardware acceleration when available (eg. through the X
Render Extension).

The cairo API provides operations similar to the drawing operators of PostScript
and PDF. Operations in cairo including stroking and filling cubic Bézier
splines, transforming and compositing translucent images, and antialiased text
rendering. All drawing operations can be transformed by any affine
transformation (scale, rotation, shear, etc.)

Cairo is implemented as a library written in the C programming language, but
bindings are available for several different programming languages.

Cairo is free software and is available to be redistributed and/or modified
under the terms of either the GNU Lesser General Public License (LGPL)
version 2.1 or the Mozilla Public License (MPL) version 1.1 at your option.

This module provides the command line tools cairo-sphinx and cairo-trace and
static and shared libraries.
"""

docurls = [
    'Web-based documentation: https://www.cairographics.org/documentation/',
]

docpaths = [
    'share/gtk-doc/html/cairo',
]

software_license_urls = [
    'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html',
    'https://www.mozilla.org/en-US/MPL/1.1/',
]

toolchain = {'name': 'cpeAOCC', 'version': '25.03'}

source_urls = [
    'https://cairographics.org/releases/',
    'https://cairographics.org/snapshots/'
]
sources = [SOURCE_TAR_XZ]
checksums = ['445ed8208a6e4823de1226a74ca319d3600e83f6369f99b14265006599c32ccb']

builddependencies = [
    ('buildtools' ,       '%(toolchain_version)s', '',                                        SYSTEM),
    ('buildtools-python', '%(toolchain_version)s', f'-cray-python{local_craypython_maj_min}', SYSTEM),
]

dependencies = [
    ('bzip2',    local_bzip2_version),
    ('zlib',     local_zlib_version),
    ('libpng',   local_libpng_version),
    ('freetype', local_freetype_version),
    ('LZO',      local_LZO_version),
    ('fontconfig', local_fontconfig_version),
    ('pixman',   local_pixman_version),
    ('expat',    local_expat_version),
    ('GLib',     local_GLib_version),
    ('X11',      '%(toolchain_version)s'),
]

# Doesn't need MPI, ROCm or BLAS, and module unload never fails so this is safe.
preconfigopts = 'module unload cray-libsci cray-mpich rocm xpmem && '
preinstallopts = pretestopts = prebuildopts = preconfigopts

configopts  = ' '.join([ # Most parameters come from meson_options.txt.
    '--buildtype=release',
    '--default-library=both',
    '--libdir=lib',
    '-Ddwrite=disabled', 
    '-Dfontconfig=enabled',
    '-Dfreetype=enabled',
    '-Dpng=enabled',
    '-Dquartz=disabled',         # That's for Mac OS
    '-Dtee=disabled',            # We don't have that
    '-Dxcb=enabled',
    '-Dxlib=enabled',
    '-Dxlib-xcb=disabled',       # Probably disabled by default for a reason as it looks like this is still a bit experimental, so leave it like this.
    '-Dzlib=enabled',
    '-Dlzo=enabled', 
    '-Dglib=enabled',
    '-Dspectre=disabled',
    '-Dgtk2-utils=disabled',     # Default but in case this ever changes...
    '-Dsymbol-lookup=disabled',  # As we don't have that library installed yet through EasyBuild
    '-Dgtk_doc=false', 
])

postinstallcmds = [
    'mkdir -p %(installdir)s/share/licenses/%(name)s',
    'cd %(start_dir)s && cp AUTHORS BUGS COPYING* NEWS README.md %(installdir)s/share/licenses/%(name)s',   
]

local_cairo_pc = [ '-fc', '-ft', '', '-pdf', '-png', '-ps', '-script-interpreter', 
                   '-script', '-svg', '-xcb', '-xcb-shm', '-xlib', '-xlib-xrender']

sanity_check_paths = {
    'files': ['bin/cairo-trace', 'lib/cairo/libcairo-trace.so', 'lib/cairo/libcairo-trace.a',
              'lib/libcairo.a', 'lib/libcairo-gobject.a', 'lib/libcairo-script-interpreter.a',
              'lib/libcairo-gobject.so', 'lib/libcairo-script-interpreter.so', 'lib/libcairo.so'] +
             ['include/cairo/cairo%s.h' % x for x in ['', '-deprecated', '-features', '-ft', '-gobject', '-pdf', '-ps',
                                                      '-script', '-script-interpreter', '-svg', '-version', '-xcb',
                                                      '-xlib', '-xlib-xrender']] + 
             ['lib/pkgconfig/cairo%s.pc' % x for x in local_cairo_pc] +
             ['share/licenses/cairo/%s' % x for x in ['COPYING', 'COPYING-LGPL-2.1', 'COPYING-MPL-1.1']],
    'dirs':  ['lib/pkgconfig'],
}

sanity_check_commands = [
    f'pkg-config --modversion cairo%s | grep -q {local_cairo_version}' % x for x in local_cairo_pc
] + [
    f'cairo-trace --version | grep -q {local_cairo_version}'
]

moduleclass = 'vis'

[cairo] [package list]