summaryrefslogtreecommitdiff
path: root/community/gens-gs/PKGBUILD
blob: 27ebfa3e6c3ebe7466045d41dbed266fe3689024 (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
62
# $Id: PKGBUILD 86824 2013-03-22 13:05:22Z alucryd $
# Maintainer: Maxime Gauduin <alucryd@gmail.com>
# Contributor: trya <tryagainprod@gmail.com>
# Contributor: Yvan <madridista40@orange.fr>

pkgname=gens-gs
pkgver=2.16.7
pkgrel=2
pkgdesc="An emulator of Sega Genesis, Sega CD and 32X, combining features from various forks of Gens"
arch=('i686' 'x86_64')
url="http://segaretro.org/Gens/GS"
license=('GPL')
if [[ $CARCH == "x86_64" ]]; then
  makedepends=('gcc-multilib' 'lib32-gtk2' 'lib32-mesa-libgl' 'lib32-sdl' 'nasm')
  optdepends=('lib32-alsa-plugins: Sound support for PulseAudio'
              'lib32-libpulse: Sound support for PulseAudio')
else
  depends=('gtk2' 'sdl')
  makedepends=('nasm')
fi
conflicts=('gens')
options=('!libtool')
source=('http://segaretro.org/images/6/6d/Gens-gs-r7.tar.gz'
        'gens-gtk.patch')
sha256sums=('6320cd7bee85472891e1e29b21731d2c8180d04db67ee21256491f3f9ad145c1'
            '29b1e9755b34e00ef7d19bdc527dc4f841400a0022c81ee71c331be4a76a6c1c')

build() {
  cd "${srcdir}"/${pkgname}-r7

# Patch
  patch -Np1 -i ../gens-gtk.patch

# Multilib
  if [[ $CARCH == "x86_64" ]]; then
    export CC="gcc -m32"
    export CXX="g++ -m32"
    export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
  fi

# Build
  if [[ $CARCH == "x86_64" ]]; then
    ./configure --host=i686-unknown-linux-gnu --prefix=/usr --libdir=/usr/lib32 --with-pic --disable-static
  else
    LIBS='-ldl -lX11' ./configure --prefix=/usr --with-pic --disable-static
  fi
  make
}

package() {
  cd "${srcdir}"/${pkgname}-r7

# Multilib
  if [[ $CARCH == "x86_64" ]]; then
    depends=('lib32-gtk2' 'lib32-sdl')
  fi

# Install
  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et: