1 # $Id: PKGBUILD 82062 2010-06-08 11:58:32Z pierre $
2 # Maintainer: Pierre Schmitz <pierre@archlinux.de>
8 pkgdesc='A cross-platform application and UI framework'
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}")
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')
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 \
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 \
67 -plugin-sql-{psql,mysql,sqlite,odbc} \
89 -no-separate-debug-info \
93 -graphicssystem raster \
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
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