updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / qt-appmenu / PKGBUILD
blobe33527055cab78908711ba0f221f9dacaad38961
1 # $Id: PKGBUILD 82062 2010-06-08 11:58:32Z pierre $
2 # Maintainer: Pierre Schmitz <pierre@archlinux.de>
4 pkgname=qt-appmenu
5 pkgver=4.7.4
6 _pkgver=4.7.4
7 pkgrel=3
8 pkgdesc='A cross-platform application and UI framework'
9 arch=('i686' 'x86_64')
10 url='http://qt.nokia.com/'
11 license=('GPL3' 'LGPL')
12 depends=('libtiff' 'libpng' 'libmng' 'sqlite3' 'ca-certificates' 'glib2' 'dbus'
13          'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
14          'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils')
15 optdepends=('postgresql-libs: PostgreSQL driver'
16             'libmysqlclient: MySQL driver'
17             'unixodbc: ODBC driver'
18             'libxinerama: Xinerama support'
19             'libxcursor: Xcursor support'
20             'libxfixes: Xfixes support')
21 makedepends=('mesa' 'inputproto' 'postgresql-libs' 'mysql' 'unixodbc' 'cups' 'libxfixes' 'gtk2')
22 provides=("qt=${pkgver}")
23 conflicts=('qt')
24 install=qt.install
25 options=('!libtool')
26 _pkgfqn="qt-everywhere-opensource-src-${_pkgver}"
27 source=("ftp://ftp.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz"
28         'assistant.desktop' 'designer.desktop' 'linguist.desktop' 'qtconfig.desktop'
29         'blacklist-diginotar-certs.diff' 'qmenubar-plugin-system-4.7.3.diff')
30 md5sums=('9831cf1dfa8d0689a06c2c54c5c65aaf'
31          'a445c6917086d80f1cfc1e40cb6b0132'
32          'd457f0a0ad68a3861c3cadefe3b42ded'
33          '668331d9798a0e2b94381efb7be4c513'
34          'c29f2993d6a0f73d756d2fa36e130e1c'
35          '7fedce64244b992d00222d2755800ad1'
36          'd14c41725e00f9619c5a19aa17d21768')
38 build() {
39         unset QMAKESPEC
40         export QT4DIR=$srcdir/$_pkgfqn
41         export PATH=${QT4DIR}/bin:${PATH}
42         export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
44         cd ${srcdir}/${_pkgfqn}
46         patch -p1 -i "${srcdir}"/blacklist-diginotar-certs.diff
48         # see http://qt.gitorious.org/qt/agateau-qt
49         # apply appmenu patch from Aurelien Gateau
50         patch -Np1 -i "${srcdir}/qmenubar-plugin-system-4.7.3.diff"
52         sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf
53         sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf
54         sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf
56         ./configure -confirm-license -opensource \
57                 -prefix /usr \
58                 -sysconfdir /etc \
59                 -plugindir /usr/lib/qt/plugins \
60                 -importdir /usr/lib/qt/imports \
61                 -translationdir /usr/share/qt/translations \
62                 -datadir /usr/share/qt \
63                 -docdir /usr/share/doc/qt \
64                 -examplesdir /usr/share/doc/qt/examples \
65                 -demosdir /usr/share/doc/qt/demos \
66                 -largefile \
67                 -plugin-sql-{psql,mysql,sqlite,odbc} \
68                 -system-sqlite \
69                 -xmlpatterns \
70                 -no-phonon \
71                 -no-phonon-backend \
72                 -svg \
73                 -webkit \
74                 -script \
75                 -scripttools \
76                 -system-zlib \
77                 -system-libtiff \
78                 -system-libpng \
79                 -system-libmng \
80                 -system-libjpeg \
81                 -openssl-linked \
82                 -nomake demos \
83                 -nomake examples \
84                 -nomake docs \
85                 -no-rpath \
86                 -silent \
87                 -optimized-qmake \
88                 -dbus \
89                 -no-separate-debug-info \
90                 -reduce-relocations \
91                 -gtkstyle \
92                 -opengl \
93                 -graphicssystem raster \
94                 -no-openvg \
95                 -glib
96         make
99 package() {
100         cd ${srcdir}/${_pkgfqn}
101         make INSTALL_ROOT=${pkgdir} install
103         # install missing icons and desktop files
104         for icon in tools/linguist/linguist/images/icons/linguist-*-32.png ; do
105                 size=$(echo $(basename ${icon}) | cut -d- -f2)
106                 install -p -D -m644 ${icon} ${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png
107         done
108         install -p -D -m644 src/gui/dialogs/images/qtlogo-64.png ${pkgdir}/usr/share/icons/hicolor/64x64/apps/qtlogo.png
109         install -p -D -m644 tools/assistant/tools/assistant/images/assistant.png ${pkgdir}/usr/share/icons/hicolor/32x32/apps/assistant.png
110         install -p -D -m644 tools/designer/src/designer/images/designer.png ${pkgdir}/usr/share/icons/hicolor/128x128/apps/designer.png
111         install -d ${pkgdir}/usr/share/applications
112         install -m644 ${srcdir}/{linguist,designer,assistant,qtconfig}.desktop ${pkgdir}/usr/share/applications/
114         # install license addition
115         install -D -m644 LGPL_EXCEPTION.txt ${pkgdir}/usr/share/licenses/qt/LGPL_EXCEPTION.txt
117         # Fix wrong path in pkgconfig files
118         find ${pkgdir}/usr/lib/pkgconfig -type f -name '*.pc' \
119                 -exec perl -pi -e "s, -L${srcdir}/?\S+,,g" {} \;
120         # Fix wrong path in prl files
121         find ${pkgdir}/usr/lib -type f -name '*.prl' \
122                 -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
123         ## Remove file included in qtwebkit package
124         #rm ${pkgdir}/usr/share/qt/mkspecs/modules/qt_webkit_version.pri