2010-05-20 12:03:20 +08:00
|
|
|
#
|
|
|
|
# QT Packages for Chakra, part of chakra-project.org
|
|
|
|
#
|
|
|
|
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
|
|
|
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
|
|
|
|
2011-05-09 12:59:26 +08:00
|
|
|
pkgbase=qt
|
|
|
|
pkgname=('qt' 'qt-private-headers')
|
2011-12-19 14:51:17 +08:00
|
|
|
pkgver=4.8.0
|
2012-03-02 00:05:04 +08:00
|
|
|
pkgrel=4
|
2010-05-17 16:01:47 +08:00
|
|
|
arch=('i686' 'x86_64')
|
2011-05-09 12:59:26 +08:00
|
|
|
url='http://qt.nokia.com/'
|
|
|
|
license=('GPL3' 'LGPL')
|
|
|
|
makedepends=('libtiff' 'libpng' 'libmng' 'sqlite3' 'ca-certificates' 'glib2' 'dbus'
|
|
|
|
'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
|
|
|
|
'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils' 'mesa' 'postgresql-libs'
|
2011-10-08 00:06:17 +08:00
|
|
|
'mysql' 'unixodbc' 'cups' 'libxinerama' 'libxcursor')
|
2011-05-09 12:59:26 +08:00
|
|
|
options=('!libtool')
|
|
|
|
_pkgfqn="qt-everywhere-opensource-src-${pkgver}"
|
2010-05-17 16:01:47 +08:00
|
|
|
source=("ftp://ftp.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz"
|
2011-05-09 12:59:26 +08:00
|
|
|
'assistant.desktop' 'designer.desktop' 'linguist.desktop'
|
2012-01-20 15:20:38 +08:00
|
|
|
'qtconfig.desktop'
|
2012-03-02 00:05:04 +08:00
|
|
|
'fix-qgraphicsscene-regression.patch'
|
|
|
|
'improved-filter-event.patch'
|
2012-01-20 15:20:38 +08:00
|
|
|
"http://chakra-linux.org/sources/qt/qt-everywhere-opensource-src-4.8.0-QUrl_toLocalFile.patch")
|
2011-12-19 14:51:17 +08:00
|
|
|
md5sums=('e8a5fdbeba2927c948d9f477a6abe904'
|
2011-05-09 12:59:26 +08:00
|
|
|
'fc211414130ab2764132e7370f8e5caa'
|
|
|
|
'85179f5e0437514f8639957e1d8baf62'
|
|
|
|
'f11852b97583610f3dbb669ebc3e21bc'
|
2012-01-20 15:20:38 +08:00
|
|
|
'6b771c8a81dd90b45e8a79afa0e5bbfd'
|
2012-03-02 00:05:04 +08:00
|
|
|
'57f0e3ca3b5acd264a07c3ea3fd3f3a9'
|
|
|
|
'2ace80d6392f0ddfa2a7640597811a2c'
|
2012-01-20 15:20:38 +08:00
|
|
|
'7bc255a36733d0fbc80c1902ade4beca')
|
2011-05-06 14:37:57 +08:00
|
|
|
|
|
|
|
# source PKGBUILD && _create-kdeqt-patch
|
|
|
|
_create-kdeqt-patch() {
|
|
|
|
#Create patches
|
|
|
|
echo "creating kde-qt patches"
|
|
|
|
local codir=$(mktemp -d)
|
|
|
|
mkdir -p "${codir}/kde-qt"
|
|
|
|
git clone git://gitorious.org/+kde-developers/qt/kde-qt.git "${codir}/kde-qt"
|
|
|
|
pushd "${codir}/kde-qt"
|
|
|
|
git checkout --track -b ${pkgver}-patched origin/${pkgver}-patched
|
|
|
|
local kdeqtver=$(git --no-pager show --format='%H' "${pkgver}-patched" | head -1)
|
|
|
|
git diff "v${pkgver}..${pkgver}-patched" | gzip > "${codir}/kde-qt-${kdeqtver}.patch.gz"
|
|
|
|
popd
|
|
|
|
mv "${codir}/kde-qt-${kdeqtver}.patch.gz" .
|
|
|
|
rm -rf "${codir}"
|
|
|
|
md5sum kde-qt-${kdeqtver}.patch.gz
|
|
|
|
echo "change kdeqtver to $kdeqtver"
|
|
|
|
}
|
2010-05-17 16:01:47 +08:00
|
|
|
|
2010-08-22 18:56:14 +08:00
|
|
|
build() {
|
2010-05-17 16:01:47 +08:00
|
|
|
cd $srcdir/$_pkgfqn
|
2011-05-09 12:59:26 +08:00
|
|
|
# if [ -n "${kdeqtver}" ]; then
|
|
|
|
# msg "applying kde-qt patches"
|
|
|
|
# patch -p1 -i $srcdir/kde-qt-${kdeqtver}.patch || return 1
|
|
|
|
# # editing qt.install
|
|
|
|
# sed -i -e 's/^.*kde-qt .*/ echo " kde-qt '${kdeqtver}'"/' $startdir/qt.install
|
|
|
|
# fi
|
|
|
|
|
2012-01-20 15:20:38 +08:00
|
|
|
#KDE sound-notification work-around
|
|
|
|
patch -Np1 -i ${srcdir}/qt-everywhere-opensource-src-4.8.0-QUrl_toLocalFile.patch
|
2012-03-02 00:05:04 +08:00
|
|
|
# (QTBUG-22663) (KDEBUG#275469)
|
|
|
|
patch -p1 -i "${srcdir}"/improved-filter-event.patch
|
|
|
|
patch -p1 -i "${srcdir}"/fix-qgraphicsscene-regression.patch
|
2011-12-20 19:57:29 +08:00
|
|
|
export QT4DIR="${srcdir}"/${_pkgfqn}
|
2011-12-19 14:51:17 +08:00
|
|
|
export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
|
2011-07-12 10:04:17 +08:00
|
|
|
|
2011-12-19 14:51:17 +08:00
|
|
|
sed -i "s|-O2|${CXXFLAGS}|" mkspecs/common/g++-base.conf
|
|
|
|
sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" mkspecs/common/gcc-base-unix.conf
|
|
|
|
sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" mkspecs/common/gcc-base.conf
|
2010-05-17 16:01:47 +08:00
|
|
|
|
2011-05-04 08:20:33 +08:00
|
|
|
./configure -confirm-license -opensource \
|
2010-05-18 22:39:29 +08:00
|
|
|
-prefix /usr \
|
2011-05-04 08:20:33 +08:00
|
|
|
-docdir /usr/share/doc/qt \
|
2010-05-17 16:01:47 +08:00
|
|
|
-plugindir /usr/lib/qt/plugins \
|
2011-05-04 08:20:33 +08:00
|
|
|
-importdir /usr/lib/qt/imports \
|
2010-05-17 16:01:47 +08:00
|
|
|
-datadir /usr/share/qt \
|
2011-05-04 08:20:33 +08:00
|
|
|
-translationdir /usr/share/qt/translations \
|
|
|
|
-sysconfdir /etc \
|
2010-05-17 16:01:47 +08:00
|
|
|
-examplesdir /usr/share/doc/qt/examples \
|
|
|
|
-demosdir /usr/share/doc/qt/demos \
|
|
|
|
-plugin-sql-{psql,mysql,sqlite,odbc} \
|
|
|
|
-system-sqlite \
|
|
|
|
-no-phonon \
|
|
|
|
-no-phonon-backend \
|
2011-10-09 23:56:17 +08:00
|
|
|
-no-webkit \
|
2011-12-19 14:51:17 +08:00
|
|
|
-graphicssystem raster \
|
2011-12-20 19:57:29 +08:00
|
|
|
-openssl-linked \
|
|
|
|
-nomake demos \
|
|
|
|
-nomake examples \
|
|
|
|
-nomake docs \
|
|
|
|
-silent \
|
|
|
|
-no-rpath \
|
|
|
|
-optimized-qmake \
|
|
|
|
-reduce-relocations \
|
|
|
|
-dbus-linked \
|
|
|
|
-no-openvg \
|
|
|
|
-xcursor
|
2011-12-19 14:51:17 +08:00
|
|
|
make
|
2010-08-22 18:56:14 +08:00
|
|
|
}
|
2010-05-17 16:01:47 +08:00
|
|
|
|
2011-05-09 12:59:26 +08:00
|
|
|
package_qt() {
|
|
|
|
pkgdesc='A cross-platform application and UI framework'
|
|
|
|
depends=('libtiff' 'libpng' 'libmng' 'sqlite3' 'ca-certificates' 'glib2' 'dbus'
|
|
|
|
'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
|
2011-10-10 01:21:12 +08:00
|
|
|
'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils' 'libxinerama' 'libxcursor' 'qtwebkit')
|
2011-05-09 12:59:26 +08:00
|
|
|
optdepends=('postgresql-libs: PostgreSQL driver'
|
|
|
|
'libmysqlclient: MySQL driver'
|
|
|
|
'unixodbc: ODBC driver'
|
|
|
|
'libxinerama: Xinerama support'
|
|
|
|
'libxfixes: Xfixes support')
|
|
|
|
conflicts=('qt-doc' 'qt-debug' 'qt-demos' 'qt-tools')
|
|
|
|
provides=('qt-tools')
|
|
|
|
install='qt.install'
|
|
|
|
|
|
|
|
cd $srcdir/$_pkgfqn
|
|
|
|
make INSTALL_ROOT=$pkgdir install
|
2011-05-06 14:37:57 +08:00
|
|
|
|
2011-05-09 12:59:26 +08:00
|
|
|
# install missing icons and desktop files
|
|
|
|
for icon in tools/linguist/linguist/images/icons/linguist-*-32.png ; do
|
|
|
|
size=$(echo $(basename ${icon}) | cut -d- -f2)
|
|
|
|
install -p -D -m644 ${icon} ${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png
|
|
|
|
done
|
|
|
|
install -p -D -m644 src/gui/dialogs/images/qtlogo-64.png ${pkgdir}/usr/share/icons/hicolor/64x64/apps/qtlogo.png
|
|
|
|
install -p -D -m644 tools/assistant/tools/assistant/images/assistant.png ${pkgdir}/usr/share/icons/hicolor/32x32/apps/assistant.png
|
|
|
|
install -p -D -m644 tools/designer/src/designer/images/designer.png ${pkgdir}/usr/share/icons/hicolor/128x128/apps/designer.png
|
|
|
|
install -d ${pkgdir}/usr/share/applications
|
|
|
|
install -m644 ${srcdir}/{linguist,designer,assistant,qtconfig}.desktop ${pkgdir}/usr/share/applications/
|
2011-05-06 14:37:57 +08:00
|
|
|
|
2011-05-09 12:59:26 +08:00
|
|
|
# install license addition
|
2010-05-17 16:01:47 +08:00
|
|
|
install -D -m644 LGPL_EXCEPTION.txt ${pkgdir}/usr/share/licenses/qt/LGPL_EXCEPTION.txt
|
|
|
|
|
2011-05-09 12:59:26 +08:00
|
|
|
# Fix wrong path in pkgconfig files
|
|
|
|
find ${pkgdir}/usr/lib/pkgconfig -type f -name '*.pc' \
|
|
|
|
-exec perl -pi -e "s, -L${srcdir}/?\S+,,g" {} \;
|
|
|
|
# Fix wrong path in prl files
|
|
|
|
find ${pkgdir}/usr/lib -type f -name '*.prl' \
|
|
|
|
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
|
2010-05-17 16:01:47 +08:00
|
|
|
}
|
|
|
|
|
2011-05-09 12:59:26 +08:00
|
|
|
package_qt-private-headers(){
|
|
|
|
pkgdesc="Qt private headers for development"
|
|
|
|
depends=("qt=${pkgver}")
|
2010-05-17 16:01:47 +08:00
|
|
|
|
2011-07-12 10:04:17 +08:00
|
|
|
install -d ${pkgdir}/usr/include/{QtCore,QtDeclarative,QtGui,QtScript}
|
|
|
|
install -d ${pkgdir}/usr/src/{corelib,declarative,gui,script}
|
2010-05-17 16:01:47 +08:00
|
|
|
|
2011-07-12 10:04:17 +08:00
|
|
|
for i in QtCore QtDeclarative QtGui QtScript; do
|
|
|
|
cp -r ${srcdir}/$_pkgfqn/include/${i}/private/ \
|
|
|
|
${pkgdir}/usr/include/${i}/
|
|
|
|
done
|
|
|
|
|
|
|
|
for i in corelib declarative gui script; do
|
|
|
|
cp -r ${srcdir}/$_pkgfqn/src/${i} ${pkgdir}/usr/src/
|
|
|
|
done
|
2010-05-17 16:01:47 +08:00
|
|
|
}
|