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

# source: james
TARBALL=libgd-$PKGVER.tar.xz
MD5SUM=9076f3abd1f9815d106da36467ea15bc
SRC_URL=https://bitbucket.org/libgd/gd-libgd/downloads/$TARBALL
BUNDLE=

SLACKREQ='libpng freetype2 fontconfig libjpeg-turbo libXpm libvpx libtiff' # 
SLACKDESC="libgd: libgd $PKGVER (Graphics library)  
libgd:  
libgd: GD is an open source code library for the dynamic creation of images by 
libgd: programmers. GD is written in C, and wrappers are available for Perl, 
libgd: PHP and other languages. GD creates PNG, JPEG, GIF, WebP, XPM, BMP 
libgd: images, among other formats. GD is commonly used to generate charts, 
libgd: graphics, thumbnails, and most anything else, on the fly. While not 
libgd: restricted to use on the web, the most common applications of GD 
libgd: involve website development.  
libgd: 
libgd:
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/libgd* &&
	patch -Np1 -i ../pkg/libvpx2.patch
}

### default pkg_package
### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --disable-static"
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	
	# multi-lib
	mv -v /usr/bin/gdlib-config{,-64} &&
	ln -sfv multiarch_wrapper /usr/bin/gdlib-config
}
