cairo - 2D graphics library ChangeLog

HOWTO


# Cairo 1.18.0 (2023-09-20)
# ============
# Slackware 14.0: cairo 1.10.2
# Slackware 14.1: cairo 1.12.14
# Slackware 14.2: cairo 1.14.6
# Slackware 15.0: cairo 1.16.0

# Prerequisites:
# Python (for Meson build system)
# Ninja
# zlib (for PDF, Postscript)
# pkg-config
# pixman >= 0.30.0
# XFree86 or X.org (optional)
# Quartz is MacOS X
# libpng (preferred)
# freetype >= 2.1.9 (required)
# fontconfig (required)
# Ghostscript (--enable-ps) (for the PostScript backend)
# libspectre
# poppler >= 0.8.0,
#  and GTK+'s GDK (for the PDF backend)
# librsvg >= 2.15.0 (for SVG backend test)
# gtk-doc > 1.3 (found in Slackware's sgml-tools/linuxdoc-tools packages; pass --enable-gtk-doc to use)
#
# Backends that have to be enabled with a configure flag:
# XCB: XCB (--enable-xcb)
# glitz: glitz (--enable-glitz)
# DirectFB: directfb (--enable-directfb)

# If you want to uninstall Cairo or remove an old version before installing
# this one, skip down to the bottom.

# NOTE: As of the November 28, 2006 update to this howto, we use the /usr
# prefix instead of /usr/local.  If you have a Cairo installed under
# /usr/local, skip to the bottom to uninstall your old version before you
# proceed.  ('make uninstall' as root in a configured Cairo source)
# Be aware that you may need to rebuild things that use Cairo
# after doing this:
# poppler
# pango
# goffice
# Evolution
# any howto of mine with cairo in it's name, any with cairo as a
# prerequisite...
#
# This will tell you what libtool .la files are set with libcairo's old
# location:
# grep '/usr/local/lib*/libcairo.la' /usr/lib*/*.la | cut -d':' -f1

# libspectre uses Cairo and Cairo uses libspectre, so if you want
# each to support the other, build one, build the other, and build the
# first one again.

# Poppler won't build poppler-glib without Cairo, and Cairo won't build
# Poppler support without poppler-glib, so just keep compiling and
# installing each of them until configure says yes :-)

# Install/upgrade Python's pip and the Meson build system
su
python3 -m pip install -U pip
python3 -m pip install -U meson
exit

# Get the tarball
cd
test -f installed/cairo-1.18.0.tar.xz && mv installed/cairo-1.18.0.tar.xz .
test ! -f cairo-1.18.0.tar.xz &&
wget https://cairographics.org/releases/cairo-1.18.0.tar.xz

# Get the sha256sum file
# 243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64
wget -nc https://cairographics.org/releases/\
cairo-1.18.0.tar.xz.sha256sum

# Verify the sha256sum file w/ gpg:
( gpg --list-keys 53EF3DC3B63E2899271BD26322E8091EEA11BBB7 > /dev/null 2>&1 ||
  gpg --keyserver keyserver.ubuntu.com --recv-keys \
   53EF3DC3B63E2899271BD26322E8091EEA11BBB7 ) &&
wget -nc https://cairographics.org/releases/\
cairo-1.18.0.tar.xz.sha256sum.asc &&
  gpg --verify cairo-1.18.0.tar.xz.sha256sum.asc &&
   rm cairo-1.18.0.tar.xz.sha256sum.asc

# Now actually check the sha256sum:
cat cairo-1.18.0.tar.xz.sha256sum | sha256sum -c

# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "cairo-*" -exec rm -r {} \;
tar xJvf ~/cairo-1.18.0.tar.xz
cd cairo-1.18.0
test $UID = 0 && chown -R root:root .

# Read at least README.md and INSTALL
# If upgrading, also NEWS
# https://cairographics.org/documentation/

## It may say this:
# Run-time dependency gtk+-2.0 found: NO (tried pkgconfig and cmake)
## even though you have GTK+-2.0 installed, if the gtk2-utils feature is
## disabled

# Configure it with Meson (which uses Ninja
meson setup build --prefix=/usr --libdir=/usr/lib64

# Build it
ninja -C build

# Become root to install it
# Your 'su' may require -p to have $USER set, don't even guess and
# just use 'logname' below
su

# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg cairo

# Remove old library files if you are _sure_ they are not needed
rm -f /usr/lib*/libcairo.*

# Install it
ninja -C build install
ldconfig

# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .

# Become yourself again
exit

# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/cairo-*.tar.*
mv cairo-1.18.0.tar.xz installed/


# If you ever want to uninstall Cairo, this should do it:
cd
su
test -d src/cairo-* && ( cd src/cairo-* ; ninja -C build uninstall )
for pfx in /usr /usr/local;
do
  cd $pfx
  test -d include/cairo && rm -r include/cairo
  test -d share/gtk-doc/html/cairo && rm -r share/gtk-doc/html/cairo
  for libdir in ${pfx}/lib ${pfx}/lib64;
  do
    test ! -d $libdir && continue
    cd $libdir
    rm -f libcairo.*
    test -d pkgconfig &&
     ( cd pkgconfig
       rm -f cairo.pc cairo-fc.pc cairo-ft.pc cairo-pdf.pc cairo-png.pc \
        cairo-ps.pc cairo-script.pc cairo-svg.pc )
  done
done
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "cairo-*" -exec rm -r {} \;
rm -f ~/installed/cairo-*.tar.*

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EDT -0400)
HOWTO last updated: 2023-10-17 3:13pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]