summaryrefslogtreecommitdiff
path: root/libre/mesa-demos/PKGBUILD
blob: 13c1f77d5d8781956e59c199f088fe4a9a85af40 (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
# $Id: PKGBUILD 272747 2016-07-31 08:49:09Z andyrtr $
# Maintainer (Arch): Jan de Groot <jgc@archlinux.org>
# Maintainer (Arch): Andreas Radke <andyrtr@archlinux.org>
# Maintainer: André Silva <emulatorman@parabola.nu>

pkgname='mesa-demos'
pkgver=8.3.0
pkgrel=2.parabola1
arch=('i686' 'x86_64' 'armv7h')
pkgdesc="Mesa demos and tools, without nonfree demos"
url="http://mesa3d.sourceforge.net"
license=('custom')
replaces=('mesa-demos-libre')
conflicts=('mesa-demos-libre')
depends=('libgl' 'glew' 'freeglut')
makedepends=('git')
mksource=(ftp://ftp.freedesktop.org/pub/mesa/demos/$pkgver/mesa-demos-$pkgver.tar.bz2)
source=("https://repo.parabola.nu/other/mesa-demos-libre/mesa-demos-libre-${pkgver}.tar.bz2"
        'LICENSE'
        'libre.patch')
mksha256sums=('c173154bbd0d5fb53d732471984def42fb1b14ac85fcb834138fb9518b3e0bef')
sha256sums=('c1fa461eede7c8d6a3971a0f0ad301a2b876545c1cfa6f200613b177b4e6e75e'
            '7fdc119cf53c8ca65396ea73f6d10af641ba41ea1dd2bd44a824726e01c8b3f2'
            'edef4073a3644a0fee3e5b6697eb9edde6c3a82bf3648d44819d3a1486031a53')

mksource() {
  cd mesa-demos-$pkgver

  # remove nonfree demos (pointblast and spriteblast)
  rm -v src/demos/{pointblast,spriteblast}.c
}

prepare() {
  cd mesa-demos-$pkgver

  # remove nonfree demos references (pointblast and spriteblast)
  patch -Np1 -i ../libre.patch
}

build() {
  cd mesa-demos-$pkgver
  ./configure --prefix=/usr \
    --with-system-data-files=/usr/share/mesa-demos
  make
}

package() {
  cd mesa-demos-$pkgver
  make DESTDIR="${pkgdir}" install
  install -m755 -d "${pkgdir}/usr/share/licenses/mesa-demos"
  install -m755 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-demos/"
}