aboutsummaryrefslogtreecommitdiffstats
path: root/main/libmad/APKBUILD
blob: 05bd1f02aa2ff0438bafb4ed06354342725052f9 (plain) (blame)
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
57
58
59
60
61
62
63
64
65
# Contributor: Sebastian Wicki <gandro@gmx.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libmad
pkgver=0.15.1b
pkgrel=9
pkgdesc="A high-quality MPEG audio decoder"
url="http://www.underbit.com/products/mad/"
arch="all"
options="!check"  # No test suite.
license="GPL-2.0-or-later"
subpackages="$pkgname-dev"
depends=
makedepends="autoconf automake libtool"
source="https://downloads.sourceforge.net/sourceforge/mad/$pkgname-$pkgver.tar.gz
	libmad-0.15.1b-cflags-O2.patch
	libmad-0.15.1b-cflags.patch
	automake.patch
	libmad.thumb.patch
	Provide-Thumb-2-alternative-code-for-MAD_F_MLN.patch
	length-check.patch
	md_size.patch
	mad.pc
	"

# secfixes:
#   0.15.1b-r9:
#     - CVE-2017-8372
#     - CVE-2017-8373
#     - CVE-2017-8374

prepare() {
	cd "$builddir"
	update_config_sub
	default_prepare
	libtoolize --force && aclocal -I m4 && autoconf \
		&& automake --add-missing --foreign
}

build() {
	cd "$builddir"
	case "$CARCH" in mips*) _enable_fpm_64bit="--enable-fpm=64bit";; esac
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		$_enable_fpm_64bit \
		--enable-accuracy

	make -j1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -D -m644 "$srcdir"/mad.pc "$pkgdir"/usr/lib/pkgconfig/mad.pc
}
sha512sums="2cad30347fb310dc605c46bacd9da117f447a5cabedd8fefdb24ab5de641429e5ec5ce8af7aefa6a75a3f545d3adfa255e3fa0a2d50971f76bc0c4fc0400cc45  libmad-0.15.1b.tar.gz
13a8bac30cea4861f903b4abc8673f9a35b6253aae6a02915f99b67e5e8c56460fc1fb059a0aa52143b665f888928baba098daf0ed022420e46317be4dbc6161  libmad-0.15.1b-cflags-O2.patch
01dc8421dba2b652aa8ca6d1f1a5c310645465b18190ebfdeaae516de881869957e8e7c0c373d0d09623da33719d01e028f2f6164790b54c43a71271f5b4dbba  libmad-0.15.1b-cflags.patch
e73ec5ae3b14e8d45579b52bcc561a309b85e1e51d946e061e2f0a9252f515e48e2d818e8bdce1adf5a9801ec314be8c911914d0bb12f9113a7afc54cf385250  automake.patch
82c7e89433ceee2c9e48fc8930ea591f722b48e0a928721322a15c15e5c6a018c013d45deae583c4e583591a4cb9de50d0b2bd2ff76e18da3198609e8ea5cb33  libmad.thumb.patch
9e9af20050c922c1c2f0b55009ae0eb20c9381eaff071f0dfee8a7b3a357e58f835f69364beb99820f5672459d88ac483d2419e1f9532d763779aafad7cbf72b  Provide-Thumb-2-alternative-code-for-MAD_F_MLN.patch
dd412962246d4c9db8c07dbafcaba2f64fdc0c94cf6bcc3f4f0f88a92800f40e550cc56dc8a2324c0123d9c70a89055dc50cd714206d7886e2f6877d4cc26600  length-check.patch
511fc4496044bc676e1957c5085aded89e33248c5ee4c965c76c609904086911dcc912a943be98244b2d7e5f140f432584722cc3b53fdb27265328322a727427  md_size.patch
ec0b14bd0c6236a216107b507b92c06e295352f1657ba5e45f37fff220a73e1454b262ac36fc715d698c4ffd210d348fca71cf0198e2c49d16fe0ec5ea839f08  mad.pc"