summaryrefslogtreecommitdiff
path: root/libre/ogre/PKGBUILD
blob: 2d5283a66b6a0b05923fb3d4e681492defeba00e (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Maintainer (Arch): Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor (Hyperbola): Márcio Silva <coadde@parabola.nu>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

pkgbase=ogre
pkgname=('ogre')
pkgver=1.10.5
pkgrel=1.parabola1
pkgdesc='Scene-oriented, flexible 3D engine written in C++, without nonfree software support and files'
arch=('i686' 'x86_64' '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')
mksource=(ogre::hg+http://bitbucket.org/sinbad/ogre#tag=v${pkgver//./-})
source=(https://repo.parabola.nu/other/$pkgbase-libre/$pkgbase-libre-$pkgver.tar.xz
        libre.patch)
mksha512sums=('SKIP')
sha512sums=('c6effe71e3251617e38f6834dd6ef610b06bde037405a30640a7161748428646edba63c4861e79620cdc976b43325a9520cb3a43a0fa3f311130b9b9a0c2422d'
            '9a09a04f2a3f7d79bf86c44cb25881a7ea2b3fc78706aeb2df293016ddbefc33414b3811502c1912d4f28f86fc52caf05537133e36f414af85b8d5b3a4916026')

mksource() {
  cd ${pkgbase}

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

prepare() {
  cd ${pkgbase}

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

  # add symlinks to point to mesa header files
#  cd RenderSystems/GL/include/GL
#  ln -sv /usr/include/GL/gl.h gl.h
#  ln -sv /usr/include/GL/glext.h glext.h
#  ln -sv /usr/include/GL/wglext.h wglext.h
#  ln -sv /usr/include/GL/glxtokens.h glxtokens.h
#  ln -sv /usr/include/GL/glxext.h glxext.h
}

build() {
  cd ${pkgbase}

  # get a clean build dir
  [[ -d build ]] && rm -vrf build
  mkdir -v build && cd build

  # SAMPLES, SAMPLES_SOURCE and TESTS are nonfree
  cmake .. \
    -DCMAKE_BUILD_TYPE=Release\
    -DCMAKE_INSTALL_PREFIX=/usr\
    -DCPACK_PACKAGE_DESCRIPTION_SUMMARY='Libre 3D Graphics Engine'\
    -D${pkgbase^^}_BUILD_COMPONENT_PAGING=TRUE\
    -D${pkgbase^^}_BUILD_COMPONENT_PROPERTY=TRUE\
    -D${pkgbase^^}_BUILD_COMPONENT_PYTHON=TRUE \
    -D${pkgbase^^}_BUILD_COMPONENT_RTSHADERSYSTEM=TRUE\
    -D${pkgbase^^}_BUILD_COMPONENT_TERRAIN=TRUE\
    -D${pkgbase^^}_BUILD_DEPENDENCIES=FALSE \
    -D${pkgbase^^}_BUILD_PLATFORM_NACL=FALSE\
    -D${pkgbase^^}_BUILD_PLUGIN_BSP=TRUE\
    -D${pkgbase^^}_BUILD_PLUGIN_OCTREE=TRUE\
    -D${pkgbase^^}_BUILD_PLUGIN_PCZ=TRUE\
    -D${pkgbase^^}_BUILD_PLUGIN_PFX=TRUE\
    -D${pkgbase^^}_BUILD_RENDERSYSTEM_GL=FALSE\
    -D${pkgbase^^}_BUILD_RENDERSYSTEM_GLES=FALSE\
    -D${pkgbase^^}_BUILD_RENDERSYSTEM_GLES2=FALSE\
    -D${pkgbase^^}_BUILD_RTSHADERSYSTEM_CORE_SHADERS=TRUE\
    -D${pkgbase^^}_BUILD_RTSHADERSYSTEM_EXT_SHADERS=TRUE\
    -D${pkgbase^^}_BUILD_SAMPLES=FALSE\
    -D${pkgbase^^}_BUILD_TESTS=FALSE\
    -D${pkgbase^^}_BUILD_TOOLS=TRUE\
    -D${pkgbase^^}_CONFIG_ENABLE_DDS=TRUE\
    -D${pkgbase^^}_CONFIG_ENABLE_FREEIMAGE=TRUE\
    -D${pkgbase^^}_CONFIG_ENABLE_GLES2_GLSL_OPTIMISER=TRUE\
    -D${pkgbase^^}_CONFIG_ENABLE_PVRTC=TRUE\
    -D${pkgbase^^}_CONFIG_ENABLE_VIEWPORT_ORIENTATIONMODE=TRUE\
    -D${pkgbase^^}_CONFIG_ENABLE_ZIP=TRUE\
    -D${pkgbase^^}_CONFIG_NEW_COMPILERS=TRUE\
    -D${pkgbase^^}_CONFIG_THREAD_PROVIDER=boost\
    -D${pkgbase^^}_INSTALL_DOCS=FALSE\
    -D${pkgbase^^}_INSTALL_SAMPLES=FALSE\
    -D${pkgbase^^}_INSTALL_SAMPLES_SOURCE=FALSE\
    -D${pkgbase^^}_INSTALL_TOOLS=TRUE\
    -D${pkgbase^^}_LIB_DIRECTORY=lib\
    -D${pkgbase^^}_PROFILING=TRUE\
    -D${pkgbase^^}_USE_BOOST=TRUE
#  make V=0
  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')
  conflicts=(${pkgbase}-libre)
  replaces=(${pkgbase}-libre)

  cd ${pkgbase}/build

  make DESTDIR=$pkgdir install

  # install license
  install -vDm644 ../COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
}

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