### this file is sourced not run
PKGVER=4.0.3
PKGBUILD=1
PKGARCH=x86_64

# source: BLFS 7.5
TARBALL=tiff-$PKGVER.tar.gz
MD5SUM=051c1068e6a0627f461948c365290410 
SRC_URL=http://download.osgeo.org/libtiff/$TARBALL
BUNDLE=

SLACKREQ='freeglut libjbigkit libjpeg-turbo libX11 xz'
SLACKDESC="libtiff: libtiff $PKGVER (Library to read/write TIFF image files)  
libtiff:  
libtiff: The LibTIFF package contains the TIFF libraries and associated 
libtiff: utilities. The libraries are used by many programs for reading and 
libtiff: writing TIFF files and the utilities are used for general work with 
libtiff: TIFF files.  
libtiff: 
libtiff: 
libtiff: 
libtiff: 
libtiff: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/*tiff*
	CONFFLAGS="$CONFFLAGS --disable-static"
	sed -i '/glDrawPixels/a glFlush();' tools/tiffgt.c &&
	pkg_build_autoconf && 
	pkg_build_slackdesc &&
	
	# multilib
	mv /usr/include/tiffconf{,-64}.h &&
	cat > /usr/include/tiffconf.h << "EOF"
/* tiffconf.h - Stub Header  */
#ifndef __STUB__TIFFCONF_H__
#define __STUB__TIFFCONF_H__

#if defined(__x86_64__) || \
    defined(__sparc64__) || \
    defined(__arch64__) || \
    defined(__powerpc64__) || \
    defined (__s390x__)
# include "tiffconf-64.h"
#else
# include "tiffconf-32.h"
#endif

#endif /* __STUB__TIFFCONF_H__ */
EOF
}
