summaryrefslogtreecommitdiff
path: root/libre/mesa-demos/PKGBUILD
blob: 5e5dac882f6176c7a8eb924d76361bfad4c75698 (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
# $Id: PKGBUILD 247877 2015-09-29 06:16:50Z foutrelis $
# 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.2.0
pkgrel=5.parabola1
arch=('i686' 'x86_64')
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=("$pkgname::git://anongit.freedesktop.org/mesa/demos#tag=$pkgname-$pkgver")
source=("https://repo.parabola.nu/other/mesa-demos-libre/mesa-demos-libre-${pkgver}.tar.bz2"
        'LICENSE'
        'libre.patch')
mksha256sums=('SKIP')
sha256sums=('425432b7792e7bb007cd8a7ead5b29da986b5b35aa3fb27dcd3c63e24e3fd372'
            '7fdc119cf53c8ca65396ea73f6d10af641ba41ea1dd2bd44a824726e01c8b3f2'
            '0d1222cb515425763292e4da77a839bf1961e7815302efd712e4d16fe5a90bb6')

mksource() {
  cd mesa-demos

  # https://bugs.freedesktop.org/show_bug.cgi?id=91643
  git cherry-pick -n 6f7ad3f24294 74443c6ee79f

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

prepare() {
  cd mesa-demos

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

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

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