summaryrefslogtreecommitdiff
path: root/libre/ogre/PKGBUILD
blob: 2ae2e6c2a98b9662c5af03a9bbf2a1ab7a7a35bf (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
# Maintainer (Arch): Sven-Hendrik Haase <svenstaro@archlinux.org>
# 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
#  - added imgui.tar.gz to sources instead of downloading at build time

pkgname=ogre
pkgver=13.2.4
pkgrel=1
pkgrel+=.parabola1
pkgdesc='Scene-oriented, flexible 3D engine written in C++'
pkgdesc+=', without nonfree software support and files'
arch=('x86_64')
arch+=('i686' 'armv7h')
url='http://www.ogre3d.org'
license=('custom:MIT')
depends=('freeimage' 'freetype2' 'libxaw' 'libxrandr' 'sdl2' 'glu' 'pugixml' 'zlib')
makedepends=('cmake' 'doxygen' 'graphviz' 'ttf-dejavu' 'mesa' 'python' 'ninja' 'cppunit')
install=ogre.install
source=("$pkgname-$pkgver.tar.gz::https://github.com/OGRECave/ogre/archive/v${pkgver}.tar.gz")
source+=("imgui-1.85.tar.gz::https://github.com/ocornut/imgui/archive/v1.85.tar.gz"
         libre.patch)
sha512sums=('6a07f919fb050d6863fcb2b6ab7aea54b279a1cc98377a5b8c9d773c74d7126a78ce0c23c1c4f62ef6a64bad5b2f039a15aa06ec4bcf06c232d0e9e466d82407'
            '830ff36681a661d77754fb7818bb13cc63da58a293d343a8d6847a586f00c6e0bfc3ffe51cdf882849e5083d4ddca52cdbdc1b3abc9b794a96f89ae7628f1fc2'
            '62e5f660a127f02d0a41852f426d52ea14d1043781b4b1b7390f2e424c57a88e75716615731cb9176dce6e6932e9646561425bd06a6833ce4c582e23b8d7ff59')

prepare() {
  cd ogre-${pkgver}

  # install imgui to build dir
  mkdir -p build
  cp -r "$srcdir"/imgui-1.85 build/

  # remove nonfree references
  patch -Np1 -i $srcdir/libre.patch
}

build() {
  cd ogre-${pkgver}

  cmake \
    -Bbuild \
    -GNinja \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DOGRE_BUILD_TESTS=OFF \
    -DOGRE_BUILD_DEPENDENCIES=OFF \
    -DOGRE_INSTALL_SAMPLES=OFF \
    -DOGRE_INSTALL_DOCS=OFF \
    -DOGRE_INSTALL_SAMPLES_SOURCE=OFF \
    -DOGRE_BUILD_RENDERSYSTEM_GL=OFF \
    -DOGRE_BUILD_RENDERSYSTEM_GLES=OFF \
    -DOGRE_BUILD_RENDERSYSTEM_GLES2=OFF \
    -DOGRE_BUILD_SAMPLES=OFF

  ninja -C build
}

package() {
  cd ogre-${pkgver}

  DESTDIR="${pkgdir}" ninja -C build install

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

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