summaryrefslogtreecommitdiffstats
path: root/main/lame/APKBUILD
blob: aaa9e533ff9f4d95c8a52e7ebf228f3f0c4b38b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lame
pkgver=3.99.4
_ver=${pkgver%.*}
pkgrel=0
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/project/lame/lame/$_ver/lame-$pkgver.tar.gz"

_builddir="$srcdir"/$pkgname-$pkgver

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

	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="e54d7847bfd01f18d56c07e65147d75a  lame-3.99.4.tar.gz"