# Template file for 'SDL_gfx'
pkgname=SDL_gfx
version=2.0.27
revision=1
build_style=gnu-configure
hostmakedepends="automake libtool pkg-config"
makedepends="sdl12-compat-devel"
short_desc="Graphics drawing primitives for SDL"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-3-Clause"
homepage="http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/"
distfiles="http://www.ferzkopp.net/Software/SDL_gfx-${version%.*}/SDL_gfx-${version}.tar.gz"
checksum=dfb15ac5f8ce7a4952dc12d2aed9747518c5e6b335c0e31636d23f93c630f419

pre_configure() {
	autoreconf -vfi -I ${XBPS_CROSS_BASE}/usr/share/aclocal

	case "${XBPS_TARGET_MACHINE}" in
		x86_64*|i686*) configure_args+=" --enable-mmx" ;;
		*) configure_args+=" --disable-mmx" ;;
	esac
}

post_install() {
	vlicense COPYING
	vlicense LICENSE
}

SDL_gfx-devel_package() {
	depends="sdl12-compat-devel ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.a"
		vmove "usr/lib/*.so"
	}
}
