summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1973baa85785e34e0f80d57a3b77492287f9ca40 (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
# Maintainer: Rodrigo Bezerra <rodrigobezerra21 at gmail dot com>
# Contributor: GordonGR <ntheo1979@gmail.com>
# Contributor: Thomas Baechler <thomas@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>

_basename=a52dec
pkgname=lib32-a52dec
pkgver=0.7.4
pkgrel=10
pkgdesc="A free library for decoding ATSC A/52 streams (32-bit)"
url="https://liba52.sourceforge.io/"
arch=('x86_64')
license=('GPL2')
depends=('lib32-glibc' a52dec)
source=("http://liba52.sourceforge.net/files/${_basename}-${pkgver}.tar.gz"
        'a52dec-0.7.4-build.patch'
        'stderr.patch')
md5sums=('caa9f5bc44232dc8aeea773fea56be80'
         'fa16f224a7dceb7613824380abef0052'
         '52f57e003259a24516eaab08b64ae703')

prepare() {
    cd "${_basename}-${pkgver}"

    patch -Np1 -i ../a52dec-0.7.4-build.patch
    patch -Np1 -i ../stderr.patch
    sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.in
    mv configure.in configure.ac

    ./bootstrap
}

build() {
     cd ${_basename}-${pkgver}

    export CC='gcc -m32'
    export CXX='g++ -m32'
    export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'

    ./configure \
        --prefix=/usr \
        --libdir=/usr/lib32 \
        --enable-shared

    make
}

package() {
    cd ${_basename}-${pkgver}

    make DESTDIR="${pkgdir}" install

    rm -rf "${pkgdir}"/usr/{include,bin,share}
}