summaryrefslogtreecommitdiff
path: root/libre/mesa-demos-libre/PKGBUILD
blob: 15c7e11b9db06f0a85acb18f5368b82365029d87 (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
# $Id: PKGBUILD 213124 2014-05-19 12:03:07Z lcarlier $
# Maintainer (Arch): Jan de Groot <jgc@archlinux.org>
# Maintainer (Arch): Andreas Radke <andyrtr@archlinux.org>
# Maintainer: André Silva <emulatorman@parabola.nu>

pkgname='mesa-demos-libre'
pkgver=8.1.0
pkgrel=2
arch=('i686' 'x86_64' 'mips64el')
pkgdesc="Mesa demos and tools, without nonfree demos"
url="http://mesa3d.sourceforge.net"
license=('custom')
provides=("mesa-demos=$pkgver")
replaces=('mesa-demos')
conflicts=('mesa-demos')
depends=('libgl' 'glew')
mksource=("ftp://ftp.freedesktop.org/pub/mesa/demos/${pkgver}/mesa-demos-${pkgver}.tar.bz2")
source=("https://repo.parabolagnulinux.org/other/mesa-demos-libre/mesa-demos-libre-${pkgver}.tar.bz2"
        'LICENSE'
        'drawtex-resolve-glDrawTexfOES-extension-function.patch'
        'libre.patch')
mksha256sums=('9703fa0646b32a1e68d2abf5628f936f77bf97c69ffcaac90de380820a87a828')
sha256sums=('b0b966cc08c4fd787cf0542118e07e2fe1f1bcc3752ff7676ebb1b4f2a1b86c8'
            '7fdc119cf53c8ca65396ea73f6d10af641ba41ea1dd2bd44a824726e01c8b3f2'
            '963b3e45b2eccafea50fdab4f2fac17bd308f4c15522c00d4787b50ebb25423a'
            '476f58fc62e9074936643b0d61165c5160a6d5aed082e60c10b39d219f56913f')

mksource() {
  cd "${srcdir}/mesa-demos-${pkgver}"
  # remove nonfree demos (pointblast and spriteblast)
  rm -v src/demos/{pointblast,spriteblast}.c
}

prepare() {
  cd "${srcdir}/mesa-demos-${pkgver}"
  # merged upstream
  patch -Np1 -i ../drawtex-resolve-glDrawTexfOES-extension-function.patch
  # remove nonfree demos references (pointblast and spriteblast)
  patch -Np1 -i ../libre.patch
}

build() {
  cd "${srcdir}/mesa-demos-${pkgver}"
  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/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/"
}