name=imlib2
version=1.12.5
release=2
desc="Image loading and rendering library"
url="https://docs.enlightenment.org/api/imlib2/html/"
license="Imlib2"
depend="libx11 libpng libjpeg-turbo freetype"
makedepend=""
source="https://downloads.sourceforge.net/enlightenment/imlib2-1.12.5.tar.gz"
sha256="SKIP"

build() {
	cd "imlib2-1.12.5"
	[ -x ./configure ] || autoreconf -fi
	_opts="--prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --without-svg"
	_help=$(./configure --help 2>/dev/null)
	case "$_help" in *--disable-static*)  _opts="$_opts --disable-static" ;; esac
	case "$_help" in *--disable-nls*)     _opts="$_opts --disable-nls" ;; esac
	case "$_help" in *--disable-dependency-tracking*) _opts="$_opts --disable-dependency-tracking" ;; esac
	./configure $_opts
	gmake -j"$JOBS"
}

package() {
	cd "imlib2-1.12.5"
	gmake -j1 DESTDIR="$pkgdir" install
}
