summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 98d5dde8f4fe88aa8230dc682d2dae901d4cd7d0 (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
# Maintainer: trya <tryagainprod@gmail.com>

pkgname=mupen64plus-extraplugins
pkgver=2.0
pkgrel=3
pkgdesc="Additional plugins for Mupen64Plus"
arch=('i686' 'x86_64')
url="http://code.google.com/p/mupen64plus"
license=('GPL')
depends=('glew' 'mesa' "mupen64plus>=$pkgver")
options=(!strip)
source=("https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mupen64plus/mupen64plus-extraplugins-src-2.0.0.tar.gz")
md5sums=('7716f17a3988e95ffcec27f0c05810c0')

prepare() {
  # patch GLEW headers inclusion
  cd "$srcdir/mupen64plus-video-z64/src"
  sed -i rgl.h \
      -i glshader.cpp \
      -e 's|#include <glew.h>|#include <GL/glew.h>|'

  # patch min/max macros
  cd "$srcdir/mupen64plus-video-glide64/src"
  sed -i *.cpp *.h \
      -e 's|min[[:blank:]]*(|glide_min(|g' \
      -e 's|max[[:blank:]]*(|glide_max(|g'
}

build() {
  cd "$srcdir"
  for _plugdir in mupen64plus-rsp* mupen64plus-video*; do
    cd $_plugdir
    make -C projects/unix PREFIX=/usr all
    cd ..
  done
}

package() {
  cd "$srcdir"
  for _plugdir in mupen64plus-rsp* mupen64plus-video*; do
    cd $_plugdir
    make -C projects/unix PREFIX=/usr DESTDIR="$pkgdir" install
    cd ..
  done
}