Linux HOWTOs

About | Home | Search


HOWTO: librsvg
Description: Scalable Vector Graphics
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# librsvg
# =======
# Slackware 9.0's 'librsvg' package includes version 2.2.4, 9.1's includes
# 2.4.0, 10.0 and 10.1's include 2.6.5, 10.2's includes 2.8.1, 11.0's
# includes 2.14.4, and 12.0's includes 2.16.1

# I include three versions here, each one for a different major version of
# Gnome, but keep in mind that I only use Gnome 2.12.x myself.

# If you ever want to uninstall librsvg, or clean up files from an old
# version before installing a new one, cd into the source directory,
# run 'make uninstall', remove the source directory, then remove the
# tarball.

# Prerequisites (for all versions):
# pkg-config
# Glib-2.0 >= 2.0.0
# libart-2.0 >= 2.3.10
# libxml-2.0 >= 2.4.7
# popt
# libgsf-1 >= 1.6.0
# GTK+-2.0 >= 1.3.12
# gtk-doc, db2html (Slackware includes this in it's sgml-tools/linuxdoc-tools packages)


# librsvg 2.2.5 (for Gnome 2.2.x)
# =============
# Prerequisites (beyond those listed above):
# pango >= 1.0.0

cd
test -f installed/librsvg-2.2.5.tar.bz2 &&
 mv installed/librsvg-2.2.5.tar.bz2 .
test ! -f librsvg-2.2.5.tar.bz2 &&
 wget http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.2/librsvg-2.2.5.tar.bz2

# Verify tarball w/ md5sum:
echo "db71094f14f460142b356c5ce6b9f835  librsvg-2.2.5.tar.bz2" | md5sum -c

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "librsvg-*" -exec rm -r {} \;
tar xjvf ~/librsvg-2.2.5.tar.bz2
cd librsvg-2.2.5
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
make

# Become root to install it
su

test -x /sbin/removepkg && /sbin/removepkg librsvg
rm -f /usr/lib/librsvg-2.*
make install
ldconfig

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/librsvg-*.tar.*
mv librsvg-2.2.5.tar.bz2 installed/


# librsvg 2.4.0 (for Gnome 2.4.x)
# =============
# Prerequisites (beyond those listed above):
# pango >= 1.0.0
# libcroco >= 0.1.0 (don't install >= 0.6.0, go with 0.5.1)

cd
test -f installed/librsvg-2.4.0.tar.bz2 &&
 mv installed/librsvg-2.4.0.tar.bz2 .
test ! -f librsvg-2.4.0.tar.bz2 &&
 wget http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.4/librsvg-2.4.0.tar.bz2

# Verify tarball w/ md5sum:
echo "1a073864e5f6e9793cf23e38dc723803  librsvg-2.4.0.tar.bz2" | md5sum -c

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "librsvg-*" -exec rm -r {} \;
tar xjvf ~/librsvg-2.4.0.tar.bz2
cd librsvg-2.4.0
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib

# If make fails with an error like this:
# rsvg-styles.c:386:22: libcroco.h: No such file or directory
# re-run it like this:
# make CPPFLAGS="-I/usr/include/libcroco/libcroco"

make

# Become root to install it
su

test -x /sbin/removepkg && /sbin/removepkg librsvg
rm -f /usr/lib/librsvg-2.*
make install
ldconfig

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/librsvg-*.tar.*
mv librsvg-2.4.0.tar.bz2 installed/


# librsvg 2.6.5 (for Gnome 2.6.x, 2.8.x, or 2.10.x)
# =============
# Prerequisites (beyond those listed above):
# pango >= 1.2.0
# libcroco >= 0.4.0 (don't install >= 0.6.0, go with 0.5.1)

cd
test -f installed/librsvg-2.6.5.tar.bz2 &&
 mv installed/librsvg-2.6.5.tar.bz2 .
test ! -f librsvg-2.6.5.tar.bz2 &&
 wget http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.6/librsvg-2.6.5.tar.bz2

# Verify tarball w/ md5sum:
echo "2d1d16f9493c80ce8214e585727334ae  librsvg-2.6.5.tar.bz2" | md5sum -c

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "librsvg-*" -exec rm -r {} \;
tar xjvf ~/librsvg-2.6.5.tar.bz2
cd librsvg-2.6.5
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
make

# Become root to install it
su

test -x /sbin/removepkg && /sbin/removepkg librsvg
rm -f /usr/lib/librsvg-2.*
make install
ldconfig

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/librsvg-*.tar.*
mv librsvg-2.6.5.tar.bz2 installed/


# librsvg 2.12.7 (for Gnome 2.12.x)
# ==============
# Prerequisites (beyond those listed above):
# freetype
# pango >= 1.2.0
# gnome-vfs-2.0 >= 1.9.16
# libcroco-0.6 >= 0.6.0
# libgnomeprint-2.2 >= 2.2.0
# libgnomeprintui-2.2 >= 2.2.0 
# XFree86 or X.org
# mozilla (if mozilla-config is found, it'll build a plugin for mozilla)

cd
test -f installed/librsvg-2.12.7.tar.bz2 &&
 mv installed/librsvg-2.12.7.tar.bz2 .
test ! -f librsvg-2.12.7.tar.bz2 &&
 wget http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.12/\
librsvg-2.12.7.tar.bz2

# Verify tarball w/ md5sum:
echo "2113f01fbf228f3f8fc17c49966143fe  librsvg-2.12.7.tar.bz2" | md5sum -c

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "librsvg-*" -exec rm -r {} \;
tar xjvf ~/librsvg-2.12.7.tar.bz2
cd librsvg-2.12.7
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
make

# Become root to install it
su

test -x /sbin/removepkg && /sbin/removepkg librsvg
rm -f /usr/lib/librsvg-2.*
make install
ldconfig

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/librsvg-*.tar.*
mv librsvg-2.12.7.tar.bz2 installed/


# librsvg 2.14.4 (for Gnome 2.14.x)
# ==============
# Prerequisites (beyond those listed above):
# freetype
# pango >= 1.2.0
# gnome-vfs-2.0 >= 1.9.16
# libcroco-0.6 >= 0.6.0
# libgnomeprint-2.2 >= 2.2.0
# libgnomeprintui-2.2 >= 2.2.0 
# XFree86 or X.org
# mozilla (if mozilla-config is found, it'll build a plugin for mozilla)

cd
test -f installed/librsvg-2.14.4.tar.bz2 &&
 mv installed/librsvg-2.14.4.tar.bz2 .
test ! -f librsvg-2.14.4.tar.bz2 &&
 wget http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.14/\
librsvg-2.14.4.tar.bz2

# Verify tarball w/ md5sum:
echo "945617bb094975d7353a3852302297c1  librsvg-2.14.4.tar.bz2" | md5sum -c

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "librsvg-*" -exec rm -r {} \;
tar xjvf ~/librsvg-2.14.4.tar.bz2
cd librsvg-2.14.4
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
make

## If make fails with an error like this:
# /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld:
# cannot find -lssl
## re-run it like this:
make LDFLAGS=-L/usr/local/ssl/lib

# Become root to install it
su

test -x /sbin/removepkg && /sbin/removepkg librsvg
rm -f /usr/lib/librsvg-2.*
make install
ldconfig

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/librsvg-*.tar.*
mv librsvg-2.14.4.tar.bz2 installed/


# librsvg 2.34.2 (for Gnome ?.?.?)
# ==============
# Prerequisites (beyond those listed above):
# freetype
# pango >= 1.2.0
# gnome-vfs-2.0 >= 1.9.16
# libcroco-0.6 >= 0.6.0
# libgnomeprint-2.2 >= 2.2.0
# libgnomeprintui-2.2 >= 2.2.0 
# XFree86 or X.org
# mozilla (if mozilla-config is found, it'll build a plugin for mozilla)

# Get it
cd
test -f installed/librsvg-2.34.2.tar.xz &&
 mv installed/librsvg-2.34.2.tar.xz .
test ! -f librsvg-2.34.2.tar.xz &&
 wget http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.34/\
librsvg-2.34.2.tar.xz

# Verify tarball w/ sha256sum:
# (Alternative: 'openssl dgst -sha256 librsvg-2.34.2.tar.xz')
echo "5de701325b84c0a15ab6892f49ffd6471722044bfe0b350725bf420642ee4464  \
librsvg-2.34.2.tar.xz" | sha256sum -c

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

# Configure and build it
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
make

## If make fails with an error like this:
# /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld:
# cannot find -lssl
## re-run it like this:
make LDFLAGS=-L/usr/local/ssl/lib

# Become root to install it
su

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

# Install it
rm -f /usr/lib/librsvg-2.*
make install
ldconfig

# Become yourself again
exit

# Save the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/librsvg-*.tar.*
mv librsvg-2.34.2.tar.xz installed/

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>