updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / qt-qpa / PKGBUILD
blob48b886b365421402a94df56edef19e1ff032dffd
1 # $Id$
2 # Maintainer: Janusz Lewandowski <lew21@xtreeme.org>
3 # Contributor: Andrea Scarpino <andrea@archlinux.org>
4 # Contributor: Pierre Schmitz <pierre@archlinux.de>
6 pkgbase=qt-qpa
7 pkgname=('qt-qpa' 'qt-qpa-private-headers')
8 pkgver=20110828
9 pkgrel=1
10 arch=('i686' 'x86_64')
11 url='http://qt.nokia.com/'
12 license=('GPL3' 'LGPL')
13 makedepends=('glib2' 'libgles' 'libegl' 'zlib' 'pcre' 'dbus' 'ca-certificates' 'libtiff' 'libpng' 'libmng'
14              'fontconfig' 'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils'
15              'cups' 'gtk2' 'icu' 'alsa-lib' 'pulseaudio' 'libwayland-git'
16              'postgresql-libs' 'mysql' 'sqlite3' 'unixodbc')
17 options=('!libtool')
19 _gitroot="git://gitorious.org/qt/qt.git"
20 _gitname="qt"
21 _pkgfqn="$_gitname-build"
23 build() {
24         unset QMAKESPEC
25         export QT4DIR=$srcdir/$_pkgfqn
26         export PATH=${QT4DIR}/bin:${PATH}
27         export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
29         msg "Connecting to the GIT server...."
31         if [ -d $_gitname ] ; then
32                 cd $_gitname
33                 git pull origin
34                 cd ..
35         else
36                 git clone $_gitroot
37         fi
39         msg "Creating build directory..."
40         rm -rf $_gitname-build
41         cp -rH $_gitname $_gitname-build
43         msg "Starting build..."
44         cd $_gitname-build
46         sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf
47         sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf
48         sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf
50         export QT_WAYLAND_GL_CONFIG=wayland_egl
52         ./configure -confirm-license -opensource \
53                 -prefix /opt/qt-qpa \
54                 -docdir /opt/qt-qpa/share/doc/qt \
55                 -plugindir /opt/qt-qpa/lib/qt/plugins \
56                 -importdir /opt/qt-qpa/lib/qt/imports \
57                 -datadir /opt/qt-qpa/share/qt \
58                 -translationdir /opt/qt-qpa/share/qt/translations \
59                 -sysconfdir /opt/qt-qpa/etc \
60                 -examplesdir /opt/qt-qpa/share/doc/qt/examples \
61                 -demosdir /opt/qt-qpa/share/doc/qt/demos \
62                 -largefile \
63                 -plugin-sql-{psql,mysql,sqlite,odbc} \
64                 -system-sqlite \
65                 -xmlpatterns \
66                 -no-qt3support \
67                 -no-phonon \
68                 -no-phonon-backend \
69                 -qpa \
70                 -svg \
71                 -no-webkit \
72                 -script \
73                 -scripttools \
74                 -system-zlib \
75                 -system-libtiff \
76                 -system-libpng \
77                 -system-libmng \
78                 -system-libjpeg \
79                 -nomake demos \
80                 -nomake examples \
81                 -nomake docs \
82                 -no-rpath \
83                 -openssl-linked \
84                 -silent \
85                 -optimized-qmake \
86                 -dbus \
87                 -reduce-relocations \
88                 -no-separate-debug-info \
89                 -gtkstyle \
90                 -opengl es2 \
91                 -no-openvg \
92                 -glib
94         make -j3
97 package_qt-qpa() {
98         pkgdesc='A cross-platform application and UI framework'
99         depends=('glib2' 'libgles' 'libegl' 'zlib' 'pcre' 'dbus' 'ca-certificates' 'libtiff' 'libpng' 'libmng'
100                  'fontconfig' 'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils'
101                  'alsa-lib')
102         optdepends=(
103                 'sqlite3: SQLite3 driver'
104                 'postgresql-libs: PostgreSQL driver'
105                 'libmysqlclient: MySQL driver'
106                 'unixodbc: ODBC driver')
107         install='qt.install'
109         cd $_pkgfqn
110         make INSTALL_ROOT=$pkgdir install
112         # install license addition
113         install -D -m644 LGPL_EXCEPTION.txt ${pkgdir}/opt/qt-qpa/share/licenses/qt/LGPL_EXCEPTION.txt
115         # Fix wrong path in pkgconfig files
116         find ${pkgdir}/opt/qt-qpa/lib/pkgconfig -type f -name '*.pc' \
117                 -exec perl -pi -e "s, -L${srcdir}/?\S+,,g" {} \;
118         # Fix wrong path in prl files
119         find ${pkgdir}/opt/qt-qpa/lib -type f -name '*.prl' \
120                 -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
123 package_qt-qpa-private-headers(){
124         pkgdesc="Qt private headers for development"
125         depends=("qt-qpa=${pkgver}")
127         cd $_pkgfqn/include
129         for i in *
130         do
131                 if [ -d $i/private ]
132                 then
133                         install -d ${pkgdir}/opt/qt-qpa/include/${i}/
134                         cp -R ${i}/private ${pkgdir}/opt/qt-qpa/include/${i}/
135                 fi
136         done
139 # For AUR!
140 pkgname=qt-qpa
141 pkgdesc='A cross-platform application and UI framework.'