1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#!/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 <time.h> 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 <pwd.h>. 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 <chris.tusa@leafscale.com>"
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
|