# SliTaz package receipt.

PACKAGE="cairo"
VERSION="1.17.2"
CATEGORY="x-window"
SHORT_DESC="2D graphics library."
MAINTAINER="pankso@slitaz.org"
DEPENDS="glib pixman libpng zlib expat fontconfig freetype xorg-libX11 \
xorg-libXau xorg-libXdmcp xorg-libXrender xcb-util libxcb"
BUILD_DEPENDS="pkg-config automake autoconf expat-dev freetype-dev \
libpng-dev fontconfig-dev zlib-dev harfbuzz-dev xorg-libX11-dev \
xorg-libXau-dev xorg-libXdmcp-dev xorg-libXext-dev xorg-libICE-dev \
xorg-libXrender-dev libxcb-dev glib-dev libxml2-dev libgio-dev \
pixman-dev pcre-dev"
TARBALL="$PACKAGE-$VERSION.tar.xz"
WEB_SITE="http://www.cairographics.org/"
#WGET_URL="http://cairographics.org/releases/$TARBALL"
WGET_URL="http://anduin.linuxfromscratch.org/BLFS/cairo/cairo-1.17.2+f93fc72c03e.tar.xz"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	patch -Np1 -i $stuff/cairo-1.10.0-buggy_gradients.patch
	patch -p1 < $stuff/cairo-1.10.0-binutils-2.34.patch
        autoreconf -fv
	./configure \
		--prefix=/usr \
 		--mandir=/usr/share/man \
		--with-html-dir=/usr/share/doc \
		--enable-xcb \
		--enable-xlib-xcb \
		--enable-tee \
		--disable-static \
 		$CONFIGURE_ARGS &&
	make $MAKEFLAGS &&
	make DESTDIR=$PWD/_pkg install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/lib
	cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
}