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-06 14:37:57 +08:00
|
|
|
# original name (used for the source and pkgnames)
|
|
|
|
_origname=qt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pkgbase=('qt')
|
|
|
|
pkgname=('qt'
|
|
|
|
'qt-doc'
|
|
|
|
'qt-debug'
|
|
|
|
'qt-demos'
|
|
|
|
'qt-tools')
|
|
|
|
|
|
|
|
pkgver=4.7.2
|
|
|
|
pkgrel=2
|
|
|
|
#kdeqtver=b427b5e64483612122e56104552a9704f6013680
|
|
|
|
|
|
|
|
pkgdesc="A cross-platform application and UI framework"
|
2010-05-17 16:01:47 +08:00
|
|
|
arch=('i686' 'x86_64')
|
2011-05-06 14:37:57 +08:00
|
|
|
url="http://qt.nokia.com/"
|
|
|
|
license=('LGPL')
|
|
|
|
|
|
|
|
# because qt has its own "create debug files" implementation,
|
|
|
|
# we can disable our splithdr option and create qt-debug directly
|
|
|
|
# inside the PKGBUILD. This works even with the standard arch makepkg.
|
|
|
|
options=('!libtool' 'docs' '!strip')
|
|
|
|
|
|
|
|
makedepends=('inputproto'
|
|
|
|
'postgresql-libs'
|
|
|
|
'mysql>=5.5.10'
|
|
|
|
'apr-util' # needed for soprano/virtuoso backend, libiodbc is compatible to unixodbc
|
|
|
|
'libiodbc' # needed for soprano/virtuoso backend, libiodbc is compatible to unixodbc
|
|
|
|
'cups'
|
|
|
|
'libxfixes'
|
|
|
|
'libpng'
|
|
|
|
'libxi'
|
|
|
|
'mesa'
|
|
|
|
'fontconfig'
|
|
|
|
'libxrandr'
|
|
|
|
'glib2'
|
|
|
|
'libtiff>=3.9.2-2'
|
|
|
|
'libmng>=1.0.10-3'
|
|
|
|
'libpng>=1.4.0'
|
|
|
|
'libjpeg>=8'
|
|
|
|
'sqlite3'
|
|
|
|
'dbus'
|
|
|
|
'libxcursor'
|
|
|
|
'libxinerama'
|
|
|
|
'libmysqlclient>=5.5.10'
|
|
|
|
'git') # 'gconf'
|
|
|
|
|
|
|
|
_pkgfqn=${_origname}-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-06 14:37:57 +08:00
|
|
|
# "http://chakra-project.org/sources/qt/kde-qt-${kdeqtver}.patch.gz"
|
|
|
|
'assistant.desktop'
|
|
|
|
'designer.desktop'
|
|
|
|
'linguist.desktop'
|
|
|
|
'qtconfig.desktop'
|
|
|
|
'http://chakra-project.org/sources/qt/qt-any-demosexamples-manual-install.patch'
|
|
|
|
"http://chakra-project.org/sources/qt/qt-${pkgver}-appmenu.patch")
|
|
|
|
|
|
|
|
md5sums=('66b992f5c21145df08c99d21847f4fdb'
|
|
|
|
# 'cc361e2dff48a56cff9a1649cfc004b2' # kde-qt-b427b5e64483612122e56104552a9704f6013680.patch.gz
|
|
|
|
'20d333282c43f9e643cb8e91b6307dcc'
|
|
|
|
'bf89ee0bdd178933f19d8bc4090173ec'
|
|
|
|
'a9bfeeffab8ba103bc8153fdb31474a1'
|
|
|
|
'83b2a4aece6c9d86301c53a979af0b63'
|
|
|
|
'579e63488320a8d692d25502551787af'
|
|
|
|
'7ca519c824d67cfae0281ec50af24ad8')
|
|
|
|
|
|
|
|
# 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() {
|
2011-05-06 14:37:57 +08:00
|
|
|
cd $srcdir/$_pkgfqn
|
|
|
|
|
2010-05-17 16:01:47 +08:00
|
|
|
unset QMAKESPEC
|
|
|
|
export QT4DIR=$srcdir/$_pkgfqn
|
|
|
|
export PATH=${QT4DIR}/bin:${PATH}
|
|
|
|
export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
|
|
|
|
|
|
|
|
cd $srcdir/$_pkgfqn
|
2011-05-06 14:37:57 +08:00
|
|
|
msg "applying kde-qt patches"
|
|
|
|
cd $srcdir/$_pkgfqn
|
|
|
|
# patch -p1 -i $srcdir/kde-qt-${kdeqtver}.patch || return 1
|
|
|
|
# editing qt.install
|
|
|
|
sed -i -e 's/^.*> Qt .*/ echo " > Qt '${pkgver}'"/' $startdir/qt.install
|
|
|
|
# sed -i -e 's/^.*kde-qt .*/ echo " kde-qt '${kdeqtver}'"/' $startdir/qt.install
|
|
|
|
|
|
|
|
echo "This build don't get patched with kde-qt patches"
|
|
|
|
sed -i -e 's/^.*kde-qt .*/ echo " kde-qt: not patched in this release"/' $startdir/qt.install
|
|
|
|
|
|
|
|
msg "apply other patches"
|
|
|
|
# apply appmenu patch from Aurelien Gateau
|
|
|
|
patch -Np1 -i ${srcdir}/qt-${pkgver}-appmenu.patch || return 1
|
|
|
|
cp ${srcdir}/${_pkgfqn}/src/gui/widgets/qabstractmenubarimpl_p.h ${srcdir}/${_pkgfqn}/include/QtGui/private/
|
|
|
|
|
|
|
|
# we want our cflags etc
|
|
|
|
sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf
|
|
|
|
sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf
|
2011-05-06 12:54:23 +08:00
|
|
|
sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf
|
2011-05-06 14:37:57 +08:00
|
|
|
|
|
|
|
msg "starting configure"
|
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 \
|
2011-05-04 08:20:33 +08:00
|
|
|
-largefile \
|
2010-05-17 16:01:47 +08:00
|
|
|
-plugin-sql-{psql,mysql,sqlite,odbc} \
|
|
|
|
-system-sqlite \
|
2011-05-04 08:20:33 +08:00
|
|
|
-xmlpatterns \
|
2010-05-17 16:01:47 +08:00
|
|
|
-no-phonon \
|
|
|
|
-no-phonon-backend \
|
2011-05-06 14:37:57 +08:00
|
|
|
-debug \
|
|
|
|
-separate-debug-info \
|
2010-05-17 16:01:47 +08:00
|
|
|
-svg \
|
|
|
|
-webkit \
|
2011-05-04 08:20:33 +08:00
|
|
|
-script \
|
2010-05-17 16:01:47 +08:00
|
|
|
-scripttools \
|
|
|
|
-system-zlib \
|
|
|
|
-system-libtiff \
|
|
|
|
-system-libpng \
|
|
|
|
-system-libmng \
|
|
|
|
-system-libjpeg \
|
2011-05-04 08:20:33 +08:00
|
|
|
-nomake docs \
|
2010-05-17 16:01:47 +08:00
|
|
|
-no-rpath \
|
2011-05-06 14:37:57 +08:00
|
|
|
-no-gtkstyle \
|
2011-05-04 08:20:33 +08:00
|
|
|
-openssl-linked \
|
|
|
|
-silent \
|
|
|
|
-optimized-qmake \
|
|
|
|
-dbus \
|
|
|
|
-reduce-relocations \
|
2010-05-17 16:01:47 +08:00
|
|
|
-opengl \
|
2011-05-04 08:20:33 +08:00
|
|
|
-no-openvg \
|
|
|
|
-glib
|
2011-05-06 14:37:57 +08:00
|
|
|
|
|
|
|
# disable automatic installation of demos and examples, we want to do that manually
|
|
|
|
patch -p0 -i $srcdir/qt-any-demosexamples-manual-install.patch || return 1
|
|
|
|
|
|
|
|
msg "starting the build"
|
|
|
|
make || return 1
|
2010-08-22 18:56:14 +08:00
|
|
|
}
|
2010-05-17 16:01:47 +08:00
|
|
|
|
2011-05-06 14:37:57 +08:00
|
|
|
package_qt()
|
|
|
|
{
|
|
|
|
pkgdesc="A cross-platform application and UI framework"
|
|
|
|
depends=('libpng>=1.4.0' 'libxi' 'mesa' 'fontconfig' 'libxrandr' 'glib2' 'libtiff>=3.9.2-2' 'libmng>=1.0.10-3' 'libjpeg>=8' 'sqlite3' 'dbus' 'libxcursor' 'libxinerama')
|
|
|
|
optdepends=('postgresql-libs : PostgreSQL support'
|
|
|
|
'libmysqlclient : MySQL support'
|
|
|
|
'iodbc/unixodbc : ODBC support')
|
|
|
|
# 'gconf : qgtkstyle theme support for GTK')
|
|
|
|
provides=("qt4=${pkgver}" "qt=${pkgver}") # "phonon=4.3.80"
|
|
|
|
replaces=('qt-devel' 'qtmod')
|
|
|
|
conflicts=('qt4' 'qtmod')
|
|
|
|
groups=("kde" "kde-complete" "kde-uninstall" "kde-minimal")
|
|
|
|
install=qt.install
|
2010-05-17 16:01:47 +08:00
|
|
|
|
2011-05-06 14:37:57 +08:00
|
|
|
cd $srcdir/$_pkgfqn
|
2010-05-17 16:01:47 +08:00
|
|
|
|
2011-05-06 14:37:57 +08:00
|
|
|
# install it
|
|
|
|
make INSTALL_ROOT=$pkgdir install || return 1
|
|
|
|
|
|
|
|
# cleanup and path fixes
|
|
|
|
find $pkgdir/usr/lib -type f -name '*prl' -print -exec sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" {} \;
|
|
|
|
sed -i -e "s|-L$srcdir/${_pkgfqn}/lib||g" $pkgdir/usr/lib/pkgconfig/*.pc
|
|
|
|
sed -i -e "s|$srcdir/${_pkgfqn}/bin/moc|/usr/bin/moc|g" $pkgdir/usr/lib/pkgconfig/*.pc
|
|
|
|
sed -i -e "s|$srcdir/${_pkgfqn}/bin/uic|/usr/bin/uic|g" $pkgdir/usr/lib/pkgconfig/*.pc
|
|
|
|
|
|
|
|
# icon and desktop file for qtconfig
|
|
|
|
install -D -m644 src/gui/dialogs/images/qtlogo-64.png ${pkgdir}/usr/share/pixmaps/qtlogo.png
|
|
|
|
install -D -m644 ${srcdir}/qtconfig.desktop ${pkgdir}/usr/share/applications/qtconfig.desktop
|
|
|
|
|
|
|
|
# licensing
|
2010-05-17 16:01:47 +08:00
|
|
|
install -D -m644 LGPL_EXCEPTION.txt ${pkgdir}/usr/share/licenses/qt/LGPL_EXCEPTION.txt
|
|
|
|
|
2011-05-06 14:37:57 +08:00
|
|
|
# move out some tool binaries and put them into qt-tools
|
|
|
|
# its ugly, but it "feels" cleaner ;)
|
|
|
|
mkdir -p $srcdir/bin
|
|
|
|
mv $pkgdir/usr/bin/assistant $srcdir/bin
|
|
|
|
#mv $pkgdir/usr/bin/assistant_adp $srcdir/bin
|
|
|
|
mv $pkgdir/usr/bin/designer $srcdir/bin
|
|
|
|
mv $pkgdir/usr/bin/linguist $srcdir/bin
|
|
|
|
|
|
|
|
# move out debug symbols into a temp dir and put them into qt-debug later below
|
|
|
|
mkdir -p $srcdir/debug
|
|
|
|
for x in `find $pkgdir -name *.debug`
|
|
|
|
do
|
|
|
|
basedir=`dirname $x`
|
|
|
|
targetdir=`echo $basedir | awk -F "/usr" '{print $NF}'`
|
|
|
|
mkdir -p $srcdir/debug${targetdir}
|
|
|
|
mv $x $srcdir/debug${targetdir}
|
|
|
|
done
|
2010-05-17 16:01:47 +08:00
|
|
|
}
|
|
|
|
|
2011-05-06 14:37:57 +08:00
|
|
|
package_qt-debug()
|
|
|
|
{
|
|
|
|
pkgdesc="A cross-platform application and UI framework - Debugging Symbols"
|
|
|
|
depends=("qt=${pkgver}")
|
|
|
|
optdepends=()
|
|
|
|
groups=("kde-debug" "kde-uninstall")
|
|
|
|
|
|
|
|
mkdir $pkgdir/usr
|
|
|
|
cd $srcdir
|
|
|
|
cp -r debug/* $pkgdir/usr
|
|
|
|
}
|
2010-05-17 16:01:47 +08:00
|
|
|
|
2011-05-06 14:37:57 +08:00
|
|
|
package_qt-doc()
|
|
|
|
{
|
|
|
|
pkgdesc="A cross-platform application and UI framework - Documentation"
|
|
|
|
depends=("qt=${pkgver}")
|
|
|
|
optdepends=()
|
|
|
|
provides=("qt4-doc=${pkgver}" "qt-doc=${pkgver}")
|
|
|
|
conflicts=('qt4-doc' 'qtmod-doc')
|
|
|
|
groups=("kde-complete" "kde-doc" "kde-uninstall")
|
2010-05-17 16:01:47 +08:00
|
|
|
|
2011-05-06 14:37:57 +08:00
|
|
|
cd $srcdir/$_pkgfqn
|
|
|
|
|
|
|
|
mkdir -p $pkgdir/usr/share/doc/qt
|
|
|
|
cp -r doc/* $pkgdir/usr/share/doc/qt
|
|
|
|
}
|
|
|
|
|
|
|
|
package_qt-demos()
|
|
|
|
{
|
|
|
|
pkgdesc="A cross-platform application and UI framework - Demos & Examples"
|
|
|
|
depends=("qt=${pkgver}")
|
|
|
|
optdepends=()
|
|
|
|
provides=()
|
|
|
|
replaces=('qtmod-demos')
|
|
|
|
conflicts=()
|
|
|
|
groups=("kde-uninstall")
|
2010-05-17 16:01:47 +08:00
|
|
|
|
2011-05-06 14:37:57 +08:00
|
|
|
cd $srcdir/$_pkgfqn
|
|
|
|
|
|
|
|
pushd demos
|
|
|
|
make INSTALL_ROOT=$pkgdir install || return 1
|
|
|
|
popd
|
2010-05-17 16:01:47 +08:00
|
|
|
|
2011-05-06 14:37:57 +08:00
|
|
|
pushd examples
|
|
|
|
make INSTALL_ROOT=$pkgdir install || return 1
|
|
|
|
popd
|
|
|
|
}
|
|
|
|
|
|
|
|
package_qt-tools()
|
|
|
|
{
|
|
|
|
pkgdesc="A cross-platform application and UI framework - Tools (Linguist, Designer, Assistant)"
|
|
|
|
depends=("qt=${pkgver}")
|
|
|
|
optdepends=()
|
|
|
|
provides=()
|
|
|
|
replaces=('qtmod-tools')
|
|
|
|
conflicts=()
|
|
|
|
groups=("kde-uninstall" "kde-devel")
|
|
|
|
|
|
|
|
cd $srcdir/$_pkgfqn
|
|
|
|
|
|
|
|
install -D -m755 -o root -g root $srcdir/bin/assistant $pkgdir/usr/bin/assistant
|
|
|
|
#install -D -m755 -o root -g root $srcdir/bin/assistant_adp $pkgdir/usr/bin/assistant_adp
|
|
|
|
install -D -m755 -o root -g root $srcdir/bin/designer $pkgdir/usr/bin/designer
|
|
|
|
install -D -m755 -o root -g root $srcdir/bin/linguist $pkgdir/usr/bin/linguist
|
|
|
|
|
|
|
|
install -D -m644 -o root -g root tools/assistant/tools/assistant/images/assistant.png ${pkgdir}/usr/share/pixmaps/assistant.png
|
|
|
|
install -D -m644 -o root -g root tools/linguist/linguist/images/appicon.png ${pkgdir}/usr/share/pixmaps/linguist.png
|
|
|
|
install -D -m644 -o root -g root tools/designer/src/designer/images/designer.png ${pkgdir}/usr/share/pixmaps/designer.png
|
|
|
|
install -d -o root -g root ${pkgdir}/usr/share/applications
|
|
|
|
install -m644 -o root -g root ${srcdir}/{linguist,designer,assistant}.desktop ${pkgdir}/usr/share/applications/
|
2010-05-17 16:01:47 +08:00
|
|
|
}
|