# Template file for 'faad2'
pkgname=faad2
version=2.8.0
revision=1
build_style=gnu-configure
hostmakedepends="automake libtool"
short_desc="AAC decoding library"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.audiocoding.com/"
license="Freeware, GPL-2"
distfiles="${SOURCEFORGE_SITE}/faac/$pkgname-$version.tar.bz2"
checksum=4167727d69f7c8d8e4e87ceec3c9eb0a4e5e1a5187e96ab66b2b7250b871cd9e

pre_configure() {
	case "$XBPS_TARGET_MACHINE" in
		*-musl) export CFLAGS+=" -D__GNU_LIBRARY__";;
	esac
	./bootstrap
}
post_install() {
	vinstall common/mp4ff/mp4ff_int_types.h 644 usr/include
}

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