updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / mingw32-qt / PKGBUILD
blob9abf9dce838fa298f713df1584f547993c89baa1
1 # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
2 # Contributor: Denis Martinez <deuns.martinez AT gmail.com>
3 # Contributor: Alexander 'hatred' Drozdov <adrozdoff AT gmail.com>
4 # Contributor: mosra <mosra@centrum.cz>
5 # Contributor: Alexandre Bique <bique.alexandre@gmail.com>
7 pkgname=mingw32-qt
8 true && pkgname=(mingw32-qt mingw32-qt-private-headers)
9 pkgver=4.8.0
10 pkgrel=2
11 pkgdesc="The Qt gui toolkit (mingw32)."
12 arch=('any')
13 url="http://qt.nokia.com/"
14 license=('LGPL')
15 depends=('mingw32-gcc' 'mingw32-zlib' 'mingw32-libjpeg' 'mingw32-libiconv' 'mingw32-libtiff' 'mingw32-sqlite3' 'mingw32-libpng14') #'mingw32-openssl'
16 makedepends=()
17 options=(!strip !buildflags !libtool)
18 _pkgfqn="qt-everywhere-opensource-src-${pkgver}"
19 source=("ftp://ftp.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz"
20         i486-mingw32-qmake
21         qplatformdefs.h
22         qmake.conf
23         qt-dbus-dont-link-to-dbus-1d.patch)
24 md5sums=('e8a5fdbeba2927c948d9f477a6abe904'
25          '32e7e887cc8d783491db8845296f7753'
26          'e3edee8c1b183043198f826fb3171670'
27          '9da22e30dff63369b1fa0b73b6bc2629'
28          '878ff1ea1ae368647c75cdaa7444ae86')
30 build() {
31   cd "${srcdir}/${_pkgfqn}"
33   patch -Np0 < ${srcdir}/qt-dbus-dont-link-to-dbus-1d.patch
35   mkdir -p mkspecs/win32-g++-cross
36   cp ${srcdir}/qplatformdefs.h mkspecs/win32-g++-cross
37   cp ${srcdir}/qmake.conf mkspecs/win32-g++-cross
39   export PKG_CONFIG_LIBDIR="/usr/i486-mingw32/lib/pkgconfig"
40   unset PKG_CONFIG_PATH
42   ./configure -confirm-license -opensource \
43       -release \
44       -prefix /usr/i486-mingw32 \
45       -datadir /usr/i486-mingw32/share/qt \
46       -shared \
47       -qt3support \
48       -verbose \
49       -exceptions \
50       -fast \
51       -confirm-license \
52       -force-pkg-config \
53       -little-endian \
54       -xplatform win32-g++-cross \
55       -xmlpatterns \
56       -multimedia \
57       -audio-backend \
58       -no-webkit \
59       -script \
60       -scripttools \
61       -declarative \
62       -no-phonon \
63       -qt-libmng \
64       -system-zlib \
65       -system-libtiff \
66       -system-libpng \
67       -system-libjpeg \
68       -system-sqlite \
69       -iconv \
70       -nomake demos \
71       -nomake examples \
72       -nomake docs
74   make
77 package_mingw32-qt() {
78     pkgdesc='A cross-platform application and UI framework (mingw32)'
80     cd "${srcdir}/${_pkgfqn}"
82     make install INSTALL_ROOT=${pkgdir}
84     # install qmake
85     install -D -m755 bin/qmake ${pkgdir}/usr/i486-mingw32/bin/qmake
87     cd "$pkgdir/usr/i486-mingw32"
89     # Move plugins to bin/qt-plugins
90     mkdir -p bin/qt-plugins
91     mv plugins bin/qt-plugins
93     # Move imports to bin/qt-imports
94     mkdir -p bin/qt-imports
95     mv imports bin/qt-imports
97     # Install only relevant mkspecs
98     rm -r share/qt/mkspecs
99     mkdir -p ${pkgdir}/usr/share/qt/mkspecs/win32-g++-cross
100     cp ${srcdir}/qplatformdefs.h ${pkgdir}/usr/share/qt/mkspecs/win32-g++-cross
101     cp ${srcdir}/qmake.conf ${pkgdir}/usr/share/qt/mkspecs/win32-g++-cross
103     # Make default mkspec in cross-environment
104     mkdir -p ${pkgdir}/usr/i486-mingw32/share/qt/mkspecs
105     cd ${pkgdir}/usr/i486-mingw32/share/qt/mkspecs
106     ln -s /usr/share/qt/mkspecs/win32-g++-cross default
108     # qmake wrapper
109     install -D -m755 ${srcdir}/i486-mingw32-qmake ${pkgdir}/usr/bin/i486-mingw32-qmake
112 package_mingw32-qt-private-headers() {
113     pkgdesc='Qt private header development (mingw32)'
115     install -d ${pkgdir}/usr/i486-mingw32/include/{QtCore,QtDeclarative,QtGui,QtScript}
116     install -d ${pkgdir}/usr/i486-mingw32/src/{corelib,declarative,gui,script}
118     for i in QtCore QtDeclarative QtGui QtScript; do
119         cp -r "${srcdir}/$_pkgfqn/include/${i}/private/" \
120             "${pkgdir}/usr/i486-mingw32/include/${i}/"
121     done
123     for i in corelib declarative gui script; do
124         cp -r "${srcdir}/$_pkgfqn/src/${i}" "${pkgdir}/usr/i486-mingw32/src/"
125     done