### this file is sourced not run
PKGVER=2.34.2
PKGBUILD=1
PKGARCH=i686

# source: BLFS 2013-08-1
# we stick to this version, this is the last version that provides
# GTK2-based viewer
TARBALL=librsvg-$PKGVER.tar.xz
MD5SUM=5287d0066eb9e3ac55d4e3597694232b
SRC_URL=http://ftp.gnome.org/pub/gnome/sources/librsvg/2.34/$TARBALL
BUNDLE=

SLACKREQ='gtk2_32 gdk-pixbuf32 libcroco32 pango32'
SLACKDESC="librsvg32: librsvg32 $PKGVER (SVG image library)  
librsvg32:  
librsvg32: The librsvg package contains a library and tools used to manipulate, 
librsvg32: convert and view Scalable Vector Graphic (SVG) images. This is the 
librsvg32: last version that fully supports GTK2.  
librsvg32: 
librsvg32: This contains 32-bit version of the library.
librsvg32: 
librsvg32: 
librsvg32: 
librsvg32:
"

SLACKINSTALL='
# hopefully one of these will work
# but be careful not to destroy existing loaders.cache if all fails
if type chroot > /dev/null; then
	chroot . /usr/bin/gdk-pixbuf-query-loaders-32 --update-cache
else
	./usr/bin/gdk-pixbuf-query-loaders-32 > /dev/null &&
	./usr/bin/gdk-pixbuf-query-loaders-32 > ./usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache 
fi 
'

### default pkg_download
### default pkg_prepare
### package - only collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share
}

### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --disable-static"
	pkg_build_autoconf && pkg_build_slackdesc &&
	rm -f /usr/$LIBDIR/gdk-pixbuf-2.0/2.10.0/loaders.cache
}
