updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / omvviewer / PKGBUILD
blobbbf3c91c2dbb7c1dd25a9f4e752a97ece1c47bd6
1 # Contributor: Medical-Wei/Lanny Bikcin <medicalwei at gmail dot com>
3 pkgname=omvviewer
4 pkgver=1.22.11
5 pkgrel=3
6 origpkgrel=1
7 pkgdesc="Open metaverse viewer is a project aimed to package the Second Life(tm) viewer for Linux distributions."
8 arch=('i686' 'x86_64')
9 url="http://omvviewer.byteme.org.uk/index.shtml"
10 license=('GPL')
11 depends=('alsa-lib' 'apr-util' 'freealut' 'gtk2' 'libgl' 'libidn' 'mesa' 'nss' 'sdl' 'openjpeg' 'xmlrpc-epi' 'c-ares' 'ttf-dejavu' 'omvviewer-artwork=1.22.11' 'libogg' 'libvorbis')
12 makedepends=('gcc' 'make' 'patch' 'python' 'bison' 'flex' 'cmake' 'boost')
13 provides=('secondlife')
14 conflicts=('secondlife' 'secondlife-svn' 'secondlife-bin' 'omvviewer-git')
15 source=("http://apt.byteme.org.uk/pool/main/o/${pkgname}/${pkgname}_${pkgver}.orig.tar.gz"
16         "http://apt.byteme.org.uk/pool/main/o/${pkgname}/${pkgname}_${pkgver}-${origpkgrel}.diff.gz")
18 optdepends=('gstreamer0.10: in-world movie playback'
19             'omvviewer-mozlib-qt: in-world web browsing (install it before compiling)')
21 build() {
22   cd $srcdir/linden
24   # Applying the debian package patch
25   patch -p1 < ../${pkgname}_${pkgver}-${origpkgrel}.diff || return 1
27   # Applying patches in the debian/patches directory
28   ln -s debian/patches/topic .
29   xargs -l -a debian/patches/series patch -i
31   # Fix the web browser window that omvviewer-mozlib-qt seems weird colored
32   sed -i 's/primary_format = GL_BGRA_EXT;/primary_format = GL_RGBA;/' $srcdir/linden/indra/newview/llwebbrowserctrl.cpp
34   # Configure
35   mkdir -p indra/build
36   cd indra/build
37   cmake -DUNATTENDED:BOOl=FALSE \
38   -DSTANDALONE:BOOL=TRUE \
39   -DCMAKE_BUILD_TYPE:STRING=RELEASE \
40   -DSERVER:BOOL=FALSE \
41   -DCMAKE_CURRENT_BINARY_DIR:STRING= \
42   -DVIEWER:BOOL=TRUE \
43   -DINSTALL:BOOL=TRUE \
44   -DAPP_SHARE_DIR:STRING=/usr/share/omvviewer \
45   -DAPP_BINARY_DIR:STRING=/usr/bin \
46   -DVIEWER_BINARY_NAME:STRING=omvviewer \
47   -DOPENAL:BOOL=TRUE \
48   -DGCC_DISABLE_FATAL_WARNINGS:BOOL=TRUE \
49   .. || return 1
51   # Make and Install
52   make || return 1
53   make DESTDIR=$pkgdir install || return 1
56   # Install Desktop File
57   install -D -m644 $srcdir/linden/debian/omvviewer.desktop \
58       $pkgdir/usr/share/applications/omvviewer.desktop
60   # Install Icon File
61   install -D -m644 $srcdir/linden/indra/newview/res/viewericon.xpm \
62       $pkgdir/usr/share/pixmaps/viewericon.xpm
64   # Fix the font config which points to the font file which is not exist in arch system.
65   sed -i 's/\/usr\/share\/fonts\/truetype\/ttf-dejavu/\/usr\/share\/fonts\/TTF/g' $pkgdir/usr/share/omvviewer/app_settings/settings.xml