# Template file for 'lame'
pkgname=lame
version=4.0
revision=1
build_style=gnu-configure
configure_args="--enable-nasm --enable-shared"
hostmakedepends="nasm pkg-config"
makedepends="ncurses-devel mpg123-devel"
short_desc="Fast, high quality MP3 encoder"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://lame.sourceforge.io/"
changelog="https://svn.code.sf.net/p/lame/svn/trunk/lame/doc/html/history.html"
distfiles="${SOURCEFORGE_SITE}/lame/lame-${version}.tar.gz"
checksum=3df5124d5ad3a98312ffd7ba6a9b36230e4f8a3e66d3ce0f425e336c32d216eb

CFLAGS="-Wno-implicit-function-declaration -Wno-incompatible-pointer-types"

pre_configure() {
	if [ "${XBPS_TARGET_MACHINE%%-musl}" = "i686" ]; then
		CFLAGS+=" -msse"
	fi
}

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