updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / meego-sdk-qt / PKGBUILD
blob00ef6fe5e7192341aa612926932a41957b955789
1 # Maintainer: Andrea Scarpino <andrea@archlinux.org>
3 pkgname=meego-sdk-qt
4 pkgver=4.7.2
5 pkgrel=2
6 _rpmver=3.2
7 pkgdesc='Cross-platform application and UI framework'
8 arch=('i686' 'x86_64')
9 _arch=32
10 [ "$CARCH" = "x86_64" ] && _arch=64
11 url='http://qt.nokia.com/'
12 license=('LGPL2')
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')
18 options=('!libtool')
19 install=${pkgname}.install
20 source=("http://download.meego.com/live/Tools:/SDK:/Host/Trunk/src/${pkgname}-${pkgver}-${_rpmver}.src.rpm")
21 md5sums=('0ecaebe118bdf9c540ef83b17a56b593')
23 build() {
24   cd "${srcdir}"
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
38   export QTDIR=`pwd`
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
44   # FS#24601
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" \
60     -opensource \
61     -fast \
62     -no-sql-ibase \
63     -no-sql-mysql \
64     -no-sql-odbc \
65     -no-sql-psql \
66     -plugin-sql-sqlite \
67     -no-sql-sqlite2 \
68     -no-sql-tds \
69     -system-sqlite \
70     -no-qt3support \
71     -xmlpatterns \
72     -no-multimedia \
73     -audio-backend \
74     -phonon \
75     -phonon-backend \
76     -svg \
77     -webkit \
78     -script \
79     -scripttools \
80     -platform linux-g++ \
81     -system-zlib \
82     -qt-gif \
83     -system-libtiff \
84     -system-libpng \
85     -system-libjpeg \
86     -no-rpath \
87     -optimized-qmake \
88     -dbus-linked \
89     -no-separate-debug-info \
90     -verbose \
91     -gtkstyle \
92     -no-nas-sound \
93     -opengl desktop \
94     -no-egl \
95     -arch $_arch \
96     -no-openvg \
97     -lfontconfig \
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/ \
103     -qvfb
104   make
107 package() {
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
119   done
121   # cleanup
122   rm -f "${pkgdir}"/opt/meego/${pkgname}/share/qt4/translations/qtconfig_*.qm
123   find "${pkgdir}"/opt/meego/${pkgname}/lib/ -depth -type d \( -false \
124     -o -name .moc\* \
125     -o -name .obj\* \
126     -o -name .pch \
127     -o -name .rcc \
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
138   done
140   install -Dm755 "${srcdir}"/meego-sdk-qmlviewer.sh "${pkgdir}"/opt/meego/${pkgname}/bin/meego-sdk-qmlviewer
142   # Private headers
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}
146   done
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  
157   done
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
164   # cleanup
165   find "${pkgdir}"/opt/meego/${pkgname}/src -type f -name \*.cpp -delete
166   find "${pkgdir}"/opt/meego/${pkgname}/src -depth -type d \( -false \
167     -o -name .moc\* \
168     -o -name .obj\* \
169     -o -name .pch \
170     -o -name .rcc \
171     \) -print0 | xargs -0 rm -rf
173   find "${pkgdir}" -type f -perm /u+x,g+x,o+x \( -false \
174     -o -name \*.cpp \
175     -o -name \*.h \
176     -o -name \*.png \
177     \) | xargs chmod -x