summaryrefslogtreecommitdiff
path: root/pcr/reicast-git/PKGBUILD
blob: 758f0cf0a2550400178c8c49ae5e284e22373c77 (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
# Maintainer (Arch): carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
# Maintainer: André Silva <emulatorman@parabola.nu>
# Maintainer: Márcio Silva <coadde@parabola.nu>

pkgname=reicast-git
pkgver=r1651.56f8ffa
pkgrel=1
pkgdesc="A multiplatform Sega Dreamcast emulator"
arch=('i686' 'x86_64')
url="http://reicast.com/"
license=('GPL2')
provides=('reicast')
conflicts=('reicast')
conflicts_x86_64+=('reicast-multilib' 'reicast-multilib-git')
replaces_x86_64=('reicast-multilib' 'reicast-multilib-git')
makedepends=('git')
depends=('libgl' 'alsa-plugins' 'libpulse' 'python-evdev' )
optdepends=('xboxdrv: Userspace gamepad driver for Xbox and Xbox360 gamepads')
source=(reicast::"git+https://github.com/reicast/reicast-emulator.git"
        'enable_multiplayer_support.patch')
sha256sums=('SKIP'
            '12bfc58e12b3ee79b0c82159cdc70c76a4b6804f5c6986853156602bb0e6beb0')

pkgver() {
  cd reicast
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare () {
  cd reicast

  # Remove nonfree fp.h header
  rm -v core/deps/libpng/fp.h

  # Add Multiplayer support
  patch -Np1 -i "$srcdir"/enable_multiplayer_support.patch

  # Add experimental shadow support: http://github.com/reicast-emulator/issues/94
  sed -i 's|//DrawModVols|DrawModVols|' core/rend/gles/gldraw.cpp

  # Fix Xbox Input Axis
  sed -i 's|DC_AXIS_LT, 0, 0, DC_AXIS_RT|0, 0, DC_AXIS_RT, DC_AXIS_LT|' core/linux-dist/joystick.cpp

  # Enable Pulseaudio
  sed -i 's|#USE_PULSEAUDIO|USE_PULSEAUDIO|' shell/linux/Makefile
}

build () {
  make -C reicast/shell/linux
}

package () {
  cd reicast

  make -C shell/linux PREFIX=/usr DESTDIR=$pkgdir install

  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}