summaryrefslogtreecommitdiff
path: root/community/gemrb/PKGBUILD
blob: cbef891ce1a97f9b0364a77cf7dce3461dce9e00 (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
# $Id: PKGBUILD 113432 2014-06-22 19:07:16Z stativ $
# Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com>
pkgname=gemrb
pkgver=0.8.1
pkgrel=1
pkgdesc="OSS implementation of Bioware's Infinity Engine which supports eg. Baldur's Gate"
arch=('i686' 'x86_64')
url="http://www.gemrb.org/"
license=('GPL')
depends=('python2' 'openal' 'libpng' 'sdl_mixer' 'freetype2')
# optionally it is possible to build vlc plugin too
# for future reference: there is also and experimental SDL2/OpenGL renderer
makedepends=('cmake')
# i686 build breaks because of the stack protector
[ $CARCH=="i686" ] && options=('!buildflags')
install=gemrb.install
source=("http://downloads.sourceforge.net/sourceforge/gemrb/$pkgname-$pkgver.tar.gz")
md5sums=('5e7d727f336caf91657375595982c063')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  if [ ! -d "$srcdir/build" ] ; then
    mkdir "$srcdir/build"
  fi
  cd "$srcdir/build"

  cmake -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=Release \
        ../$pkgname-$pkgver

  # fix the dirs not being properly set by cmake (bug #269)
  echo '#define PLUGINDIR "/usr/lib/gemrb/plugins"
  #define SYSCONFDIR "/etc/gemrb"' >> config.h

  make
}

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