### this file is sourced not run
PKGVER=1.13.1
PKGBUILD=2 # drop bad commit patch
PKGARCH=i686

# source: BLFS svn 2016-05-26
TARBALL=libxcb-$PKGVER.tar.bz2
MD5SUM=f33cdfc67346f7217a9326c0d8679975
SRC_URL=http://xcb.freedesktop.org/dist/$TARBALL
BUNDLE=

SLACKREQ='libXau32 libXdmcp32'
SLACKDESC="libxcb32: libxcb32 $PKGVER (X11 interface library)  
libxcb32:  
libxcb32: The libxcb package provides an interface to the X Window System 
libxcb32: protocol, which replaces the current Xlib interface. Xlib can also use 
libxcb32: XCB as a transport layer, allowing software to make requests and 
libxcb32: receive responses with both.  
libxcb32: 
libxcb32: 
libxcb32: 
libxcb32: 
libxcb32:
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/libxcb* &&
	# this bad commit causes xcb crash with 'xcb out of sequence' in libX11 xcb_io.c	
	#patch -Rp1 -i ../pkg/bad-commit-f830eb93c9.patch &&
	true
}

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

### build
pkg_build() {
	CONFFLAGS="$XORG_CONFIG --docdir=/usr/share/doc/libxcb-$PKGVER \
            --enable-xinput --enable-xkb --enable-ge --without-doxygen"

	cd /tmp/libxcb*
#	sed -e "s/pthread-stubs//" -i configure.ac &&
#	autoreconf -fiv  &&	
	pkg_build_autoconf && pkg_build_slackdesc
}
