summaryrefslogtreecommitdiff
path: root/libre/lib32-mesa-demos-libre/PKGBUILD
blob: 1719f138dfe239164055798c6851d51daf45bd6d (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
# $Id: PKGBUILD 94667 2010-10-09 11:21:35Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Maintainer (Parabola): André Silva <emulatorman@lavabit.com>

_pkgbasename=mesa-demos-libre
pkgname=lib32-$_pkgbasename
pkgver=8.0.1
pkgrel=2
arch=(x86_64)
pkgdesc="Mesa demos and tools (32-bit), libre"
url="http://mesa3d.sourceforge.net"
license=('custom')
depends=('lib32-glew>=1.5.6' mesa-demos-libre)
provides=("lib32-mesa-demos=$pkgver")
replaces=('lib32-mesa-demos')
conflicts=('lib32-mesa-demos')
makedepends=(gcc-multilib)
source=(ftp://ftp.freedesktop.org/pub/mesa/demos/${pkgver}/mesa-demos-${pkgver}.tar.bz2
        mesa-demos-libre.patch)
md5sums=('320c2a4b6edc6faba35d9cb1e2a30bf4'
         '1858e95d40ac9e5e0b59753ce9e673e3')

build() {
  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  cd "${srcdir}/mesa-demos-${pkgver}"
  patch -Np1 -i "${srcdir}/mesa-demos-libre.patch"
  ./configure --prefix=/usr
  make
}

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

  for i in "$pkgdir/usr/bin/"*; do
    mv "$i" "$i"32
  done

  mkdir -p "$pkgdir/usr/share/licenses"
  ln -s mesa-demos "$pkgdir/usr/share/licenses/lib32-mesa-demos"
}