summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cc30ed4885058d31878895e3ef2c8f0400a1c4b4 (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
63
64
65
66
67
68
69
# Maintainer: Tolga Hosgor <fasdfasdas@gmail.com>

pkgname=('ogre-2.1')
pkgver=r9291.da035e05b
pkgrel=1
pkgdesc='Scene-oriented, flexible 3D engine written in C++'
arch=('i686' 'x86_64')
url='http://ogre3d.org'
license=('MIT')
depends=('freeimage' 'freetype2' 'libxaw' 'libxrandr'
         'zziplib' 'ois' 'glu' 'tinyxml')
makedepends=('cmake' 'doxygen' 'graphviz' 'ttf-dejavu' 'mesa' 'git')
provides=('ogre' 'ogre-docs')
conflicts=('ogre' 'ogre-docs')
source=("git+https://github.com/OGRECave/ogre.git#branch=v2-1")
sha512sums=('SKIP')

prepare() {
  cd ogre
}

pkgver() {
  cd ogre
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd ogre

  [[ -d build ]] && rm -rf build
  mkdir build && cd build

  # Silence warnings about deprecated declarations
  CXXFLAGS+=' -Wno-deprecated-declarations'

  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DOGRE_INSTALL_DOCS=1 \
    -DOGRE_INSTALL_SAMPLES=1 \
    -DOGRE_BUILD_SAMPLES2=1 \
    -DOGRE_USE_BOOST=0 \
    -DOGRE_CONFIG_THREAD_PROVIDER=std \
    -DCMAKE_BUILD_TYPE=Release

  make

  make OgreDoc
}

package() {
  optdepends=('cppunit: unit testing'
              'intel-tbb: better threading support'
              'poco: portability'
              'boost: for developing using ogre')

  cd ogre/build

  make DESTDIR=${pkgdir} install

  install -Dm644 ../Docs/License.html ${pkgdir}/usr/share/licenses/${pkgname}/license.html


  # symlink for docs
  install -dm755 ${pkgdir}/usr/share/OGRE/
  mkdir -p ${pkgdir}/usr/share/doc
  cd ${pkgdir}/usr/share/doc
  ln -s OGRE/docs OGRE
 
}