summaryrefslogtreecommitdiff
path: root/libre/mesa-demos/PKGBUILD
blob: 308c78eb96b913422b05b2956099ad76af99bd20 (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
# $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 (Hyperbola): André Silva <emulatorman@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

pkgname='mesa-demos'
pkgver=8.4.0
pkgrel=1.parabola1
arch=('i686' 'x86_64' 'armv7h')
pkgdesc="Mesa demos and tools incl. glxinfo + glxgears, without nonfree demos"
url="https://www.mesa3d.org/"
license=('custom')
replaces=('mesa-demos-libre')
conflicts=('mesa-demos-libre')
depends=('libgl' 'glew' 'freeglut')
makedepends=('mesa' 'freetype2' 'git')
mksource=(https://mesa.freedesktop.org/archive/demos/mesa-demos-$pkgver.tar.bz2{,.sig})
source=("https://repo.parabola.nu/other/mesa-demos-libre/mesa-demos-libre-${pkgver}.tar.bz2"
        'LICENSE'
        'libre.patch')
mksha512sums=('b72d03cad36e0535ff18dcfb222ec4200064b9264f6da51a6e5f03b0dd912abe188bc1d600b6698de3ce6f63b28d2ce01565886ca8e7079edc4967fbf2fb0957'
              'SKIP')
sha512sums=('0f8c5463ea564c21df34cba64e911d435012bcc36f13eeba6d89c02ef514e19330d10f36348fec63add011b60b75e0ad6ad277e72d55c029ae1999906d71d607'
            '25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2'
            'f4fe1f087554af180962a32df4d8ba4616db292ff82bccf4930115616290e59c15364bac75fb4b9fd82b642be2c9e760dc9bcb27c58a4ea6239382105b4383de')
validpgpkeys=('E390B9700582FAEA959ACAD41EEF53D38A3A9C67') # "Andreas Boll <andreas.boll.dev@gmail.com>"

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

  # add missing egl files
  install -m 0755 src/egl/opengl/{eglgears_x11,eglinfo,eglkms,egltri_x11,peglgears,xeglgears,xeglthreads} "${pkgdir}/usr/bin"

  install -m755 -d "${pkgdir}/usr/share/licenses/mesa-demos"
  install -m755 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-demos/"
}