summaryrefslogtreecommitdiff
path: root/libre/ogre/PKGBUILD
blob: 17d34c389ea247c3915d92a8a05b4a120496771d (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
70
71
72
73
74
75
76
77
78
79
# $Id$
# Maintainer (Arch): Sven-Hendrik Haase <sh@lutzhaase.com>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Márcio Silva <coadde@hyperbola.info>

# parabola changes and rationale:
#  - not building ogre-docs
#  - removed nonfree samples and tests
#  - removed nonfree files and references

pkgbase=ogre
pkgname=('ogre')
pkgver=1.10.11
pkgrel=3.parabola1
pkgdesc='Scene-oriented, flexible 3D engine written in C++, without nonfree software support and files'
arch=('x86_64' 'i686' 'armv7h')
url='http://www.ogre3d.org'
license=('custom:MIT')
depends=('boost-libs' 'freeimage' 'freetype2' 'libxaw' 'libxrandr'
         'zziplib' 'sdl2' 'glu' 'tinyxml')
makedepends=('boost' 'cmake' 'doxygen' 'graphviz' 'ttf-dejavu' 'mesa' 'mercurial' 'python' 'swig' 'systemd')
install=ogre.install
source=("https://github.com/OGRECave/ogre/archive/v${pkgver}.tar.gz"
        libre.patch)
sha512sums=('2dfedd6f0a0de1a8c687c001439138b233200ca11e5c9940debf43d8a0380ca6472e0b5f4d599f0e22ca2049d0a5d34066ef41b6bc4912130694fa5d851fc900'
            '81e3997c5bad64d8bae511222d8ab3766699c0923e9303640925525908ee2c19dfb37549cc02bc3e172ea248c0c01c0a58bdcc20d545980bf93b15e02ceb514c')

prepare() {
  cd ogre-${pkgver}

  # remove nonfree files
  rm -v RenderSystems/GL/include/GL/gl.h
  rm -rv Samples/Media/materials/textures/nvidia
  rm -v Samples/Media/packs/chiropteraDM.{pk3,txt}

  # remove nonfree references
  rm -v CMake/Templates/quakemap.cfg.in
  patch -Np1 -i $srcdir/libre.patch
}

build() {
  cd ogre-${pkgver}

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

  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DOGRE_INSTALL_SAMPLES=FALSE\
    -DOGRE_INSTALL_DOCS=FALSE\
    -DOGRE_INSTALL_SAMPLES_SOURCE=FALSE\
    -DOGRE_BUILD_DEPENDENCIES=FALSE \
    -DOGRE_BUILD_COMPONENT_PYTHON=TRUE \
    -DCMAKE_BUILD_TYPE=Release \
    -DOGRE_BUILD_RENDERSYSTEM_GL=FALSE\
    -DOGRE_BUILD_RENDERSYSTEM_GLES=FALSE\
    -DOGRE_BUILD_RENDERSYSTEM_GLES2=FALSE\
    -DOGRE_BUILD_SAMPLES=FALSE\
    -DOGRE_BUILD_TESTS=FALSE

  make
}

package_ogre() {
  optdepends=('cppunit: unit testing'
              'intel-tbb: better threading support'
              'poco: portability'
              'python: python bindings'
              'boost: for developing using ogre'
              'ogre-docs: documentation')

  cd ogre-${pkgver}/build

  make DESTDIR=${pkgdir} install

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

# vim:set ts=2 sw=2 et: