# Maintainer: Natanael Copa pkgname=lame pkgver=3.99.5 _ver=${pkgver%.*} pkgrel=0 pkgdesc="An MP3 encoder and graphical frame analyzer" url="http://lame.sourceforge.net/" arch="all" license="LGPL2+" subpackages="$pkgname-dev $pkgname-doc" depends= makedepends="nasm ncurses-dev autoconf automake libtool" source="http://downloads.sourceforge.net/project/lame/lame/$_ver/lame-$pkgver.tar.gz lame-automake-1.12.patch" _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done # link fronted shared sed -i -e 's/\(^LDFLAGS.*\)-static/\1/g' frontend/Makefile.am # fix for parallel builds mkdir -p libmp3lame/i386/.libs # fix for pic build with new nasm sed -i -e '/define sp/s/+/ + /g' libmp3lame/i386/nasm.h || return 1 aclocal && automake --add-missing || return 1 } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --enable-nasm \ --disable-mp3x \ --enable-shared \ --with-pic \ || return 1 make || return 1 } package() { local _textrels= cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 rm "$pkgdir"/usr/lib/*.la _textrels=$(scanelf -q -Rt "$pkgdir") if [ -n "$_textrels" ]; then error "Textrels found:" echo "$_textrels" return 1 fi } md5sums="84835b313d4a8b68f5349816d33e07ce lame-3.99.5.tar.gz 54814745b84480da3b643582f2e5b485 lame-automake-1.12.patch"