summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 743ddb7ce21ecaaa4e7e7620376f9ae2a87842e4 (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
# Maintainer: Nocifer <apmichalopoulos at gmail dot com>
# Contributor: Tod Jackson <tod.jackson@gmail.com>
# Contributor: tobias <tobias@archlinux.org>
# Contributor: Sarah Hay <sarah@archlinux.org>
# Contributor: JD Steffen <jd@steffennet.org>
# Contributor: GordonGR <ntheo1979@gmail.com>



_pkgbase=xvidcore
pkgname=lib32-$_pkgbase
pkgver=1.3.7
pkgrel=2
pkgdesc='XviD is an open source MPEG-4 video codec (32-bit)'
arch=('x86_64')
url='https://www.xvid.com'
license=('GPL')
depends=("$_pkgbase" 'lib32-glibc')
makedepends=('nasm' 'lib32-gcc-libs')
provides=('libxvidcore.so')
source=("https://downloads.xvid.com/downloads/${_pkgbase}-${pkgver}.tar.gz")
sha256sums=('abbdcbd39555691dd1c9b4d08f0a031376a3b211652c0d8b3b8aa9be1303ce2d')

build() {
    cd ${srcdir}/${_pkgbase}/build/generic

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

    ./configure --prefix=/usr \
                --libdir=/usr/lib32 \
                --host=x86_64-unknown-linux-gnu \
                --target=i686-unknown-linux-gnu
    make
}

package() {
    cd ${srcdir}/${_pkgbase}/build/generic

    make DESTDIR=${pkgdir} install
    rm -rf "${pkgdir}"/usr/{include,share,bin}

    #Fix dynamic libraries
    cd ${pkgdir}/usr/lib32
    ln -sf libxvidcore.so.4.3 libxvidcore.so.4
    ln -sf libxvidcore.so.4.3 libxvidcore.so
}