summaryrefslogtreecommitdiff
path: root/extra/libmad/PKGBUILD
blob: 7d32f39a94e054f9070ca960dd9c343d00350c09 (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
# $Id: PKGBUILD 149402 2012-02-07 14:56:23Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=libmad
pkgver=0.15.1b
pkgrel=6
pkgdesc="A high-quality MPEG audio decoder"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.underbit.com/products/mad/"
license=('GPL')
depends=('glibc')
options=('!libtool')
source=(http://downloads.sourceforge.net/sourceforge/mad/${pkgname}-${pkgver}.tar.gz{,.sign}
        libmad.patch amd64-64bit.diff frame_length.diff optimize.diff)
sha1sums=('cac19cd00e1a907f3150cc040ccc077783496d76'
          '24c44ac7c96dca472e7305a7e59f1efd921a3499'
          '5e7369c77de2329f6542ffc4f633eec5a5245091'
          '97eba307b3343d5ba8938d59ec8f2c4b7449ae17'
          'b9c61ecacc6a6d47425d66f33327e0634cd8a33c'
          '3d5b958244ef0395ccdcb00344f2cf301ca07e34')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p1 -i "${srcdir}/libmad.patch"
  patch -p1 -i "${srcdir}/amd64-64bit.diff"
  patch -p1 -i "${srcdir}/frame_length.diff"
  patch -p1 -i "${srcdir}/optimize.diff"
  CFLAGS="$CFLAGS -ftree-vectorize -ftree-vectorizer-verbose=1"
  autoconf
  ./configure --prefix=/usr --enable-fpm=default
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}