SUMMARY="X C-language Bindings library"
DESCRIPTION="
The X11 C-language Bindings library.
"
HOMEPAGE="http://xcb.freedesktop.org/" 
SOURCE_URI="http://xcb.freedesktop.org/dist/libxcb-1.6.tar.gz"
CHECKSUM_SHA256="df93b7d5afb0f970c73294636dc8cbc08f59bd39239cac4e6e0a46792ae7b759"
REVISION="2"
COPYRIGHT="2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett.
All Rights Reserved."
LICENSE="MIT (no promotion)"

ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"

PROVIDES="
	libxcb$secondaryArchSuffix = $portVersion
	lib:libxcb$secondaryArchSuffix = $portVersion
	devel:libxcb$secondaryArchSuffix = $portVersion
	lib:libxcb_composite$secondaryArchSuffix
	lib:libxcb_damage$secondaryArchSuffix
	lib:libxcb_dpms$secondaryArchSuffix
	lib:libxcb_dri2$secondaryArchSuffix
	lib:libxcb_glx$secondaryArchSuffix
	lib:libxcb_randr$secondaryArchSuffix
	lib:libxcb_record$secondaryArchSuffix
	lib:libxcb_render$secondaryArchSuffix
	lib:libxcb_res$secondaryArchSuffix
	lib:libxcb_screensaver$secondaryArchSuffix
	lib:libxcb_shape$secondaryArchSuffix
	lib:libxcb_shm$secondaryArchSuffix
	lib:libxcb_sync$secondaryArchSuffix
	lib:libxcb_xevie$secondaryArchSuffix
	lib:libxcb_xf86dri$secondaryArchSuffix
	lib:libxcb_xfixes$secondaryArchSuffix
	lib:libxcb_xinerama$secondaryArchSuffix
	lib:libxcb_xprint$secondaryArchSuffix
	lib:libxcb_xtest$secondaryArchSuffix
	lib:libxcb_xv$secondaryArchSuffix
	lib:libxcb_xvmc$secondaryArchSuffix
	devel:libxcb_composite$secondaryArchSuffix
	devel:libxcb_damage$secondaryArchSuffix
	devel:libxcb_dpms$secondaryArchSuffix
	devel:libxcb_dri2$secondaryArchSuffix
	devel:libxcb_glx$secondaryArchSuffix
	devel:libxcb_randr$secondaryArchSuffix
	devel:libxcb_record$secondaryArchSuffix
	devel:libxcb_render$secondaryArchSuffix
	devel:libxcb_res$secondaryArchSuffix
	devel:libxcb_screensaver$secondaryArchSuffix
	devel:libxcb_shape$secondaryArchSuffix
	devel:libxcb_shm$secondaryArchSuffix
	devel:libxcb_sync$secondaryArchSuffix
	devel:libxcb_xevie$secondaryArchSuffix
	devel:libxcb_xf86dri$secondaryArchSuffix
	devel:libxcb_xfixes$secondaryArchSuffix
	devel:libxcb_xinerama$secondaryArchSuffix
	devel:libxcb_xprint$secondaryArchSuffix
	devel:libxcb_xtest$secondaryArchSuffix
	devel:libxcb_xv$secondaryArchSuffix
	devel:libxcb_xvmc$secondaryArchSuffix
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libxslt >= 1.1.26
	lib:libxau$secondaryArchSuffix >= 1.0.5
	"

BUILD_REQUIRES="
	devel:libxslt >= 1.1.26
	devel:xcb_proto >= 1.6
	devel:libpthread_stubs$secondaryArchSuffix >= 0.3
	devel:libxau$secondaryArchSuffix >= 1.0.5
	"

BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:util_macros$secondaryArchSuffix
	cmd:autoconf
	cmd:doxygen
	cmd:libtool
	cmd:aclocal
	cmd:make
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:pkg_config$secondaryArchSuffix
	cmd:python
	"

PATCHES="libxcb-1.6.patch"

BUILD()
{
	libtoolize --force --copy --install
	./autogen.sh -V
	runConfigure ./configure
}

INSTALL()
{
	make install
	prepareInstalledDevelLibs libxcb \
		libxcb-composite \
		libxcb-damage \
		libxcb-dpms \
		libxcb-dri2 \
		libxcb-glx \
		libxcb-randr \
		libxcb-record \
		libxcb-render \
		libxcb-res \
		libxcb-screensaver \
		libxcb-shape \
		libxcb-shm \
		libxcb-sync \
		libxcb-xevie \
		libxcb-xf86dri \
		libxcb-xfixes \
		libxcb-xinerama \
		libxcb-xprint \
		libxcb-xtest \
		libxcb-xv \
		libxcb-xvmc
	fixPkgconfig
}
