updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / trinity-kdegraphics / PKGBUILD
bloba6a365c64ef8491188976a588940bdd9ba63f6e4
1 # $Id$
2 # Maintainer: David C. Rankin <drankinatty@gmail.com>
4 # All modifications and uses of this file are licensed under
5 # the software for which this file was made for, should the software
6 # be under an Open Source License, at least version 1.9, defined
7 # by the Open Source Initiative. In other cases, this file is automatically
8 # released to the Public Domain.
11 pkgname=trinity-kdegraphics
12 pkgver=3513
13 pkgrel=1.0
14 arch=('i686' 'x86_64')
15 url='http://www.kde.org'
16 license=('GPL')
17 groups=('trinity-extras')
18 pkgdesc="Trinity - kdegraphics"
19 depends=('trinity-kdebase' 'libart-lgpl' 'libgphoto2' 'libtiff' 'openexr' 't1lib')
20 makedepends=('pkgconfig' 'cmake' 'imake' 'fribidi')
21 # 'poppler-qt'
22 optdepends=('xscreensaver: Screen saver and locker for the X Window System')
23 provides=('trinity-kdegraphics')
24 conflicts=('trinity-kdegraphics')
25 replaces=('trinity-kdegraphics')
26 options=('libtool' '!strip')
27 source=('GSmartPointer.h.patch' 'http://mirror.its.uidaho.edu/pub/trinity/releases/3.5.13/kdegraphics-3.5.13.tar.gz')
28 md5sums=('7b93c9bdf1208df453c9838519fab109' 'a75c254cd1060343cd04c6744bce6798')
30 _svnmod=kdegraphics
31 trinity_prefix="/opt/trinity"
33 build() {
35   # patch for gcc-4.6
36   if grep -q cstddef  ${srcdir}/kdegraphics/kviewshell/plugins/djvu/libdjvu/GSmartPointer.h; then
37     msg "Patch for GCC 4.6 - Previously Applied"
38   else
39     msg "Applying Patch for GCC 4.6"
40     patch -p0 -i ${srcdir}/GSmartPointer.h.patch || return 1
41   fi
43   msg "Setting PATH, CMAKE and Trinity Environment variables"
44   export CMAKE_PREFIX_PATH=/opt/qt:/opt/trinity
45   if [[ -r /etc/profile.d/qt3.sh ]]; then
46     . /etc/profile.d/qt3.sh
47     [[ -n $QTDIR ]] && _qtdir=$QTDIR
48   else
49     [[ ${PATH%%:*} =~ ${_qtdir}/bin ]] || export PATH=${_qtdir}/bin:$PATH
50   fi
52    export CMAKE_INCLUDE_PATH=/opt/qt/include:/opt/qt/include/tqt:/usr/include/dbus-1.0:/opt/trinity/include:/opt/trinity/include/libkrandr:/usr/include
53    export LD_LIBRARY_PATH=/opt/trinity/lib:/opt/trinity/lib/kde3:$LD_LIBRARY_PATH
54    export PKG_CONFIG_PATH=:/opt/trinity/lib/pkgconfig:/opt/qt/lib/pkgconfig
56   cd $srcdir
57   msg "Creating out-of-source build directory: ${srcdir}/build"
58   mkdir -p build
59   cd build
61   msg "Starting cmake..."
62   cmake ${srcdir}/${_svnmod} \
63     -DCMAKE_INSTALL_PREFIX=${trinity_prefix} \
64     -DCMAKE_VERBOSE_MAKEFILE=ON \
65     -DQT_VERSION=3 \
66     -DCMAKE_CXX_FLAGS="-fpermissive" \
67     -DWITH_T1LIB=ON \
68     -DWITH_LIBPAPER=ON \
69     -DWITH_TIFF=ON \
70     -DWITH_OPENEXR=ON \
71     -DWITH_PAM=ON \
72     -DBUILD_ALL=ON
73   make
75 #     -DWITH_PDF=ON \ (waiting on poppler-qt3)
77 #     -DWITH_QT3=ON \
78 #     -DQTDIR=/opt/qt \
79 #     -DQT_LIBRARY_DIRS=/opt/qt/lib \
82 package() {
83   msg "Packaging - $pkgname-$pkgver"
84   cd ${srcdir}/build
86   make DESTDIR="$pkgdir/" install
88   cd ${startdir}