aboutsummaryrefslogtreecommitdiffstats
path: root/main/lame/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/lame/APKBUILD')
-rw-r--r--main/lame/APKBUILD62
1 files changed, 62 insertions, 0 deletions
diff --git a/main/lame/APKBUILD b/main/lame/APKBUILD
new file mode 100644
index 0000000000..cffb7502ed
--- /dev/null
+++ b/main/lame/APKBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lame
+pkgver=3.98.4
+_ver=398-2
+pkgrel=4
+pkgdesc="An MP3 encoder and graphical frame analyzer"
+url="http://lame.sourceforge.net/"
+arch="all"
+license="LGPL"
+subpackages="$pkgname-dev $pkgname-doc"
+depends=
+makedepends="nasm ncurses-dev autoconf automake libtool"
+source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-398-2.tar.gz
+ lame-3.98.2-ffmpeg-0.5.patch"
+
+_builddir="$srcdir"/$pkgname-$_ver
+
+prepare() {
+ cd "$_builddir"
+
+ # 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
+
+ # Fix for ffmpeg.
+ # https://bugs.gentoo.org/show_bug.cgi?id=265830
+ patch -p1 < ../lame-3.98.2-ffmpeg-0.5.patch || return 1
+
+ aclocal && automake || return 1
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --enable-nasm \
+ --disable-mp3x \
+ --enable-shared \
+ --with-pic
+
+ 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="719dae0ee675d0c16e0e89952930ed35 lame-398-2.tar.gz
+e84a65409b0512045edd147524ba3ad4 lame-3.98.2-ffmpeg-0.5.patch"