2011-01-15 22:29:29 +08:00
|
|
|
# Lib32 Packages for Chakra, part of chakra-project.org
|
|
|
|
#
|
|
|
|
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
|
|
|
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
|
|
|
|
|
|
|
_pkgbasename=qt
|
|
|
|
pkgname=lib32-$_pkgbasename
|
2011-10-20 00:43:56 +08:00
|
|
|
pkgver=4.7.4
|
2011-01-15 22:29:29 +08:00
|
|
|
pkgrel=1
|
2011-10-20 00:43:56 +08:00
|
|
|
#kdeqtver=b427b5e64483612122e56104552a9704f6013680
|
2011-01-15 22:29:29 +08:00
|
|
|
pkgdesc='A cross-platform application and UI framework (32-bit)'
|
|
|
|
arch=('x86_64')
|
|
|
|
url='http://qt.nokia.com/'
|
|
|
|
license=('GPL3' 'LGPL')
|
|
|
|
depends=(lib32-{fontconfig,sqlite3,alsa-lib,glib2,dbus-core,openssl}
|
|
|
|
lib32-lib{png,tiff,mng,gl,sm,xrandr,xv,xi,xinerama,xcursor,xfixes} $_pkgbasename)
|
|
|
|
|
|
|
|
makedepends=(cups gcc-multilib lib32-{mesa,libcups,libxfixes})
|
|
|
|
options=('!libtool')
|
|
|
|
_pkgfqn="qt-everywhere-opensource-src-${pkgver}"
|
|
|
|
source=("ftp://ftp.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz"
|
2011-10-20 00:43:56 +08:00
|
|
|
# "http://chakra-project.org/sources/qt/kde-qt-${kdeqtver}.patch.gz"
|
|
|
|
"appmenu.patch")
|
2011-01-15 22:29:29 +08:00
|
|
|
|
2011-10-20 00:43:56 +08:00
|
|
|
md5sums=('9831cf1dfa8d0689a06c2c54c5c65aaf'
|
|
|
|
# 'cc361e2dff48a56cff9a1649cfc004b2'
|
|
|
|
'7ca519c824d67cfae0281ec50af24ad8')
|
2011-01-15 22:29:29 +08:00
|
|
|
|
|
|
|
_create-kdeqt-patch() {
|
2011-10-20 00:43:56 +08:00
|
|
|
#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"
|
2011-01-15 22:29:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset QMAKESPEC
|
|
|
|
export QT4DIR=$srcdir/$_pkgfqn
|
|
|
|
export PATH=${QT4DIR}/bin:${PATH}
|
|
|
|
export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
|
|
|
|
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
|
|
|
|
|
|
|
cd $srcdir/$_pkgfqn
|
|
|
|
|
2011-10-20 00:43:56 +08:00
|
|
|
# msg "applying kde-qt patches"
|
|
|
|
# patch -p1 -i $srcdir/kde-qt-${kdeqtver}.patch || return 1
|
2011-01-15 22:29:29 +08:00
|
|
|
|
2011-10-20 00:43:56 +08:00
|
|
|
msg "apply other patches"
|
|
|
|
# apply appmenu patch from Aurelien Gateau
|
|
|
|
patch -Np1 -i ${srcdir}/appmenu.patch || return 1
|
|
|
|
cp ${srcdir}/${_pkgfqn}/src/gui/widgets/qabstractmenubarimpl_p.h ${srcdir}/${_pkgfqn}/include/QtGui/private/ || return 1
|
2011-01-15 22:29:29 +08:00
|
|
|
|
2011-10-20 00:43:56 +08:00
|
|
|
sed -e "s|-O2|$CXXFLAGS -m32|" \
|
2011-01-15 22:29:29 +08:00
|
|
|
-e "/^QMAKE_RPATH/s| -Wl,-rpath,||g" \
|
|
|
|
-e "/^QMAKE_LINK\s/s|g++|g++ -m32|g" \
|
|
|
|
-e "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" \
|
|
|
|
-i mkspecs/common/g++.conf
|
|
|
|
|
|
|
|
./configure -confirm-license -opensource -v -platform linux-g++-32 \
|
|
|
|
-prefix /usr \
|
|
|
|
-libdir /usr/lib32 \
|
|
|
|
-plugindir /usr/lib32/qt/plugins \
|
|
|
|
-importdir /usr/lib32/qt/imports \
|
|
|
|
-datadir /usr/share/qt \
|
|
|
|
-translationdir /usr/share/qt/translations \
|
|
|
|
-sysconfdir /etc \
|
|
|
|
-largefile \
|
|
|
|
-system-sqlite \
|
|
|
|
-xmlpatterns \
|
|
|
|
-no-phonon \
|
|
|
|
-no-phonon-backend \
|
|
|
|
-svg \
|
|
|
|
-webkit \
|
|
|
|
-script \
|
|
|
|
-scripttools \
|
|
|
|
-system-zlib \
|
|
|
|
-system-libtiff \
|
|
|
|
-system-libpng \
|
|
|
|
-system-libmng \
|
|
|
|
-system-libjpeg \
|
|
|
|
-nomake demos \
|
|
|
|
-nomake examples \
|
|
|
|
-nomake docs \
|
|
|
|
-nomake tools \
|
|
|
|
-no-rpath \
|
|
|
|
-openssl-linked \
|
|
|
|
-optimized-qmake \
|
|
|
|
-dbus \
|
|
|
|
-reduce-relocations \
|
|
|
|
-no-separate-debug-info \
|
|
|
|
-no-gtkstyle \
|
|
|
|
-opengl \
|
|
|
|
-no-openvg \
|
|
|
|
-glib
|
|
|
|
|
2011-10-20 00:43:56 +08:00
|
|
|
msg "starting the build"
|
|
|
|
make
|
2011-01-15 22:29:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd $srcdir/$_pkgfqn
|
|
|
|
make INSTALL_ROOT=$pkgdir install
|
|
|
|
|
|
|
|
# Fix wrong path in pkgconfig files
|
|
|
|
find ${pkgdir}/usr/lib32/pkgconfig -type f -name '*.pc' \
|
|
|
|
-exec perl -pi -e "s, -L${srcdir}/?\S+,,g" {} \;
|
|
|
|
# Fix wrong path in prl files
|
|
|
|
find ${pkgdir}/usr/lib32 -type f -name '*.prl' \
|
|
|
|
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
|
|
|
|
|
|
|
|
rm -rf "${pkgdir}"/usr/{include,share,bin}
|
|
|
|
mkdir -p "$pkgdir/usr/share/licenses"
|
|
|
|
ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
|
|
|
|
}
|