PKGBUILD 1.46 KB
Newer Older
1 2 3 4 5 6 7
#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>

pkgname=openscenegraph
_pkgname=OpenSceneGraph
8
pkgver=3.0.1
9
pkgrel=2
10 11 12 13
pkgdesc="FOSS high performance real-time graphics toolkit."
arch=('i686' 'x86_64')
license=('custom:OSGPL')
url="http://www.openscenegraph.org"
14
depends=('curl' 'giflib' 'jasper' 'librsvg' 'libxrandr' 'pth' 'xine-lib')
15 16
makedepends=('cmake' 'libvncserver')
optdepends=('libvncserver' 'gdal' 'openexr' 'poppler-glib')
Giuseppe's avatar
Giuseppe committed
17
categories=('games')
18 19 20 21
source=("$url/downloads/stable_releases/$_pkgname-$pkgver/source/$_pkgname-$pkgver.zip"
        "xine-1.2.patch::https://projects.archlinux.org/svntogit/community.git/plain/trunk/osg-xine-1.2.patch?h=packages/openscenegraph")
md5sums=('c43a25d023e635c3566b2083d8e6d956'
         'a4d286df308de1765413073170fe5639')
22 23 24

build() {
  cd $srcdir/$_pkgname-$pkgver
25 26 27

  mkdir -p build && cd build

28 29
  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
30
    -DCMAKE_BUILD_TYPE=Release \
31
    ..
32 33 34 35 36 37

  # Patches.
  sed -i 's|#include <curl/types.h>|//#include <curl/types.h>|' ../src/osgPlugins/curl/ReaderWriterCURL.cpp
  patch -p1 < $srcdir/xine-1.2.patch -d ..

  # Build.
38 39 40 41 42 43
  make
}

package() {
  cd $srcdir/$_pkgname-$pkgver/build
  make DESTDIR=$pkgdir install
44 45 46 47 48 49

  # Fix installation directory.
  [ -d $pkgdir/usr/lib64 ] && mv $pkgdir/usr/lib64 $pkgdir/usr/lib || true

  # License.
  install -D -m644 ../LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/license.txt
50
}