summaryrefslogtreecommitdiff
path: root/community/sfml/PKGBUILD
blob: 453caa1d8802cce39d1da737506d251b2417005a (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
# $Id: PKGBUILD 103129 2013-12-26 21:26:17Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Ondrej Martinak <omartinak@gmail.com>

pkgname=sfml
_commit=4a300547f3
pkgver=2.1.0.$_commit
pkgrel=1
pkgdesc='A simple, fast, cross-platform, and object-oriented multimedia API'
arch=('i686' 'x86_64' 'mips64el')
url='http://www.sfml-dev.org/'
license=('zlib')
depends=('libsndfile' 'libxrandr' 'libjpeg' 'openal' 'glew' 'freetype2')
makedepends=('mesa' 'cmake' 'doxygen' 'git')
install=sfml.install
source=("git+https://github.com/LaurentGomila/SFML.git#commit=${_commit}")
md5sums=('SKIP')

build() {
  cd "$srcdir"/SFML

  mkdir build && cd build
  cmake .. \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DSFML_BUILD_EXAMPLES=1 \
      -DSFML_BUILD_DOC=1 \
      -DCMAKE_CXX_FLAGS="-DGLXContextID=XID $CXXFLAGS"
  make
  make doc
}

package() {
  cd "$srcdir"/SFML/build

  make DESTDIR="$pkgdir/" install

  install -Dm644 "$pkgdir/usr/share/SFML/cmake/Modules/FindSFML.cmake" "$pkgdir/usr/share/cmake-2.8/Modules/FindSFML.cmake"

  install -Dm644 ../license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}