1 # Maintainer: Andrea Scarpino <andrea@archlinux.org>
7 pkgdesc='Cross-platform application and UI framework'
10 [ "$CARCH" = "x86_64" ] && _arch=64
11 url='http://qt.nokia.com/'
13 depends=('mesa' 'sqlite3' 'libmng' 'fontconfig' 'gstreamer0.10-base' 'glib2'
14 'libxinerama' 'libxi' 'libxrender' 'libxrandr' 'libxcursor' 'libpulse'
15 'libcups' 'fdupes' 'desktop-file-utils')
16 optdepends=('pulseaudio' 'cups')
17 makedepends=('sharutils' 'gtk2')
19 install=${pkgname}.install
20 source=("http://download.meego.com/live/Tools:/SDK:/Host/Trunk/src/${pkgname}-${pkgver}-${_rpmver}.src.rpm")
21 md5sums=('0ecaebe118bdf9c540ef83b17a56b593')
25 tar -zxf qt-everywhere-opensource-src-${pkgver}.tar.gz
27 cd qt-everywhere-opensource-src-${pkgver}
28 patch -p1 -i ../01_configure_quilt_compat.patch
29 patch -p1 -i ../03_config_tests_sqlite.patch
30 patch -p1 -i ../04_build_translations.patch
31 patch -p1 -i ../06_install_qvfb.patch
32 patch -p1 -i ../07_invpremul.patch
33 patch -p1 -i ../08_qtdebug_syslog.patch
34 patch -p1 -i ../09_texture_enable_fix.patch
35 patch -p1 -i ../11_honor_all_FreeDesktop_icon_paths.patch
36 patch -p1 -i ../add_nostrip_for_debug_packages.patch
39 export PATH=$QTDIR/bin/:$PATH
40 export LDFLAGS=-Wl,--as-needed
41 export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
42 export QT_PLUGIN_PATH=$QTDIR/plugins
45 export CXXFLAGS="$CXXFLAGS -fno-strict-aliasing -fpermissive"
47 ./configure -confirm-license \
48 -prefix "/opt/meego/${pkgname}" \
49 -bindir "/opt/meego/${pkgname}/bin" \
50 -libdir "/opt/meego/${pkgname}/lib" \
51 -docdir "/opt/meego/${pkgname}/share/doc/qt4" \
52 -headerdir "/opt/meego/${pkgname}/include/qt4" \
53 -datadir "/opt/meego/${pkgname}/share/qt4" \
54 -plugindir "/opt/meego/${pkgname}/lib/qt4/plugins" \
55 -importdir "/opt/meego/${pkgname}/lib/qt4/imports" \
56 -translationdir "/opt/meego/${pkgname}/share/qt4/translations" \
57 -sysconfdir "/etc/xdg" \
58 -demosdir "/opt/meego/${pkgname}/lib/qt4/demos" \
59 -examplesdir "/opt/meego/${pkgname}/lib/qt4/examples" \
89 -no-separate-debug-info \
98 -I/usr/include/freetype2 \
99 -I/usr/include/gstreamer-0.10 \
100 -I/usr/include/glib-2.0 \
101 -I/usr/lib/glib-2.0/include/ \
102 -I/usr/include/libxml2/ \
108 cd "${srcdir}"/qt-everywhere-opensource-src-${pkgver}
109 make INSTALL_ROOT="${pkgdir}" install
111 find "${pkgdir}"/opt/meego/${pkgname}/lib/pkgconfig -type f -name '*.pc' \
112 -exec perl -pi -e "s, L${pkgdir}/qt-everywhere-opensource-src-${pkgver}/?\S+,,g" {} \;
113 find "${pkgdir}"/opt/meego/${pkgname}/lib -type f -name '*.prl' \
114 -exec sed -i -e "/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/" {} \;
116 for file in assistant designer linguist; do
117 install -Dm644 "${srcdir}"/${file}.desktop "${pkgdir}"/opt/meego/${pkgname}/share/applications/${file}.desktop
118 install -Dm644 "${srcdir}"/${file}.png "${pkgdir}"/opt/meego/${pkgname}/share/pixmaps/${file}.png
122 rm -f "${pkgdir}"/opt/meego/${pkgname}/share/qt4/translations/qtconfig_*.qm
123 find "${pkgdir}"/opt/meego/${pkgname}/lib/ -depth -type d \( -false \
128 \) -print0 | xargs -0 rm -rf
130 install -d "${pkgdir}"/usr/bin
131 ln -sf /opt/meego/${pkgname}/bin/qmake "${pkgdir}"/usr/bin/meego-sdk-qmake
132 ln -sf /opt/meego/${pkgname}/bin/meego-sdk-qmlviewer "${pkgdir}"/usr/bin/meego-sdk-qmlviewer
134 install -d "${pkgdir}"/usr/share/applications
135 for file in assistant designer linguist; do
136 ln -sf /opt/meego/${pkgname}/share/applications/${file}.desktop \
137 "${pkgdir}"/usr/share/applications/meego-sdk-${file}.desktop
140 install -Dm755 "${srcdir}"/meego-sdk-qmlviewer.sh "${pkgdir}"/opt/meego/${pkgname}/bin/meego-sdk-qmlviewer
143 for module in QtCore QtDeclarative QtGui QtScript; do
144 cp -a "${srcdir}"/qt-everywhere-opensource-src-${pkgver}/include/${module}/private \
145 "${pkgdir}"/opt/meego/${pkgname}/include/qt4/${module}
147 install -d "${pkgdir}"/opt/meego/${pkgname}/src/{corelib,script}
148 cp -a "${srcdir}"/qt-everywhere-opensource-src-${pkgver}/src/corelib/{animation,kernel} \
149 "${pkgdir}"/opt/meego/${pkgname}/src/corelib
150 cp -a "${srcdir}"/qt-everywhere-opensource-src-${pkgver}/src/declarative \
151 "${pkgdir}"/opt/meego/${pkgname}/src/
152 cp -a "${srcdir}"/qt-everywhere-opensource-src-${pkgver}/src/script/bridge \
153 "${pkgdir}"/opt/meego/${pkgname}/src/script
154 for component in effects image graphicsview kernel widgets; do
155 cp -a "${srcdir}"/qt-everywhere-opensource-src-${pkgver}/src/gui/${component} \
156 "${pkgdir}"/opt/meego/${pkgname}/src/gui
158 cp -a "${srcdir}"/qt-everywhere-opensource-src-${pkgver}/include/phonon/private \
159 "${pkgdir}"/opt/meego/${pkgname}/include/qt4/phonon
160 install -d "${pkgdir}"/opt/meego/${pkgname}/src/3rdparty/phonon
161 cp -a "${srcdir}"/qt-everywhere-opensource-src-${pkgver}/src/3rdparty/phonon/phonon \
162 "${pkgdir}"/opt/meego/${pkgname}/src/3rdparty/phonon
165 find "${pkgdir}"/opt/meego/${pkgname}/src -type f -name \*.cpp -delete
166 find "${pkgdir}"/opt/meego/${pkgname}/src -depth -type d \( -false \
171 \) -print0 | xargs -0 rm -rf
173 find "${pkgdir}" -type f -perm /u+x,g+x,o+x \( -false \