summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c2feef36f2637ec62fe82e3d3def049ba8720660 (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
57
58
59
60
61
62
63
64
65
66
# Maintainer:  Vincent Grande <shoober420@gmail.com>
# Contributor: Chocobo1 <chocobo1 AT archlinux DOT net>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Nicky726 <nicky726@gmail.com>
# Contributor: Tom Killian <tom@archlinux.org>
# Contributor: Rémy Oudompheng <remyoudompheng@gmail.com>

pkgname=lib32-libtheora-git
pkgver=1.1.1
pkgrel=1
pkgdesc='An open video codec developed by the Xiph.org'
arch=(x86_64)
url=https://www.xiph.org
license=(BSD)
depends=(
  lib32-libogg
  libtheora
)
makedepends=(
  git
  lib32-libvorbis
)
provides=(lib32-libtheora)
conflicts=(lib32-libtheora)
source=("git+https://gitlab.xiph.org/xiph/theora.git")
sha256sums=(SKIP)

pkgver() {
  cd theora
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd theora

  sed 's/AC_DEFINE(\[OC_X86_64_ASM\]/#AC_DEFINE(\[OC_X86_64_ASM\]/
       s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' -i configure.ac
}

build() {
  cd theora

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

  ./autogen.sh
  ./configure \
    --prefix='/usr' \
    --libdir='/usr/lib32' \
    --disable-examples \
    --disable-static
  make
}

package() {
  cd theora

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

  install -dm 755 "${pkgdir}"/usr/share/licenses
  ln -s libtheora "${pkgdir}"/usr/share/licenses/lib32-libtheora
}

# vim: ts=2 sw=2 et: