summaryrefslogtreecommitdiffstats
path: root/abs/extra/snes9x/PKGBUILD
blob: a38ac44b7c8fec39ce554887fde664402e253d08 (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
60
61
# $Id$
# Maintainer: Eric BĂ©langer <eric@archlinux.org>

pkgbase=snes9x
pkgname=('snes9x' 'snes9x-gtk')
pkgver=1.53
pkgrel=8
arch=('i686' 'x86_64')
url="https://code.google.com/p/snes9x-gtk/"
license=('custom')
makedepends=('intltool' 'nasm' 'mesa' 'libpng' 'sdl' 'gtk2' 'libxv'
             'desktop-file-utils')
source=(http://snes9x-gtk.googlecode.com/files/${pkgbase}-${pkgver}-src.tar.bz2
        snes9x-gtk2.24.diff.gz snes9x-fix-crash.patch)
sha1sums=('57be6480369f66b9aaaeb722789ce114f58ed1e2'
          '680dbe0a70f1821bc7931539e72f5a1a95e3938c'
          '995495c68ffc00d8266d10a7bd8fc74fb6c147b1')

prepare() {
  cd ${pkgbase}-${pkgver}-src
  patch -p1 -i "${srcdir}/snes9x-gtk2.24.diff"
  patch -p1 -i "${srcdir}/snes9x-fix-crash.patch"
}

build() {
  cd ${pkgbase}-${pkgver}-src/unix
  ./configure --prefix=/usr --with-sdd1-decomp --enable-netplay
  make

  cd ../gtk
  ./configure --prefix=/usr --with-sdd1-decomp --with-netplay --with-opengl
  make
}

package_snes9x() {
  pkgdesc="A portable Emulator for the Super Nintendo Entertainment System"
  depends=('libpng' 'libxext' 'libsm')

  cd ${pkgbase}-${pkgver}-src/unix
  install -D -m755 snes9x "${pkgdir}/usr/bin/snes9x"
  install -d "${pkgdir}/usr/share/doc/${pkgname}"
  install -D -m644 ../docs/{snes9x.conf.default,{control-inputs,controls,snapshots}.txt} \
    "${pkgdir}/usr/share/doc/${pkgname}/"
  install -D -m644 "${srcdir}/${pkgbase}-${pkgver}-src/docs/snes9x-license.txt" \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_snes9x-gtk() {
  pkgdesc="A portable Emulator for the Super Nintendo Entertainment System - GTK version"
  license=('custom' 'LGPL')
  depends=('sdl' 'libpulse' 'gtk2' 'libxv' 'desktop-file-utils' 'gnome-icon-theme')
  install=snes9x-gtk.install

  cd ${pkgbase}-${pkgver}-src/gtk
  make DESTDIR="${pkgdir}" install
  install -d "${pkgdir}/usr/share/doc/${pkgname}"
  install -D -m644 ../docs/{snes9x.conf.default,{control-inputs,controls,snapshots}.txt} \
    "${pkgdir}/usr/share/doc/${pkgname}/"
  install -D -m644 "${srcdir}/${pkgbase}-${pkgver}-src/docs/snes9x-license.txt" \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}