summaryrefslogtreecommitdiff
path: root/pcr/reicast-multilib-git/PKGBUILD
blob: e2663fdb37dbf4643c1cdc1dc47b8cfa3b50704d (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
# 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-multilib-git
pkgver=r1651.56f8ffa
pkgrel=2
pkgdesc="A multiplatform Sega Dreamcast emulator"
arch=('x86_64')
url="http://reicast.com/"
license=('GPL2')
provides=('reicast')
conflicts=('reicast')
makedepends=('git' 'gcc-multilib')
depends=('lib32-libgl' 'lib32-alsa-plugins' 'lib32-libpulse' 'python-evdev' )
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 () {
  mkdir -vm 0755 "$srcdir"/pkgbuild-dir
  linux32 make -C reicast/shell/linux PREFIX=/usr DESTDIR="$srcdir"/pkgbuild-dir install
}

package () {
  cp -va "$srcdir"/pkgbuild-dir/* "$pkgdir"
  install -Dm 644 reicast/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}