#Packager: George Vlahavas <vlahavas~at~gmail~dot~com>

pkgname=libAfterImage
pkgver=1.20
pkgrel=1gv
source=("ftp://ftp.afterstep.org/stable/libAfterImage/libAfterImage-$pkgver.tar.bz2" "libAfterImage-1.18-noldconfig.patch")
url=http://www.afterstep.org/afterimage

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"libAfterImage (a generic image manipulation library)"
"libAfterImage was initially implemented to address AfterStep Window"
"Manager's needs for image handling, but it evolved into extremely"
"powerfull and flexible software, suitable for virtually any project"
"that has needs for loading, manipulating, displaying images, as well"
"as writing images in files. Most of the popular image formats are"
"supported using standard libraries, with XCF, XPM, PPM/PNM, BMP, ICO,"
"TGA and GIF being supported internally."
)


build() {
	cd $startdir/src/$pkgname-$pkgver

	sed -i "s/-O3/$CFLAGS/" configure
	patch -p1 < $startdir/src/libAfterImage-1.18-noldconfig.patch || exit 1

	./configure \
		--prefix=/usr \
		--libdir=/usr/lib${LIBDIRSUFFIX} \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--mandir=/usr/man \
		--enable-sharedlibs \
		--disable-staticlibs \
		--enable-shmimage \
		--enable-shaping \
		--enable-glx \
		--enable-mmx-optimization \
		--with-jpeg \
		--with-png \
		--with-tiff \
		--with-svg \
		--with-xpm \
		--with-builtin-gif \
		--with-ttf \
		--with-x \
		--build=$ARCH-slackware-linux  
	make || return 1
	make install DESTDIR=$startdir/pkg

	mkdir -p $startdir/pkg/usr/doc/$pkgname-$pkgver
	cp README ChangeLog $startdir/pkg/usr/doc/$pkgname-$pkgver/
}