2 # Contributor: friesoft <friesoft@gmail.com>
3 # This package provides the master branch of Qt
8 pkgdesc="The C++ Qt GUI framework - current development snapshot (master branch)"
10 url="http://www.qtsoftware.com"
11 license=('GPL3' 'LGPL')
13 depends=('libpng' 'mesa' 'fontconfig' 'libtiff' 'libmng' 'sqlite3' 'libxrandr' 'glib2' 'libxi' 'dbus' 'libxcursor' 'libxinerama' 'libxrender' 'ca-certificates')
14 optdepends=('postgresql-libs' 'libmysqlclient' 'unixodbc')
15 makedepends=('inputproto' 'postgresql-libs' 'mysql' 'unixodbc' 'cups' 'libxfixes' 'gtk2')
16 provides=('qt' 'qt4' 'qt-doc' 'qt=4.7.0' 'qt4=4.7.0')
17 replaces=('qt' 'qt4' 'qt-doc' 'qt4-git' 'qt4-doc')
18 conflicts=('qt' 'qt4' 'qt-doc' 'qt4-git' 'qt4-doc')
19 options=('!libtool' 'docs')
21 # desktop files and qdoc3 patch -- needed for qtdesigner-git build
22 source=('assistant.desktop' 'designer.desktop' 'linguist.desktop' 'qtconfig.desktop')
24 md5sums=('83d1fd8da6a350dc1f1459d0c8cd226b'
25 'bb1afccb14bcad7e7dac826612f5dc9c'
26 '038d7083823c2600c97239fe088b2f4b'
27 '8618e4b1875143fab8ad244688b2aae7')
29 _gitroot="git://gitorious.org/qt/qt.git"
33 msg "Connecting to git server...."
35 if [ -d ${srcdir}/$_gitname ] ; then
40 msg "The local files have been updated to the current revision"
48 sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf
49 sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf
50 sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf
54 export QT4DIR=$srcdir/$_gitname
55 export PATH=${QT4DIR}/bin:${PATH}
56 export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
58 ./configure -confirm-license -opensource -v \
61 -plugindir /usr/lib/qt/plugins \
62 -translationdir /usr/share/qt/translations \
63 -datadir /usr/share/qt \
64 -docdir /usr/share/doc/qt \
65 -examplesdir /usr/share/doc/qt/examples \
66 -demosdir /usr/share/doc/qt/demos \
68 -plugin-sql-{psql,mysql,sqlite,odbc} \
87 -no-separate-debug-info \
108 make INSTALL_ROOT=$pkgdir install
110 # install missing icons and desktop files
111 for icon in tools/linguist/linguist/images/icons/linguist-*-32.png ; do
112 size=$(echo $(basename ${icon}) | cut -d- -f2)
113 install -p -D -m644 ${icon} ${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png
115 install -p -D -m644 src/gui/dialogs/images/qtlogo-64.png ${pkgdir}/usr/share/icons/hicolor/64x64/apps/qtlogo.png
116 install -p -D -m644 tools/assistant/tools/assistant/images/assistant.png ${pkgdir}/usr/share/icons/hicolor/32x32/apps/assistant.png
117 install -p -D -m644 tools/designer/src/designer/images/designer.png ${pkgdir}/usr/share/icons/hicolor/128x128/apps/designer.png
118 install -d ${pkgdir}/usr/share/applications
119 install -m644 ${srcdir}/{linguist,designer,assistant,qtconfig}.desktop ${pkgdir}/usr/share/applications/
121 # install license addition
122 install -D -m644 LGPL_EXCEPTION.txt ${pkgdir}/usr/share/licenses/qt/LGPL_EXCEPTION.txt
124 # Fix wrong path in pkgconfig files
125 find ${pkgdir}/usr/lib/pkgconfig -type f -name '*.pc' \
126 -exec perl -pi -e "s, -L${srcdir}/?\S+,,g" {} \;
127 # Fix wrong path in prl files
128 find ${pkgdir}/usr/lib -type f -name '*.prl' \
129 -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
132 install -d ${pkgdir}/usr/share/doc/qt
133 cp -r doc/* ${pkgdir}/usr/share/doc/qt