#!/bin/sh # Build script for cairo (Meson, Template B). # Deps: pixman, freetype, fontconfig, libpng, libX11, libXext, libXrender # (all ported, M2/M3a), glib2 (this task, above). set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" # GOTCHA (Task 6, same class as glib2): illumos's gates the # POSIX 2-arg ctime_r()/asctime_r() prototypes behind # _POSIX_C_SOURCE>=199506L || _POSIX_PTHREAD_SEMANTICS, same as # getpwnam_r/getpwuid_r in . Without it, cairo-ps-surface.c's # 3-arg ctime_r() call ("too few arguments") fails against the POSIX # 2-arg prototype that __EXTENSIONS__ alone leaves selected. export CFLAGS="${CFLAGS} -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -Wl,-R,$PREFIX/lib" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --buildtype=release \ -Ddefault_library=shared \ -Dxlib=enabled \ -Dxcb=enabled \ -Dtests=disabled \ -Dglib=enabled \ -Dfreetype=enabled \ -Dfontconfig=enabled \ -Dpng=enabled ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # cairo - 2D graphics library (pango / Openbox render dep) # https://www.cairographics.org/releases/ [package] name = "cairo" version = "1.18.4" release = 1 description = "2D graphics library" url = "https://www.cairographics.org/" license = "LGPL-2.1-or-later OR MPL-1.1" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["pixman", "freetype", "fontconfig", "libpng", "libX11", "libXext", "libXrender", "glib2"] build = ["pixman", "freetype", "fontconfig", "libpng", "libX11", "libXext", "libXrender", "glib2"] [[source]] file = "cairo-1.18.4.tar.xz" urls = ["https://www.cairographics.org/releases/cairo-1.18.4.tar.xz"] checksum = "445ed8208a6e4823de1226a74ca319d3600e83f6369f99b14265006599c32ccb" [build] parallel = true