summaryrefslogtreecommitdiff
path: root/pcr/yabause-git/PKGBUILD
blob: be35af75e278824e7a0bb36c89e5809f7980555b (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
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
pkgname=yabause-git
pkgver=20130301
pkgrel=1
pkgdesc="A Sega Saturn emulator (GIT version)"
arch=('x86_64' 'i686')
url="http://yabause.org/"
license=('GPL')
conflicts=('yabause')
provides=('yabause')
depends=('mini18n-git' 'openal' 'sdl' 'freeglut')
makedepends=('git' 'cmake' 'mesa' 'glu')

#Enable QT4 or GTK
#_port=gtk
_port=qt4

[ "${_port}" = "qt4" ] && depends+=('qt4')
[ "${_port}" = "gtk" ] && depends+=('gtkglext')

_gitroot="git://github.com/Guillaumito/yabause.git"
_gitname="yabause"

build() {
  cd "${srcdir}"
  msg "Connecting to GIT server...."

  if [ -d "${_gitname}" ]; then
    cd "${_gitname}" && git pull
    msg "The local files are updated."
  else
    git clone --depth=1 "${_gitroot}" "${_gitname}"
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting build..."

  rm -rf "${srcdir}/${_gitname}-build"
  cp -R "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
  cd "${srcdir}/${_gitname}-build/${_gitname}"

  LDFLAGS+=",-z,noexecstack"
  cmake . -DCMAKE_INSTALL_PREFIX=/usr -DYAB_PORTS="${_port}" -DYAB_NETWORK=ON -DYAB_OPTIMIZED_DMA=ON -DYAB_PERKEYNAME=ON
  make
}

package() {
  cd "${srcdir}/${_gitname}-build/${_gitname}"
  make DESTDIR="${pkgdir}/" install
}