add qt 3 for this binary crap
This commit is contained in:
parent
b7364a1b08
commit
9795c051d7
141
trunk/novell4gentoo/eclass/qt3.eclass
Normal file
141
trunk/novell4gentoo/eclass/qt3.eclass
Normal file
@ -0,0 +1,141 @@
|
||||
# Copyright 2005-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/eclass/qt3.eclass,v 1.41 2009/05/17 15:17:03 hwoarang Exp $
|
||||
|
||||
# @ECLASS: qt3.eclass
|
||||
# @MAINTAINER:
|
||||
# kde-sunset overlay maintainers
|
||||
# @BLURB: Eclass for Qt3 packages
|
||||
# @DESCRIPTION:
|
||||
# This eclass contains various functions that may be useful
|
||||
# when dealing with packages using Qt3 libraries.
|
||||
|
||||
inherit toolchain-funcs versionator eutils
|
||||
|
||||
QTPKG="x11-libs/qt-"
|
||||
QT3MAJORVERSIONS="3.3 3.2 3.1 3.0"
|
||||
QT3VERSIONS="3.3.8b-r1 3.3.8b 3.3.8-r4 3.3.8-r3 3.3.8-r2 3.3.8-r1 3.3.8 3.3.6-r5 3.3.6-r4 3.3.6-r3 3.3.6-r2 3.3.6-r1 3.3.6 3.3.5-r1 3.3.5 3.3.4-r9 3.3.4-r8 3.3.4-r7 3.3.4-r6 3.3.4-r5 3.3.4-r4 3.3.4-r3 3.3.4-r2 3.3.4-r1 3.3.4 3.3.3-r3 3.3.3-r2 3.3.3-r1 3.3.3 3.3.2 3.3.1-r2 3.3.1-r1 3.3.1 3.3.0-r1 3.3.0 3.2.3-r1 3.2.3 3.2.2-r1 3.2.2 3.2.1-r2 3.2.1-r1 3.2.1 3.2.0 3.1.2-r4 3.1.2-r3 3.1.2-r2 3.1.2-r1 3.1.2 3.1.1-r2 3.1.1-r1 3.1.1 3.1.0-r3 3.1.0-r2 3.1.0-r1 3.1.0"
|
||||
|
||||
if [[ -z "${QTDIR}" ]]; then
|
||||
export QTDIR="/usr/qt/3"
|
||||
fi
|
||||
|
||||
addwrite "${QTDIR}/etc/settings"
|
||||
addpredict "${QTDIR}/etc/settings"
|
||||
|
||||
# @FUNCTION: qt_min_version
|
||||
# @USAGE: [minimum version]
|
||||
# @DESCRIPTION:
|
||||
# This function is deprecated. Use slot dependencies instead.
|
||||
qt_min_version() {
|
||||
local list=$(qt_min_version_list "$@")
|
||||
ewarn "${CATEGORY}/${PF}: qt_min_version() is deprecated. Use slot dependencies instead."
|
||||
if [[ ${list%% *} == "${list}" ]]; then
|
||||
echo "${list}"
|
||||
else
|
||||
echo "|| ( ${list} )"
|
||||
fi
|
||||
}
|
||||
|
||||
qt_min_version_list() {
|
||||
local MINVER="$1"
|
||||
local VERSIONS=""
|
||||
|
||||
case "${MINVER}" in
|
||||
3|3.0|3.0.0) VERSIONS="=${QTPKG}3*";;
|
||||
3.1|3.1.0|3.2|3.2.0|3.3|3.3.0)
|
||||
for x in ${QT3MAJORVERSIONS}; do
|
||||
if $(version_is_at_least "${MINVER}" "${x}"); then
|
||||
VERSIONS="${VERSIONS} =${QTPKG}${x}*"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
3*)
|
||||
for x in ${QT3VERSIONS}; do
|
||||
if $(version_is_at_least "${MINVER}" "${x}"); then
|
||||
VERSIONS="${VERSIONS} =${QTPKG}${x}"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
*) VERSIONS="=${QTPKG}3*";;
|
||||
esac
|
||||
|
||||
echo ${VERSIONS}
|
||||
}
|
||||
|
||||
# @FUNCTION: eqmake3
|
||||
# @USAGE: [.pro file] [additional parameters to qmake]
|
||||
# @MAINTAINER:
|
||||
# Przemyslaw Maciag <troll@gentoo.org>
|
||||
# Davide Pesavento <davidepesa@gmail.com>
|
||||
# @DESCRIPTION:
|
||||
# Runs qmake on the specified .pro file (defaults to
|
||||
# ${PN}.pro if eqmake3 was called with no argument).
|
||||
# Additional parameters are passed unmodified to qmake.
|
||||
eqmake3() {
|
||||
local LOGFILE="${T}/qmake-$$.out"
|
||||
local projprofile="${1}"
|
||||
[[ -z ${projprofile} ]] && projprofile="${PN}.pro"
|
||||
shift 1
|
||||
|
||||
ebegin "Processing qmake ${projprofile}"
|
||||
|
||||
# file exists?
|
||||
if [[ ! -f ${projprofile} ]]; then
|
||||
echo
|
||||
eerror "Project .pro file \"${projprofile}\" does not exist"
|
||||
eerror "qmake cannot handle non-existing .pro files"
|
||||
echo
|
||||
eerror "This shouldn't happen - please send a bug report to bugs.gentoo.org"
|
||||
echo
|
||||
die "Project file not found in ${PN} sources"
|
||||
fi
|
||||
|
||||
echo >> ${LOGFILE}
|
||||
echo "****** qmake ${projprofile} ******" >> ${LOGFILE}
|
||||
echo >> ${LOGFILE}
|
||||
|
||||
# some standard config options
|
||||
local configoptplus="CONFIG += no_fixpath"
|
||||
local configoptminus="CONFIG -="
|
||||
if has debug ${IUSE} && use debug; then
|
||||
configoptplus="${configoptplus} debug"
|
||||
configoptminus="${configoptminus} release"
|
||||
else
|
||||
configoptplus="${configoptplus} release"
|
||||
configoptminus="${configoptminus} debug"
|
||||
fi
|
||||
|
||||
${QTDIR}/bin/qmake ${projprofile} \
|
||||
QTDIR=${QTDIR} \
|
||||
QMAKE=${QTDIR}/bin/qmake \
|
||||
QMAKE_CC=$(tc-getCC) \
|
||||
QMAKE_CXX=$(tc-getCXX) \
|
||||
QMAKE_LINK=$(tc-getCXX) \
|
||||
QMAKE_CFLAGS_RELEASE="${CFLAGS}" \
|
||||
QMAKE_CFLAGS_DEBUG="${CFLAGS}" \
|
||||
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \
|
||||
QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS}" \
|
||||
QMAKE_LFLAGS_RELEASE="${LDFLAGS}" \
|
||||
QMAKE_LFLAGS_DEBUG="${LDFLAGS}" \
|
||||
"${configoptminus}" \
|
||||
"${configoptplus}" \
|
||||
QMAKE_RPATH= \
|
||||
QMAKE_STRIP= \
|
||||
${@} >> ${LOGFILE} 2>&1
|
||||
|
||||
local result=$?
|
||||
eend ${result}
|
||||
|
||||
# was qmake successful?
|
||||
if [[ ${result} -ne 0 ]]; then
|
||||
echo
|
||||
eerror "Running qmake on \"${projprofile}\" has failed"
|
||||
echo
|
||||
eerror "This shouldn't happen - please send a bug report to bugs.gentoo.org"
|
||||
echo
|
||||
die "qmake failed on ${projprofile}"
|
||||
fi
|
||||
|
||||
return ${result}
|
||||
}
|
@ -25,36 +25,3 @@
|
||||
# the plugins won't work at all
|
||||
gnome-extra/novell-nautilus-plugin
|
||||
kde-misc/novell-konqueror-plugin
|
||||
|
||||
# <mario.fetka@gmail.com> (14 Dec 2009)
|
||||
# mask the 3.0 novell client that was
|
||||
# remvoved after publish
|
||||
#=kde-misc/novell-qtgui-cli-3.0.0.2
|
||||
#=kde-misc/novell-qtgui-3.0.0.2
|
||||
#=kde-misc/novell-ui-base-3.0.0.3
|
||||
#=net-misc/novell-client-3.0.0.2
|
||||
#=net-misc/novell-client-script-3.0.0.2
|
||||
#=net-misc/novell-client-config-3.0.0.2
|
||||
#=net-fs/novell-novfsd-3.0.0.15
|
||||
#=net-nds/novell-xtier-xplat-3.1.6.12-r1
|
||||
#=net-nds/novell-xtier-core-3.1.6.12-r1
|
||||
#=net-nds/novell-xtier-base-3.1.6.12-r2
|
||||
#=sys-auth/novell-nmasclient-3.4.0_p21-r2
|
||||
#=sys-libs/novell-xplatlib-1.0.3.39-r2
|
||||
|
||||
# <mario.fetka@gmail.com> (14 Dec 2009)
|
||||
# mask the 3.0 novell client that was
|
||||
# build for SLED9 (old libs dependency)
|
||||
=kde-misc/novell-qtgui-cli-3.0.1.0.13
|
||||
=kde-misc/novell-qtgui-3.0.1.0.13
|
||||
=kde-misc/novell-ui-base-3.0.1.0.10
|
||||
=net-misc/novell-client-2.0.1.0.12
|
||||
=net-misc/novell-client-script-2.0.1.0.12
|
||||
=net-misc/novell-client-config-2.0.1.0.8
|
||||
=net-fs/novell-novfsd-3.0.1.0.11
|
||||
=net-nds/novell-xtier-xplat-3.1.7.0.7
|
||||
=net-nds/novell-xtier-core-3.1.7.0.7
|
||||
=net-nds/novell-xtier-base-3.1.7.0.7
|
||||
=sys-auth/novell-nmasclient-3.4.4.0.5
|
||||
=sys-libs/novell-xplatlib-1.0.4.0.9
|
||||
|
||||
|
1367
trunk/novell4gentoo/x11-libs/qt/ChangeLog
Normal file
1367
trunk/novell4gentoo/x11-libs/qt/ChangeLog
Normal file
File diff suppressed because it is too large
Load Diff
21
trunk/novell4gentoo/x11-libs/qt/Manifest
Normal file
21
trunk/novell4gentoo/x11-libs/qt/Manifest
Normal file
@ -0,0 +1,21 @@
|
||||
AUX 0001-dnd_optimization.patch 5623 RMD160 b62b5868086b4d352be66989cc23cd3bb963e283 SHA1 4f3416c3a7e44d52c1088c52256decb384e4b1bc SHA256 8e138a2fdd053ec81522df19ce30f7e4c05838dfd8e0c8069ffb793ba45d7439
|
||||
AUX 0002-dnd_active_window_fix.patch 7289 RMD160 b355f5fd028d35d88ca15bf9ce8da41bd365f12d SHA1 5b16995f072cbde80f000967aa11d8a88ed34e23 SHA256 e36383b43a53b815f3958608275c60299a0638b6b3201c3a3d9318ee2ead26d1
|
||||
AUX 0038-dragobject-dont-prefer-unknown.patch 2551 RMD160 0a89aec1a6f9672a927029ca01a1bd8573552745 SHA1 3a2371a520d800904350bb9e6e445d6b3092bb88 SHA256 b5c0d00d1ac84302bc2123ccdfdab473cd0daf12f4ba70d6318084d9f744242c
|
||||
AUX 0044-qscrollview-windowactivate-fix.diff 1584 RMD160 978cc6c473b668e1bfd5969cce9307719baecf0a SHA1 657ff8ab47aafbd6469688f489fd3788ccb98907 SHA256 f73798b72251d6fe97ed8e661719ba29983c087587ed952618ec4a97bf1816d5
|
||||
AUX 0047-fix-kmenu-widget.diff 992 RMD160 bada5e23043d314b15f3af1eda70c8833112ebce SHA1 d67e34b540c2f19e7e3e3715535a6732f447b22c SHA256 0dadffc3218b04eb327baf51c1f681843046cdf07a52b943f46373cd8384c275
|
||||
AUX 0048-qclipboard_hack_80072.patch 1662 RMD160 ebfba0d27c03dcceeac7ad64650d5f6d7039ecdb SHA1 5c174acaf3b148f8d70345f68c7f22352450d582 SHA256 e47a1af0272e952cefacd30d466861b40d9bc969f6e5bc5cb32b878140af1d3c
|
||||
AUX qt-3.3.8-fix-compiler-detection.patch 637 RMD160 08b7151a83031f0c268da2899d800742a5ed63cf SHA1 7c571a1c98bd29acf4e32fd15b1c9188b7d69bec SHA256 639cd7fb8548f67a51065efba8bb2deecd4778b451855bf28dac1bd9701cd9d5
|
||||
AUX qt-3.3.8-immqt+gcc-4.3.patch 756 RMD160 b4379b8c66b2708301f9883ecc1be55ae916a20f SHA1 179825f382fab2cadd097f7597292a69ef71d575 SHA256 d281c1e1f20cdc4f3351eede25287ba3b6bd80cbb0e6f5a9f997394521feb6bd
|
||||
AUX qt-3.3.8-libpng14.patch 1680 RMD160 922a2ff3c98eb871e860ddd09b4ef2fe291f1687 SHA1 6532104043beef4ef57981dd1598aa0ffc0c2b73 SHA256 d4b63e1d2df1cf15e30f611fe04de1e1ad4ec48e2fce609f18797534f808da30
|
||||
AUX qt-3.3.8-mips.patch 1326 RMD160 0fd662a36c2fe0013e7204218ddfc8c604467269 SHA1 a8d1cf81f4b2c35c46b1d0efacd5e5ad7811ec49 SHA256 982a92c010df448cb83c2e6a8f46a4f8979d8b5708b2942485cca962621f0caf
|
||||
AUX qt-3.3.8-seli-xinerama.patch 1960 RMD160 ce0163c9a47f5417f957e1d1ad0c574357c01cc7 SHA1 60b9c0a323d598aacca089d677c4b1c9709e70db SHA256 ec72679b69148af1b687a9cf7992e20ee85f4a0f3a33f3c05c8d2174f6f43503
|
||||
AUX qt-3.3.8-uic-fix.patch 711 RMD160 19964cfc6714e2ad38659e268ef248501db606aa SHA1 38bd5da513a2c28f3d941ba5644024643d835676 SHA256 e6a4e789c6c0da5542cad71057d1817e1976d005a52e1e4ef9bcf9914c37fcf3
|
||||
AUX qt-3.3.8-visibility.patch 5554 RMD160 db15a594a913fd1c1837a731e168b1197d19da62 SHA1 692ada218ed717b8b2fc5f5f67cf747bb50f59e4 SHA256 b33b2415f280ef25f070bbe7308659ee3e5a5c1999e2ef419271f11e59160407
|
||||
AUX qt-3.3.8b-cjk-fix.patch 1191 RMD160 62cc0a9db2ab42b9081967033ae75b0a0eed9e93 SHA1 24bf196b466f4b3956149b29830b158944b6a545 SHA256 94369e7cca8531ed89370480c2d5f3a0e99dbb49640df715ef33711b9d1cae4b
|
||||
AUX qt-ulibc.patch 355 RMD160 9a7a01b248b7b646316cef550783569f8bdc89e2 SHA1 2f09deb7e354797ee72aa65a35c882a5ed5fd86c SHA256 6b57b1e25c1e2cebd51b8279fbcadb5e2d9bb77d19b10ea51a4f74c64bd65e2d
|
||||
DIST qt-x11-free-3.3.8b.tar.gz 17313883 RMD160 4e3cbd9c5d4719b5d33e961e6595d7b215788c8b SHA1 745def6250dc7f337dbb265e20bf38dcb41fd854 SHA256 1b7a1ff62ec5a9cb7a388e2ba28fda6f960b27f27999482ebeceeadb72ac9f6e
|
||||
DIST qt-x11-immodule-unified-qt3.3.8-20070321-gentoo.diff.bz2 137387 RMD160 7f4f79c95faa2b8e71a78308af8feae5f6a6b06a SHA1 230cc532f1a3023967c5aee4cce87d1b9351b73d SHA256 06994304d2b7c699c4b6ea4183877652e261170f74282e89a3700ce6d4a98918
|
||||
EBUILD qt-3.3.8b-r1.ebuild 10838 RMD160 a9c0ded9c44f493a37f2433be024bd1ddb99e4d6 SHA1 945f2677c458d567ec859f9eb330fbaa0d70450a SHA256 28cfb44d27c0df0b5a4b02daaa05d30bb65a04fdad7ff8efd693adc8c1864dda
|
||||
EBUILD qt-3.3.8b-r2.ebuild 10856 RMD160 f898775a033889efca89bdafd706ee9dcb31231f SHA1 03dd74588d15cf6943c04e523b5aecae33a30af1 SHA256 70d0f4cc1077c2fcb87344937ee4ff0c774f92b42c79c9f32f9dac6d9e03b7cc
|
||||
MISC ChangeLog 48310 RMD160 2137250c8fda2fcb446d284cfb6bfef70389cf5c SHA1 f78bba26d4d3715f1f351d476f95a38304e9acbf SHA256 68d0c7f8e6758b746042f21eb44ad4b3eef96ac47b3ee240310edacabded90f8
|
||||
MISC metadata.xml 335 RMD160 76be6bdf3a132836b4cf22c0a8a45f29efe4af83 SHA1 5f6aa35732fc54d6b10f9dc113b07e26b0513159 SHA256 53934f5173007d42204665e1561d36656c6ecf587162b8eb4e289fcfa88c577a
|
@ -0,0 +1,187 @@
|
||||
qt-bugs@ issue : 16115
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
See http://lists.kde.org/?t=104388858900001&r=1&w=2
|
||||
|
||||
|
||||
--- src/kernel/qdnd_x11.cpp.sav 2003-02-05 16:09:45.000000000 +0100
|
||||
+++ src/kernel/qdnd_x11.cpp 2003-02-07 16:14:49.000000000 +0100
|
||||
@@ -49,13 +49,15 @@
|
||||
#include "qdragobject.h"
|
||||
#include "qobjectlist.h"
|
||||
#include "qcursor.h"
|
||||
+#include "qbitmap.h"
|
||||
+#include "qpainter.h"
|
||||
|
||||
#include "qt_x11_p.h"
|
||||
|
||||
// conflict resolution
|
||||
|
||||
-// unused, may be used again later: const int XKeyPress = KeyPress;
|
||||
-// unused, may be used again later: const int XKeyRelease = KeyRelease;
|
||||
+const int XKeyPress = KeyPress;
|
||||
+const int XKeyRelease = KeyRelease;
|
||||
#undef KeyPress
|
||||
#undef KeyRelease
|
||||
|
||||
@@ -249,20 +251,47 @@ class QShapedPixmapWidget : public QWidg
|
||||
public:
|
||||
QShapedPixmapWidget(int screen = -1) :
|
||||
QWidget(QApplication::desktop()->screen( screen ),
|
||||
- 0, WStyle_Customize | WStyle_Tool | WStyle_NoBorder | WX11BypassWM )
|
||||
+ 0, WStyle_Customize | WStyle_Tool | WStyle_NoBorder | WX11BypassWM ), oldpmser( 0 ), oldbmser( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
- void setPixmap(QPixmap pm)
|
||||
+ void setPixmap(QPixmap pm, QPoint hot)
|
||||
{
|
||||
- if ( pm.mask() ) {
|
||||
+ int bmser = pm.mask() ? pm.mask()->serialNumber() : 0;
|
||||
+ if( oldpmser == pm.serialNumber() && oldbmser == bmser
|
||||
+ && oldhot == hot )
|
||||
+ return;
|
||||
+ oldpmser = pm.serialNumber();
|
||||
+ oldbmser = bmser;
|
||||
+ oldhot = hot;
|
||||
+ bool hotspot_in = !(hot.x() < 0 || hot.y() < 0 || hot.x() >= pm.width() || hot.y() >= pm.height());
|
||||
+// if the pixmap has hotspot in its area, make a "hole" in it at that position
|
||||
+// this will allow XTranslateCoordinates() to find directly the window below the cursor instead
|
||||
+// of finding this pixmap, and therefore there won't be needed any (slow) search for the window
|
||||
+// using findRealWindow()
|
||||
+ if( hotspot_in ) {
|
||||
+ QBitmap mask = pm.mask() ? *pm.mask() : QBitmap( pm.width(), pm.height());
|
||||
+ if( !pm.mask())
|
||||
+ mask.fill( Qt::color1 );
|
||||
+ QPainter p( &mask );
|
||||
+ p.setPen( Qt::color0 );
|
||||
+ p.drawPoint( hot.x(), hot.y());
|
||||
+ p.end();
|
||||
+ pm.setMask( mask );
|
||||
+ setMask( mask );
|
||||
+ } else if ( pm.mask() ) {
|
||||
setMask( *pm.mask() );
|
||||
} else {
|
||||
clearMask();
|
||||
}
|
||||
resize(pm.width(),pm.height());
|
||||
setErasePixmap(pm);
|
||||
+ erase();
|
||||
}
|
||||
+private:
|
||||
+ int oldpmser;
|
||||
+ int oldbmser;
|
||||
+ QPoint oldhot;
|
||||
};
|
||||
|
||||
QShapedPixmapWidget * qt_xdnd_deco = 0;
|
||||
@@ -859,6 +888,45 @@ void QDragManager::timerEvent( QTimerEve
|
||||
move( QCursor::pos() );
|
||||
}
|
||||
|
||||
+static bool qt_xdnd_was_move = false;
|
||||
+static bool qt_xdnd_found = false;
|
||||
+// check whole incoming X queue for move events
|
||||
+// checking whole queue is done by always returning False in the predicate
|
||||
+// if there's another move event in the queue, and there's not a mouse button
|
||||
+// or keyboard or ClientMessage event before it, the current move event
|
||||
+// may be safely discarded
|
||||
+// this helps avoiding being overloaded by being flooded from many events
|
||||
+// from the XServer
|
||||
+static
|
||||
+Bool qt_xdnd_predicate( Display*, XEvent* ev, XPointer )
|
||||
+{
|
||||
+ if( qt_xdnd_found )
|
||||
+ return False;
|
||||
+ if( ev->type == MotionNotify )
|
||||
+ {
|
||||
+ qt_xdnd_was_move = true;
|
||||
+ qt_xdnd_found = true;
|
||||
+ }
|
||||
+ if( ev->type == ButtonPress || ev->type == ButtonRelease
|
||||
+ || ev->type == XKeyPress || ev->type == XKeyRelease
|
||||
+ || ev->type == ClientMessage )
|
||||
+ {
|
||||
+ qt_xdnd_was_move = false;
|
||||
+ qt_xdnd_found = true;
|
||||
+ }
|
||||
+ return False;
|
||||
+}
|
||||
+
|
||||
+static
|
||||
+bool qt_xdnd_another_movement()
|
||||
+{
|
||||
+ qt_xdnd_was_move = false;
|
||||
+ qt_xdnd_found = false;
|
||||
+ XEvent dummy;
|
||||
+ XCheckIfEvent( qt_xdisplay(), &dummy, qt_xdnd_predicate, NULL );
|
||||
+ return qt_xdnd_was_move;
|
||||
+}
|
||||
+
|
||||
bool QDragManager::eventFilter( QObject * o, QEvent * e)
|
||||
{
|
||||
if ( beingCancelled ) {
|
||||
@@ -881,8 +949,10 @@ bool QDragManager::eventFilter( QObject
|
||||
|
||||
if ( e->type() == QEvent::MouseMove ) {
|
||||
QMouseEvent* me = (QMouseEvent *)e;
|
||||
- updateMode(me->stateAfter());
|
||||
- move( me->globalPos() );
|
||||
+ if( !qt_xdnd_another_movement()) {
|
||||
+ updateMode(me->stateAfter());
|
||||
+ move( me->globalPos() );
|
||||
+ }
|
||||
return TRUE;
|
||||
} else if ( e->type() == QEvent::MouseButtonRelease ) {
|
||||
qApp->removeEventFilter( this );
|
||||
@@ -1106,7 +1176,7 @@ void QDragManager::move( const QPoint &
|
||||
delete qt_xdnd_deco;
|
||||
qt_xdnd_deco = new QShapedPixmapWidget( screen );
|
||||
}
|
||||
- updatePixmap();
|
||||
+ updatePixmap( globalPos );
|
||||
|
||||
if ( qt_xdnd_source_sameanswer.contains( globalPos ) &&
|
||||
qt_xdnd_source_sameanswer.isValid() ) {
|
||||
@@ -1679,7 +1749,7 @@ bool QDragManager::drag( QDragObject * o
|
||||
// qt_xdnd_source_object persists until we get an xdnd_finish message
|
||||
}
|
||||
|
||||
-void QDragManager::updatePixmap()
|
||||
+void QDragManager::updatePixmap( const QPoint& cursorPos )
|
||||
{
|
||||
if ( qt_xdnd_deco ) {
|
||||
QPixmap pm;
|
||||
@@ -1694,9 +1764,8 @@ void QDragManager::updatePixmap()
|
||||
defaultPm = new QPixmap(default_pm);
|
||||
pm = *defaultPm;
|
||||
}
|
||||
- qt_xdnd_deco->setPixmap(pm);
|
||||
- qt_xdnd_deco->move(QCursor::pos()-pm_hot);
|
||||
- qt_xdnd_deco->repaint(FALSE);
|
||||
+ qt_xdnd_deco->setPixmap(pm, pm_hot);
|
||||
+ qt_xdnd_deco->move(cursorPos-pm_hot);
|
||||
//if ( willDrop ) {
|
||||
qt_xdnd_deco->show();
|
||||
//} else {
|
||||
@@ -1705,4 +1774,9 @@ void QDragManager::updatePixmap()
|
||||
}
|
||||
}
|
||||
|
||||
+void QDragManager::updatePixmap()
|
||||
+{
|
||||
+ updatePixmap( QCursor::pos());
|
||||
+}
|
||||
+
|
||||
#endif // QT_NO_DRAGANDDROP
|
||||
--- src/kernel/qdragobject.h.sav 2002-11-01 19:25:07.000000000 +0100
|
||||
+++ src/kernel/qdragobject.h 2001-01-01 01:01:00.000000000 +0100
|
||||
@@ -245,6 +245,7 @@ private:
|
||||
void move( const QPoint & );
|
||||
void drop();
|
||||
void updatePixmap();
|
||||
+ void updatePixmap( const QPoint& cursorPos );
|
||||
|
||||
private:
|
||||
QDragObject * object;
|
@ -0,0 +1,189 @@
|
||||
qt-bugs@ issue : 25122
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
Hello,
|
||||
|
||||
for example: Open Konqueror window, showing some files. Start dragging one
|
||||
desktop icon. If you press/release Ctrl, there'll be a '+' attached to the
|
||||
icon, showing the DND operation. Now, while still doing DND, make the
|
||||
Konqueror window active (Alt+Tab with KDE-3.1.2+, hover over its taskbar
|
||||
entry, Ctrl+Fn to switch to a different virtual desktop, etc.). As soon as
|
||||
the app performing DND is not the active application, and the mouse is not
|
||||
moving, pressing/releasing Ctrl doesn't do anything, the state only updates
|
||||
when the mouse is moved.
|
||||
|
||||
This is caused by the fact that Qt has only pointer grab when doing DND, but
|
||||
doesn't have keyboard grab. I actually consider this a good thing, because
|
||||
the only keys important for DND are modifiers, and they come together with
|
||||
pointer events, and not having keyboard grab allows using keyboard shortcuts
|
||||
like Alt+Tab while DND. However, when the mouse is not moved, and only a
|
||||
modifier key is pressed/released, the app won't get any mouse event, and
|
||||
won't also get the keyboard event.
|
||||
|
||||
The attached patch changes Qt to explicitly check the modifiers state using
|
||||
XQueryPointer() if there's wasn't recently any mouse/keyboard event, which
|
||||
ensures the state is updated even in the situation described above.
|
||||
|
||||
--- src/kernel/qapplication_x11.cpp.sav 2003-06-21 12:31:35.000000000 +0200
|
||||
+++ src/kernel/qapplication_x11.cpp 2003-06-21 12:35:44.000000000 +0200
|
||||
@@ -4053,7 +4053,7 @@ void QApplication::closePopup( QWidget *
|
||||
// Keyboard event translation
|
||||
//
|
||||
|
||||
-static int translateButtonState( int s )
|
||||
+int qt_x11_translateButtonState( int s )
|
||||
{
|
||||
int bst = 0;
|
||||
if ( s & Button1Mask )
|
||||
@@ -4119,7 +4119,7 @@ bool QETWidget::translateMouseEvent( con
|
||||
pos.ry() = lastMotion.y;
|
||||
globalPos.rx() = lastMotion.x_root;
|
||||
globalPos.ry() = lastMotion.y_root;
|
||||
- state = translateButtonState( lastMotion.state );
|
||||
+ state = qt_x11_translateButtonState( lastMotion.state );
|
||||
if ( qt_button_down && (state & (LeftButton |
|
||||
MidButton |
|
||||
RightButton ) ) == 0 )
|
||||
@@ -4143,7 +4143,7 @@ bool QETWidget::translateMouseEvent( con
|
||||
pos.ry() = xevent->xcrossing.y;
|
||||
globalPos.rx() = xevent->xcrossing.x_root;
|
||||
globalPos.ry() = xevent->xcrossing.y_root;
|
||||
- state = translateButtonState( xevent->xcrossing.state );
|
||||
+ state = qt_x11_translateButtonState( xevent->xcrossing.state );
|
||||
if ( qt_button_down && (state & (LeftButton |
|
||||
MidButton |
|
||||
RightButton ) ) == 0 )
|
||||
@@ -4155,7 +4155,7 @@ bool QETWidget::translateMouseEvent( con
|
||||
pos.ry() = event->xbutton.y;
|
||||
globalPos.rx() = event->xbutton.x_root;
|
||||
globalPos.ry() = event->xbutton.y_root;
|
||||
- state = translateButtonState( event->xbutton.state );
|
||||
+ state = qt_x11_translateButtonState( event->xbutton.state );
|
||||
switch ( event->xbutton.button ) {
|
||||
case Button1: button = LeftButton; break;
|
||||
case Button2: button = MidButton; break;
|
||||
@@ -4950,7 +4950,7 @@ bool QETWidget::translateKeyEventInterna
|
||||
XKeyEvent xkeyevent = event->xkey;
|
||||
|
||||
// save the modifier state, we will use the keystate uint later by passing
|
||||
- // it to translateButtonState
|
||||
+ // it to qt_x11_translateButtonState
|
||||
uint keystate = event->xkey.state;
|
||||
// remove the modifiers where mode_switch exists... HPUX machines seem
|
||||
// to have alt *AND* mode_switch both in Mod1Mask, which causes
|
||||
@@ -5064,7 +5064,7 @@ bool QETWidget::translateKeyEventInterna
|
||||
}
|
||||
#endif // !QT_NO_XIM
|
||||
|
||||
- state = translateButtonState( keystate );
|
||||
+ state = qt_x11_translateButtonState( keystate );
|
||||
|
||||
static int directionKeyEvent = 0;
|
||||
if ( qt_use_rtl_extensions && type == QEvent::KeyRelease ) {
|
||||
--- src/kernel/qdnd_x11.cpp.sav 2003-06-30 15:26:42.000000000 +0200
|
||||
+++ src/kernel/qdnd_x11.cpp 2003-06-30 15:32:23.000000000 +0200
|
||||
@@ -114,6 +114,8 @@ Atom qt_xdnd_finished;
|
||||
Atom qt_xdnd_type_list;
|
||||
const int qt_xdnd_version = 4;
|
||||
|
||||
+extern int qt_x11_translateButtonState( int s );
|
||||
+
|
||||
// Actions
|
||||
//
|
||||
// The Xdnd spec allows for user-defined actions. This could be implemented
|
||||
@@ -198,6 +200,8 @@ static Atom qt_xdnd_source_current_time;
|
||||
static int qt_xdnd_current_screen = -1;
|
||||
// state of dragging... true if dragging, false if not
|
||||
bool qt_xdnd_dragging = FALSE;
|
||||
+// need to check state of keyboard modifiers
|
||||
+static bool need_modifiers_check = FALSE;
|
||||
|
||||
// dict of payload data, sorted by type atom
|
||||
static QIntDict<QByteArray> * qt_xdnd_target_data = 0;
|
||||
@@ -879,8 +883,20 @@ void qt_handle_xdnd_finished( QWidget *,
|
||||
|
||||
void QDragManager::timerEvent( QTimerEvent* e )
|
||||
{
|
||||
- if ( e->timerId() == heartbeat && qt_xdnd_source_sameanswer.isNull() )
|
||||
- move( QCursor::pos() );
|
||||
+ if ( e->timerId() == heartbeat ) {
|
||||
+ if( need_modifiers_check ) {
|
||||
+ Window root, child;
|
||||
+ int root_x, root_y, win_x, win_y;
|
||||
+ unsigned int mask;
|
||||
+ XQueryPointer( qt_xdisplay(), qt_xrootwin( qt_xdnd_current_screen ),
|
||||
+ &root, &child, &root_x, &root_y, &win_x, &win_y, &mask );
|
||||
+ if( updateMode( (ButtonState)qt_x11_translateButtonState( mask )))
|
||||
+ qt_xdnd_source_sameanswer = QRect(); // force move
|
||||
+ }
|
||||
+ need_modifiers_check = TRUE;
|
||||
+ if( qt_xdnd_source_sameanswer.isNull() )
|
||||
+ move( QCursor::pos() );
|
||||
+ }
|
||||
}
|
||||
|
||||
static bool qt_xdnd_was_move = false;
|
||||
@@ -948,6 +964,7 @@ bool QDragManager::eventFilter( QObject
|
||||
updateMode(me->stateAfter());
|
||||
move( me->globalPos() );
|
||||
}
|
||||
+ need_modifiers_check = FALSE;
|
||||
return TRUE;
|
||||
} else if ( e->type() == QEvent::MouseButtonRelease ) {
|
||||
qApp->removeEventFilter( this );
|
||||
@@ -986,9 +1003,11 @@ bool QDragManager::eventFilter( QObject
|
||||
beingCancelled = FALSE;
|
||||
qApp->exit_loop();
|
||||
} else {
|
||||
- updateMode(ke->stateAfter());
|
||||
- qt_xdnd_source_sameanswer = QRect(); // force move
|
||||
- move( QCursor::pos() );
|
||||
+ if( updateMode(ke->stateAfter())) {
|
||||
+ qt_xdnd_source_sameanswer = QRect(); // force move
|
||||
+ move( QCursor::pos() );
|
||||
+ }
|
||||
+ need_modifiers_check = FALSE;
|
||||
}
|
||||
return TRUE; // Eat all key events
|
||||
}
|
||||
@@ -1014,10 +1033,10 @@ bool QDragManager::eventFilter( QObject
|
||||
|
||||
|
||||
static Qt::ButtonState oldstate;
|
||||
-void QDragManager::updateMode( ButtonState newstate )
|
||||
+bool QDragManager::updateMode( ButtonState newstate )
|
||||
{
|
||||
if ( newstate == oldstate )
|
||||
- return;
|
||||
+ return false;
|
||||
const int both = ShiftButton|ControlButton;
|
||||
if ( (newstate & both) == both ) {
|
||||
global_requested_action = QDropEvent::Link;
|
||||
@@ -1041,6 +1060,7 @@ void QDragManager::updateMode( ButtonSta
|
||||
}
|
||||
}
|
||||
oldstate = newstate;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1707,6 +1727,7 @@ bool QDragManager::drag( QDragObject * o
|
||||
qt_xdnd_source_sameanswer = QRect();
|
||||
move(QCursor::pos());
|
||||
heartbeat = startTimer(200);
|
||||
+ need_modifiers_check = FALSE;
|
||||
|
||||
#ifndef QT_NO_CURSOR
|
||||
qApp->setOverrideCursor( arrowCursor );
|
||||
--- src/kernel/qdragobject.h.sav 2003-05-19 22:34:43.000000000 +0200
|
||||
+++ src/kernel/qdragobject.h 2001-01-01 01:01:00.000000000 +0100
|
||||
@@ -248,7 +248,7 @@ private:
|
||||
|
||||
private:
|
||||
QDragObject * object;
|
||||
- void updateMode( ButtonState newstate );
|
||||
+ bool updateMode( ButtonState newstate );
|
||||
void updateCursor();
|
||||
|
||||
QWidget * dragSource;
|
@ -0,0 +1,57 @@
|
||||
qt-bugs@ issue : 38642
|
||||
bugs.kde.org number : 71084
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
Hello,
|
||||
|
||||
start Mozilla, go e.g. to http://kde.org, start KWrite (or basically any Qt
|
||||
app that accepts text drops), select 'Conquer your Desktop!', and try to
|
||||
drag&drop it onto KWrite. The only text pasted should be 'm'.
|
||||
|
||||
I don't know much the related mimetype and encoding stuff, so I'm unsure
|
||||
whose fault this actually is. The text drag is provided as a lot of
|
||||
text/something targets, to list some text/_moz_htmlinfo, text/x-moz-url,
|
||||
text/unicode and similar. The problem is, Kate uses QTextDrag::decode() with
|
||||
no subtype specified, probably with the intention that as Kate is a text
|
||||
editor, it can accept any text pasted. And since the first target provided by
|
||||
mozilla is text/x-moz-url, (which moreover seems to be encoded as 16bit
|
||||
unicode), the text dropped is completely wrong. You can easily see all
|
||||
targets provided by Mozilla with see_mime.patch applied.
|
||||
|
||||
Solution #1: Say that Kate (any pretty much everybody else expecting text)
|
||||
should say "plain" as the subtype. In such case, I suggest you drop the
|
||||
QTextDrag::decode() variant with no subtype specified, and stress more the
|
||||
fact that not specifying a subtype can result in a lot of rubbish. It's
|
||||
simply too tempting to leave the subtype empty and try to accept anything.
|
||||
|
||||
Solution #2: When trying to accept anything, try to get useful data. Which
|
||||
means either sorting the subtypes available somehow, checking only the ones
|
||||
Qt knows.
|
||||
|
||||
To me, #1 seems to be a better choice, or possibly at least something like
|
||||
the attached QTextDrag patch, which simply always tries first "plain" subtype
|
||||
if none is specified. With this patch, Mozilla even works (that's irony, of
|
||||
course, Mozilla still pastes the text/plain text as HTML, but at least now it
|
||||
pastes something where it's easy to point at the offender).
|
||||
|
||||
|
||||
--- src/kernel/qdragobject.cpp.sav 2004-01-06 19:24:35.000000000 +0100
|
||||
+++ src/kernel/qdragobject.cpp 2004-01-06 19:47:01.000000000 +0100
|
||||
@@ -844,6 +844,16 @@ bool QTextDrag::decode( const QMimeSourc
|
||||
{
|
||||
if(!e)
|
||||
return FALSE;
|
||||
+
|
||||
+ // when subtype is not specified, try text/plain first, otherwise this may read
|
||||
+ // things like text/x-moz-url even though better targets are available
|
||||
+ if( subtype.isNull()) {
|
||||
+ QCString subtmp = "plain";
|
||||
+ if( decode( e, str, subtmp )) {
|
||||
+ subtype = subtmp;
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if ( e->cacheType == QMimeSource::Text ) {
|
||||
str = *e->cache.txt.str;
|
@ -0,0 +1,38 @@
|
||||
qt-bugs@ issue : N45716
|
||||
applied: no
|
||||
author: Enrico Ros <eros.kde@email.it>
|
||||
|
||||
QScrollView unwanted repaint fix.
|
||||
|
||||
This fixes the 'flashing' konqueror window on activation / deactivation by
|
||||
saving 1 unwanted repaint (when konqueror window has background).
|
||||
I tracked down to the problem to the internal QViewportWidget of the
|
||||
QScrollView class.
|
||||
|
||||
When a window is activated the activation event is recursively propagated
|
||||
to all childs triggering the windowActivationChange() functions in the
|
||||
widget it passes by.
|
||||
What happens when the event gets to the Viewport?
|
||||
At this point the event has already been handled by windowActivationChange()
|
||||
of the parent widget (a QIconView for example) and has then been propagated
|
||||
to the Viewport that will handle it with the default
|
||||
QWidget::windowActivationChange implementation, maybe raising an unwanted
|
||||
update(); so here we stop the event.
|
||||
As an addition: if the parent reimplements the windowActivationChange()
|
||||
function, mainly to block the update, it won't be happy if the child will
|
||||
trigger the update. If the parent do not reimplement the function il will
|
||||
inherits the default implementation and there is no need for the viewport's
|
||||
one.
|
||||
|
||||
--- src/widgets/qscrollview.cpp.orig 2004-03-29 10:17:04.000000000 +0000
|
||||
+++ src/widgets/qscrollview.cpp 2004-03-30 16:40:07.599978320 +0000
|
||||
@@ -1551,6 +1551,9 @@
|
||||
case QEvent::LayoutHint:
|
||||
d->autoResizeHint(this);
|
||||
break;
|
||||
+ case QEvent::WindowActivate:
|
||||
+ case QEvent::WindowDeactivate:
|
||||
+ return TRUE;
|
||||
default:
|
||||
break;
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
qt-bugs@ issue: N46882
|
||||
bugs.kde.org number: 77545
|
||||
applied: no
|
||||
author: Stephan Binner <binner@kde.org>
|
||||
|
||||
Fix wrong K menu width for the case of enabled side pixmap and a menu title
|
||||
(like "Recently Used Applications") being longer than every other entry.
|
||||
|
||||
Solution: Respect PanelKMenu::setMaximumSize() as up to Qt 3.2.3
|
||||
|
||||
Index: src/widgets/qpopupmenu.cpp
|
||||
===================================================================
|
||||
RCS file: /home/kde/qt-copy/src/widgets/qpopupmenu.cpp,v
|
||||
retrieving revision 1.60
|
||||
diff -u -3 -p -b -r1.60 qpopupmenu.cpp
|
||||
--- src/widgets/qpopupmenu.cpp 29 Apr 2004 22:31:28 -0000 1.60
|
||||
+++ src/widgets/qpopupmenu.cpp 30 Apr 2004 01:11:59 -0000
|
||||
@@ -2531,7 +2531,7 @@ QSize QPopupMenu::sizeHint() const
|
||||
|
||||
QPopupMenu* that = (QPopupMenu*) this;
|
||||
//We do not need a resize here, just the sizeHint..
|
||||
- return that->updateSize(FALSE, FALSE).expandedTo( QApplication::globalStrut() );
|
||||
+ return that->updateSize(FALSE).expandedTo( QApplication::globalStrut() );
|
||||
}
|
||||
|
@ -0,0 +1,48 @@
|
||||
qt-bugs@ issue : none, probably even won't be
|
||||
bugs.kde.org number : 80072
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
A crude hack for KDE #80072. No good idea how to fix it properly yet :(.
|
||||
|
||||
--- src/kernel/qclipboard_x11.cpp.sav 2004-04-30 12:00:06.000000000 +0200
|
||||
+++ src/kernel/qclipboard_x11.cpp 2004-05-09 21:18:10.269264304 +0200
|
||||
@@ -109,6 +109,7 @@ static int pending_timer_id = 0;
|
||||
static bool pending_clipboard_changed = FALSE;
|
||||
static bool pending_selection_changed = FALSE;
|
||||
|
||||
+Q_EXPORT bool qt_qclipboard_bailout_hack = false;
|
||||
|
||||
// event capture mechanism for qt_xclb_wait_for_event
|
||||
static bool waiting_for_data = FALSE;
|
||||
@@ -453,6 +454,15 @@ static int qt_xclb_event_filter(XEvent *
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static bool selection_request_pending = false;
|
||||
+
|
||||
+static Bool check_selection_request_pending( Display*, XEvent* e, XPointer )
|
||||
+ {
|
||||
+ if( e->type == SelectionRequest && e->xselectionrequest.owner == owner->winId())
|
||||
+ selection_request_pending = true;
|
||||
+ return False;
|
||||
+ }
|
||||
+
|
||||
bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
|
||||
int timeout )
|
||||
{
|
||||
@@ -504,6 +514,14 @@ bool qt_xclb_wait_for_event( Display *dp
|
||||
do {
|
||||
if ( XCheckTypedWindowEvent(dpy,win,type,event) )
|
||||
return TRUE;
|
||||
+ if( qt_qclipboard_bailout_hack ) {
|
||||
+ XEvent dummy;
|
||||
+ selection_request_pending = false;
|
||||
+ if ( owner != NULL )
|
||||
+ XCheckIfEvent(dpy,&dummy,check_selection_request_pending,NULL);
|
||||
+ if( selection_request_pending )
|
||||
+ return TRUE;
|
||||
+ }
|
||||
|
||||
now = QTime::currentTime();
|
||||
if ( started > now ) // crossed midnight
|
@ -0,0 +1,22 @@
|
||||
--- qt-x11-free-3.3.8-orig/configure 2008-10-28 15:43:35.000000000 +0100
|
||||
+++ qt-x11-free-3.3.8/configure 2008-10-28 15:45:48.000000000 +0100
|
||||
@@ -3079,15 +3079,15 @@
|
||||
g++*)
|
||||
# GNU C++
|
||||
QMAKE_CONF_COMPILER=`grep "QMAKE_CXX[^_A-Z0-9a-z]" $QMAKESPEC/qmake.conf | sed "s,.* *= *\(.*\)$,\1,"`
|
||||
- COMPILER_VERSION=`${QMAKE_CONF_COMPILER} --version 2>/dev/null`
|
||||
+ COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
|
||||
case "$COMPILER_VERSION" in
|
||||
- *2.95.*)
|
||||
+ 2.95.*)
|
||||
COMPILER_VERSION="2.95.*"
|
||||
;;
|
||||
- *3.*)
|
||||
+ 3.*)
|
||||
COMPILER_VERSION="3.*"
|
||||
;;
|
||||
- *4.*)
|
||||
+ 4.*)
|
||||
COMPILER_VERSION="4"
|
||||
;;
|
||||
*)
|
@ -0,0 +1,20 @@
|
||||
--- plugins/src/inputmethods/imsw-none/qnoneinputcontextplugin.cpp~ 2007-04-05 09:47:44.000000000 +0000
|
||||
+++ plugins/src/inputmethods/imsw-none/qnoneinputcontextplugin.cpp 2007-04-05 09:48:08.000000000 +0000
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "qnoneinputcontextplugin.h"
|
||||
#include <qinputcontextfactory.h>
|
||||
#include <qsettings.h>
|
||||
+#include <cstdlib>
|
||||
|
||||
|
||||
QNoneInputContextPlugin::QNoneInputContextPlugin()
|
||||
--- plugins/src/inputmethods/simple/qsimpleinputcontext.cpp~ 2007-04-05 09:48:46.000000000 +0000
|
||||
+++ plugins/src/inputmethods/simple/qsimpleinputcontext.cpp 2007-04-05 09:48:54.000000000 +0000
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <qnamespace.h>
|
||||
#include <qevent.h>
|
||||
#include <qglobal.h>
|
||||
+#include <algorithm>
|
||||
|
||||
static const int ignoreKeys[] = {
|
||||
Qt::Key_Shift,
|
@ -0,0 +1,42 @@
|
||||
--- qt-x11-free-3.3.8b-x/src/kernel/qpngio.cpp 2008-01-15 20:09:13.000000000 +0100
|
||||
+++ qt-x11-free-3.3.8b/src/kernel/qpngio.cpp 2010-02-16 00:13:11.000000000 +0100
|
||||
@@ -162,7 +162,11 @@
|
||||
image.setColor( i, qRgba(c,c,c,0xff) );
|
||||
}
|
||||
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
|
||||
+#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 )
|
||||
+ const int g = info_ptr->trans_color.gray;
|
||||
+#else
|
||||
const int g = info_ptr->trans_values.gray;
|
||||
+#endif
|
||||
if (g < ncols) {
|
||||
image.setAlphaBuffer(TRUE);
|
||||
image.setColor(g, image.color(g) & RGB_MASK);
|
||||
@@ -190,7 +194,11 @@
|
||||
info_ptr->palette[i].red,
|
||||
info_ptr->palette[i].green,
|
||||
info_ptr->palette[i].blue,
|
||||
+#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 )
|
||||
+ info_ptr->trans_alpha[i]
|
||||
+#else
|
||||
info_ptr->trans[i]
|
||||
+#endif
|
||||
)
|
||||
);
|
||||
i++;
|
||||
@@ -324,9 +332,15 @@
|
||||
png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)
|
||||
if (image.depth()==32 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
|
||||
QRgb trans = 0xFF000000 | qRgb(
|
||||
+#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 )
|
||||
+ (info_ptr->trans_color.red << 8 >> bit_depth)&0xff,
|
||||
+ (info_ptr->trans_color.green << 8 >> bit_depth)&0xff,
|
||||
+ (info_ptr->trans_color.blue << 8 >> bit_depth)&0xff);
|
||||
+#else
|
||||
(info_ptr->trans_values.red << 8 >> bit_depth)&0xff,
|
||||
(info_ptr->trans_values.green << 8 >> bit_depth)&0xff,
|
||||
(info_ptr->trans_values.blue << 8 >> bit_depth)&0xff);
|
||||
+#endif
|
||||
for (uint y=0; y<height; y++) {
|
||||
for (uint x=0; x<info_ptr->width; x++) {
|
||||
if (((uint**)jt)[y][x] == trans) {
|
39
trunk/novell4gentoo/x11-libs/qt/files/qt-3.3.8-mips.patch
Normal file
39
trunk/novell4gentoo/x11-libs/qt/files/qt-3.3.8-mips.patch
Normal file
@ -0,0 +1,39 @@
|
||||
Bug 210551.
|
||||
Fix compilation on mips
|
||||
|
||||
Original commit message by Christopher Martin, debian bug 342545.
|
||||
|
||||
* Add a patch, courtesy of Steve Langasek, that fixes
|
||||
qt-x11-free's longstanding intermittent FTBFS on hppa, caused
|
||||
by "the bogus assumption in src/tools/qlocale.cpp that a
|
||||
char[] can be cast to a double *." (Closes: #342545)
|
||||
|
||||
--- qt-x11-free-3.3.6.orig/src/tools/qlocale.cpp
|
||||
+++ qt-x11-free-3.3.6/src/tools/qlocale.cpp
|
||||
@@ -122,13 +122,24 @@
|
||||
#endif
|
||||
|
||||
// We can't rely on -NAN, since all operations on a NAN should return a NAN.
|
||||
+static double be_neg_nan;
|
||||
+static double le_neg_nan;
|
||||
static const unsigned char be_neg_nan_bytes[] = { 0xff, 0xf8, 0, 0, 0, 0, 0, 0 };
|
||||
static const unsigned char le_neg_nan_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0xff };
|
||||
+static bool neg_nan_init = false;
|
||||
+
|
||||
static inline double negNan()
|
||||
{
|
||||
+ if (!neg_nan_init)
|
||||
+ {
|
||||
+ memcpy(&be_neg_nan,be_neg_nan_bytes,sizeof(be_neg_nan_bytes));
|
||||
+ memcpy(&le_neg_nan,le_neg_nan_bytes,sizeof(le_neg_nan_bytes));
|
||||
+ neg_nan_init = true;
|
||||
+ }
|
||||
return (ByteOrder == BigEndian ?
|
||||
- *((const double *) be_neg_nan_bytes) :
|
||||
- *((const double *) le_neg_nan_bytes));
|
||||
+ be_neg_nan :
|
||||
+ le_neg_nan);
|
||||
+
|
||||
}
|
||||
|
||||
// Sizes as defined by the ISO C99 standard - fallback
|
@ -0,0 +1,49 @@
|
||||
--- src/kernel/qapplication_x11.cpp.sav 2006-06-01 13:31:04.000000000 +0200
|
||||
+++ src/kernel/qapplication_x11.cpp 2006-06-01 13:33:07.000000000 +0200
|
||||
@@ -271,6 +271,7 @@ Atom qt_net_wm_frame_strut = 0; // KDE
|
||||
Atom qt_net_wm_state_stays_on_top = 0; // KDE extension
|
||||
Atom qt_net_wm_pid = 0;
|
||||
Atom qt_net_wm_user_time = 0;
|
||||
+Atom qt_net_wm_full_placement = 0; // KDE extension
|
||||
// Enlightenment support
|
||||
Atom qt_enlightenment_desktop = 0;
|
||||
|
||||
@@ -1922,6 +1923,7 @@ void qt_init_internal( int *argcptr, cha
|
||||
&qt_net_wm_state_stays_on_top );
|
||||
qt_x11_intern_atom( "_NET_WM_PID", &qt_net_wm_pid );
|
||||
qt_x11_intern_atom( "_NET_WM_USER_TIME", &qt_net_wm_user_time );
|
||||
+ qt_x11_intern_atom( "_NET_WM_FULL_PLACEMENT", &qt_net_wm_full_placement );
|
||||
qt_x11_intern_atom( "ENLIGHTENMENT_DESKTOP", &qt_enlightenment_desktop );
|
||||
qt_x11_intern_atom( "_NET_WM_NAME", &qt_net_wm_name );
|
||||
qt_x11_intern_atom( "_NET_WM_ICON_NAME", &qt_net_wm_icon_name );
|
||||
--- src/dialogs/qdialog.cpp.sav 2006-03-17 14:33:44.000000000 +0100
|
||||
+++ src/dialogs/qdialog.cpp 2006-06-01 13:38:00.000000000 +0200
|
||||
@@ -670,6 +670,11 @@ bool QDialog::event( QEvent *e )
|
||||
|
||||
#if defined(Q_WS_X11)
|
||||
extern "C" { int XSetTransientForHint( Display *, unsigned long, unsigned long ); }
|
||||
+#include <private/qt_x11_p.h>
|
||||
+#undef FocusIn
|
||||
+// defined in qapplication_x11.cpp
|
||||
+extern Atom qt_net_wm_full_placement;
|
||||
+extern bool qt_net_supports(Atom atom);
|
||||
#endif // Q_WS_X11
|
||||
|
||||
/*!
|
||||
@@ -691,10 +696,12 @@ void QDialog::show()
|
||||
|
||||
if ( !did_resize )
|
||||
adjustSize();
|
||||
- if ( has_relpos && !did_move ) {
|
||||
- adjustPositionInternal( parentWidget(), TRUE );
|
||||
- } else if ( !did_move ) {
|
||||
- adjustPositionInternal( parentWidget() );
|
||||
+ if( !qt_net_supports( qt_net_wm_full_placement )) {
|
||||
+ if ( has_relpos && !did_move ) {
|
||||
+ adjustPositionInternal( parentWidget(), TRUE );
|
||||
+ } else if ( !did_move ) {
|
||||
+ adjustPositionInternal( parentWidget() );
|
||||
+ }
|
||||
}
|
||||
|
||||
if (windowState() != state)
|
18
trunk/novell4gentoo/x11-libs/qt/files/qt-3.3.8-uic-fix.patch
Normal file
18
trunk/novell4gentoo/x11-libs/qt/files/qt-3.3.8-uic-fix.patch
Normal file
@ -0,0 +1,18 @@
|
||||
Index: tools/designer/uic/form.cpp
|
||||
===================================================================
|
||||
--- tools/designer/uic/form.cpp (revision 460038)
|
||||
+++ tools/designer/uic/form.cpp (working copy)
|
||||
@@ -731,6 +731,13 @@
|
||||
while ( !n2.isNull() ) {
|
||||
if ( n2.tagName() == "includehint" ) {
|
||||
QString file = n2.firstChild().toText().data();
|
||||
+ int colons = file.find("::");
|
||||
+
|
||||
+ if (colons != -1)
|
||||
+ {
|
||||
+ file = file.right(file.length() - colons - 2);
|
||||
+ }
|
||||
+
|
||||
localIncludes += file;
|
||||
}
|
||||
n2 = n2.nextSibling().toElement();
|
159
trunk/novell4gentoo/x11-libs/qt/files/qt-3.3.8-visibility.patch
Normal file
159
trunk/novell4gentoo/x11-libs/qt/files/qt-3.3.8-visibility.patch
Normal file
@ -0,0 +1,159 @@
|
||||
Index: configure
|
||||
===================================================================
|
||||
--- configure (revision 471775)
|
||||
+++ configure (working copy)
|
||||
@@ -1053,6 +1053,7 @@
|
||||
[ -d $outpath/src/tools ] || mkdir -p $outpath/src/tools
|
||||
cat > $outpath/src/tools/qconfig.cpp.new <<EOF
|
||||
/* Install paths from configure */
|
||||
+#include "qglobal.h"
|
||||
|
||||
static const char QT_INSTALL_PREFIX [267] = "qt_nstpath=$QT_INSTALL_PREFIX";
|
||||
static const char QT_INSTALL_BINS [267] = "qt_binpath=$QT_INSTALL_BINS";
|
||||
Index: src/kernel/qgplugin.h
|
||||
===================================================================
|
||||
--- src/kernel/qgplugin.h (revision 471775)
|
||||
+++ src/kernel/qgplugin.h (working copy)
|
||||
@@ -90,35 +90,19 @@
|
||||
return i->iface(); \
|
||||
}
|
||||
|
||||
-# ifdef Q_WS_WIN
|
||||
-# ifdef Q_CC_BOR
|
||||
-# define Q_EXPORT_PLUGIN(PLUGIN) \
|
||||
- Q_PLUGIN_VERIFICATION_DATA \
|
||||
- Q_EXTERN_C __declspec(dllexport) \
|
||||
- const char * __stdcall qt_ucm_query_verification_data() \
|
||||
- { return qt_ucm_verification_data; } \
|
||||
- Q_EXTERN_C __declspec(dllexport) QUnknownInterface* \
|
||||
- __stdcall ucm_instantiate() \
|
||||
- Q_PLUGIN_INSTANTIATE( PLUGIN )
|
||||
-# else
|
||||
-# define Q_EXPORT_PLUGIN(PLUGIN) \
|
||||
- Q_PLUGIN_VERIFICATION_DATA \
|
||||
- Q_EXTERN_C __declspec(dllexport) \
|
||||
- const char *qt_ucm_query_verification_data() \
|
||||
- { return qt_ucm_verification_data; } \
|
||||
- Q_EXTERN_C __declspec(dllexport) QUnknownInterface* ucm_instantiate() \
|
||||
- Q_PLUGIN_INSTANTIATE( PLUGIN )
|
||||
-# endif
|
||||
-# else
|
||||
-# define Q_EXPORT_PLUGIN(PLUGIN) \
|
||||
+#if defined(Q_WS_WIN) && defined(Q_CC_BOR)
|
||||
+# define Q_STDCALL __stdcall
|
||||
+#else
|
||||
+# define Q_STDCALL
|
||||
+#endif
|
||||
+
|
||||
+#define Q_EXPORT_PLUGIN(PLUGIN) \
|
||||
Q_PLUGIN_VERIFICATION_DATA \
|
||||
- Q_EXTERN_C \
|
||||
- const char *qt_ucm_query_verification_data() \
|
||||
+ Q_EXTERN_C Q_EXPORT \
|
||||
+ const char * Q_STDCALL qt_ucm_query_verification_data() \
|
||||
{ return qt_ucm_verification_data; } \
|
||||
- Q_EXTERN_C QUnknownInterface* ucm_instantiate() \
|
||||
+ Q_EXTERN_C Q_EXPORT QUnknownInterface* Q_STDCALL ucm_instantiate() \
|
||||
Q_PLUGIN_INSTANTIATE( PLUGIN )
|
||||
-# endif
|
||||
-
|
||||
#endif
|
||||
|
||||
struct QUnknownInterface;
|
||||
Index: src/kernel/qapplication_x11.cpp
|
||||
===================================================================
|
||||
--- src/kernel/qapplication_x11.cpp (revision 471775)
|
||||
+++ src/kernel/qapplication_x11.cpp (working copy)
|
||||
@@ -314,7 +314,7 @@
|
||||
|
||||
// flags for extensions for special Languages, currently only for RTL languages
|
||||
static bool qt_use_rtl_extensions = FALSE;
|
||||
-bool qt_hebrew_keyboard_hack = FALSE;
|
||||
+Q_EXPORT bool qt_hebrew_keyboard_hack = FALSE;
|
||||
|
||||
static Window mouseActWindow = 0; // window where mouse is
|
||||
static int mouseButtonPressed = 0; // last mouse button pressed
|
||||
@@ -3800,7 +3800,7 @@
|
||||
}
|
||||
|
||||
|
||||
-bool qt_try_modal( QWidget *widget, XEvent *event )
|
||||
+Q_EXPORT bool qt_try_modal( QWidget *widget, XEvent *event )
|
||||
{
|
||||
if (qt_xdnd_dragging) {
|
||||
// allow mouse events while DnD is active
|
||||
Index: src/kernel/qtextengine_p.h
|
||||
===================================================================
|
||||
--- src/kernel/qtextengine_p.h (revision 471775)
|
||||
+++ src/kernel/qtextengine_p.h (working copy)
|
||||
@@ -280,7 +280,7 @@
|
||||
|
||||
class QFontPrivate;
|
||||
|
||||
-class QTextEngine {
|
||||
+class Q_EXPORT QTextEngine {
|
||||
public:
|
||||
QTextEngine( const QString &str, QFontPrivate *f );
|
||||
~QTextEngine();
|
||||
Index: src/tools/qglobal.h
|
||||
===================================================================
|
||||
--- src/tools/qglobal.h (revision 471775)
|
||||
+++ src/tools/qglobal.h (working copy)
|
||||
@@ -865,6 +865,10 @@
|
||||
# define Q_TEMPLATE_EXTERN
|
||||
# undef Q_DISABLE_COPY /* avoid unresolved externals */
|
||||
# endif
|
||||
+#elif defined(Q_CC_GNU) && __GNUC__ - 0 >= 4
|
||||
+# define Q_EXPORT __attribute__((visibility("default")))
|
||||
+# undef QT_MAKEDLL /* ignore these for other platforms */
|
||||
+# undef QT_DLL
|
||||
#else
|
||||
# undef QT_MAKEDLL /* ignore these for other platforms */
|
||||
# undef QT_DLL
|
||||
Index: tools/designer/uilib/qwidgetfactory.h
|
||||
===================================================================
|
||||
--- tools/designer/uilib/qwidgetfactory.h (revision 471775)
|
||||
+++ tools/designer/uilib/qwidgetfactory.h (working copy)
|
||||
@@ -48,7 +48,7 @@
|
||||
class QWidgetFactoryPrivate;
|
||||
class UibStrTable;
|
||||
|
||||
-class QWidgetFactory
|
||||
+class Q_EXPORT QWidgetFactory
|
||||
{
|
||||
public:
|
||||
QWidgetFactory();
|
||||
Index: tools/designer/uilib/qwidgetfactory.cpp
|
||||
===================================================================
|
||||
--- tools/designer/uilib/qwidgetfactory.cpp (revision 471775)
|
||||
+++ tools/designer/uilib/qwidgetfactory.cpp (working copy)
|
||||
@@ -113,13 +113,13 @@
|
||||
static QMap<QString, bool> *availableWidgetMap = 0;
|
||||
static QStringList *availableWidgetList = 0;
|
||||
|
||||
-QMap<QWidget*, QString> *qwf_forms = 0;
|
||||
+Q_EXPORT QMap<QWidget*, QString> *qwf_forms = 0;
|
||||
QString *qwf_language = 0;
|
||||
-bool qwf_execute_code = TRUE;
|
||||
+Q_EXPORT bool qwf_execute_code = TRUE;
|
||||
bool qwf_stays_on_top = FALSE;
|
||||
QString qwf_currFileName = "";
|
||||
QObject *qwf_form_object = 0;
|
||||
-QString *qwf_plugin_dir = 0;
|
||||
+Q_EXPORT QString *qwf_plugin_dir = 0;
|
||||
|
||||
static void setupPluginDir()
|
||||
{
|
||||
Index: tools/designer/shared/domtool.h
|
||||
===================================================================
|
||||
--- tools/designer/shared/domtool.h (revision 471775)
|
||||
+++ tools/designer/shared/domtool.h (working copy)
|
||||
@@ -33,7 +33,7 @@
|
||||
class QDomElement;
|
||||
class QDomDocument;
|
||||
|
||||
-class DomTool : public Qt
|
||||
+class Q_EXPORT DomTool : public Qt
|
||||
{
|
||||
public:
|
||||
static QVariant readProperty( const QDomElement& e, const QString& name, const QVariant& defValue );
|
@ -0,0 +1,32 @@
|
||||
--- src/kernel/qfontdatabase.cpp 2008-07-10 06:17:31.000000000 +0800
|
||||
+++ src/kernel/qfontdatabase.cpp 2008-07-10 06:27:53.000000000 +0800
|
||||
@@ -960,19 +960,17 @@
|
||||
#ifdef Q_WS_X11
|
||||
if (script == QFont::Han) {
|
||||
// modify script according to locale
|
||||
- static QFont::Script defaultHan = QFont::UnknownScript;
|
||||
- if (defaultHan == QFont::UnknownScript) {
|
||||
- QCString locale = setlocale(LC_ALL, NULL);
|
||||
- if (locale.contains("ko"))
|
||||
- defaultHan = QFont::Han_Korean;
|
||||
- else if (locale.contains("zh_TW") || locale.contains("zh_HK"))
|
||||
- defaultHan = QFont::Han_TraditionalChinese;
|
||||
- else if (locale.contains("zh"))
|
||||
- defaultHan = QFont::Han_SimplifiedChinese;
|
||||
- else
|
||||
- defaultHan = QFont::Han_Japanese;
|
||||
+ static QFont::Script defaultHan = QFont::Han;
|
||||
+ QCString locale = setlocale(LC_ALL, NULL);
|
||||
+ if (locale.contains("ko"))
|
||||
+ defaultHan = QFont::Han_Korean;
|
||||
+ else if (locale.contains("zh_TW") || locale.contains("zh_HK"))
|
||||
+ defaultHan = QFont::Han_TraditionalChinese;
|
||||
+ else if (locale.contains("zh"))
|
||||
+ defaultHan = QFont::Han_SimplifiedChinese;
|
||||
+ else if (locale.contains("jp"))
|
||||
+ defaultHan = QFont::Han_Japanese;
|
||||
- }
|
||||
script = defaultHan;
|
||||
}
|
||||
#endif
|
||||
|
13
trunk/novell4gentoo/x11-libs/qt/files/qt-ulibc.patch
Normal file
13
trunk/novell4gentoo/x11-libs/qt/files/qt-ulibc.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- qt-x11-free-3.3.4.orig/src/tools/qlocale.cpp 2005-01-21 17:16:05.000000000 +0000
|
||||
+++ qt-x11-free-3.3.4/src/tools/qlocale.cpp 2005-02-18 13:36:59.000000000 +0000
|
||||
@@ -55,6 +55,10 @@
|
||||
# undef INFINITY
|
||||
#endif
|
||||
|
||||
+#if defined(Q_OS_LINUX) && defined(__UCLIBC__)
|
||||
+# undef Q_OS_LINUX
|
||||
+#endif
|
||||
+
|
||||
#ifdef Q_OS_LINUX
|
||||
# include <fenv.h>
|
||||
#endif
|
11
trunk/novell4gentoo/x11-libs/qt/metadata.xml
Normal file
11
trunk/novell4gentoo/x11-libs/qt/metadata.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>qt</herd>
|
||||
<use>
|
||||
<flag name='immqt-bc'>Enable binary compatible version of immodule for
|
||||
Qt</flag>
|
||||
<flag name='immqt'>Enable binary incompatible version of immodule for
|
||||
Qt</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
372
trunk/novell4gentoo/x11-libs/qt/qt-3.3.8b-r1.ebuild
Normal file
372
trunk/novell4gentoo/x11-libs/qt/qt-3.3.8b-r1.ebuild
Normal file
@ -0,0 +1,372 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/qt-3.3.8b-r1.ebuild,v 1.9 2009/12/03 18:25:47 yngwin Exp $
|
||||
|
||||
# *** Please remember to update qt3.eclass when revbumping this ***
|
||||
|
||||
inherit eutils flag-o-matic toolchain-funcs
|
||||
|
||||
SRCTYPE="free"
|
||||
DESCRIPTION="The Qt toolkit is a comprehensive C++ application development framework."
|
||||
HOMEPAGE="http://qt.nokia.com/"
|
||||
|
||||
IMMQT_P="qt-x11-immodule-unified-qt3.3.8-20070321-gentoo"
|
||||
|
||||
SRC_URI="ftp://ftp.trolltech.com/qt/source/qt-x11-${SRCTYPE}-${PV}.tar.gz
|
||||
immqt? ( mirror://gentoo/${IMMQT_P}.diff.bz2 )
|
||||
immqt-bc? ( mirror://gentoo/${IMMQT_P}.diff.bz2 )"
|
||||
LICENSE="|| ( QPL-1.0 GPL-2 GPL-3 )"
|
||||
|
||||
SLOT="3"
|
||||
KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
|
||||
IUSE="cups debug doc examples firebird ipv6 mysql nas nis odbc opengl postgres sqlite xinerama immqt immqt-bc"
|
||||
|
||||
RDEPEND="
|
||||
media-libs/jpeg
|
||||
>=media-libs/freetype-2
|
||||
>=media-libs/libmng-1.0.9
|
||||
media-libs/libpng
|
||||
sys-libs/zlib
|
||||
x11-libs/libXft
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXi
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libSM
|
||||
cups? ( net-print/cups )
|
||||
firebird? ( dev-db/firebird )
|
||||
mysql? ( virtual/mysql )
|
||||
nas? ( >=media-libs/nas-1.5 )
|
||||
opengl? ( virtual/opengl virtual/glu )
|
||||
postgres? ( virtual/postgresql-base )
|
||||
xinerama? ( x11-libs/libXinerama )"
|
||||
DEPEND="${RDEPEND}
|
||||
x11-proto/inputproto
|
||||
x11-proto/xextproto
|
||||
xinerama? ( x11-proto/xineramaproto )
|
||||
immqt? ( x11-proto/xineramaproto )
|
||||
immqt-bc? ( x11-proto/xineramaproto )"
|
||||
PDEPEND="odbc? ( ~dev-db/qt-unixODBC-$PV )"
|
||||
|
||||
S="${WORKDIR}/qt-x11-${SRCTYPE}-${PV}"
|
||||
|
||||
QTBASE="/usr/qt/3"
|
||||
|
||||
pkg_setup() {
|
||||
if use immqt && use immqt-bc ; then
|
||||
ewarn
|
||||
ewarn "immqt and immqt-bc are exclusive. You cannot set both."
|
||||
ewarn "Please specify either immqt or immqt-bc."
|
||||
ewarn
|
||||
die
|
||||
elif use immqt ; then
|
||||
ewarn
|
||||
ewarn "You are going to compile binary imcompatible immodule for Qt. This means"
|
||||
ewarn "you have to recompile everything depending on Qt after you install it."
|
||||
ewarn "Be aware."
|
||||
ewarn
|
||||
fi
|
||||
|
||||
export QTDIR="${S}"
|
||||
|
||||
CXX=$(tc-getCXX)
|
||||
if [[ ${CXX/g++/} != ${CXX} ]]; then
|
||||
PLATCXX="g++"
|
||||
elif [[ ${CXX/icpc/} != ${CXX} ]]; then
|
||||
PLATCXX="icc"
|
||||
else
|
||||
die "Unknown compiler ${CXX}."
|
||||
fi
|
||||
|
||||
case ${CHOST} in
|
||||
*-freebsd*|*-dragonfly*)
|
||||
PLATNAME="freebsd" ;;
|
||||
*-openbsd*)
|
||||
PLATNAME="openbsd" ;;
|
||||
*-netbsd*)
|
||||
PLATNAME="netbsd" ;;
|
||||
*-darwin*)
|
||||
PLATNAME="darwin" ;;
|
||||
*-linux-*|*-linux)
|
||||
PLATNAME="linux" ;;
|
||||
*)
|
||||
die "Unknown CHOST, no platform choosed."
|
||||
esac
|
||||
|
||||
# probably this should be '*-64' for 64bit archs
|
||||
# in a fully multilib environment (no compatibility symlinks)
|
||||
export PLATFORM="${PLATNAME}-${PLATCXX}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
sed -i -e 's:read acceptance:acceptance=yes:' configure
|
||||
|
||||
# Do not link with -rpath. See bug #75181.
|
||||
find "${S}"/mkspecs -name qmake.conf | xargs \
|
||||
sed -i -e 's:QMAKE_RPATH.*:QMAKE_RPATH =:'
|
||||
|
||||
# Patch for uic includehint errors (aseigo patch)
|
||||
epatch "${FILESDIR}"/qt-3.3.8-uic-fix.patch
|
||||
|
||||
# KDE related patches
|
||||
epatch "${FILESDIR}"/0001-dnd_optimization.patch
|
||||
epatch "${FILESDIR}"/0002-dnd_active_window_fix.patch
|
||||
epatch "${FILESDIR}"/0038-dragobject-dont-prefer-unknown.patch
|
||||
epatch "${FILESDIR}"/0044-qscrollview-windowactivate-fix.diff
|
||||
epatch "${FILESDIR}"/0047-fix-kmenu-widget.diff
|
||||
epatch "${FILESDIR}"/0048-qclipboard_hack_80072.patch
|
||||
|
||||
# ulibc patch (bug #100246)
|
||||
epatch "${FILESDIR}"/qt-ulibc.patch
|
||||
|
||||
# xinerama patch: http://ktown.kde.org/~seli/xinerama/
|
||||
epatch "${FILESDIR}"/qt-3.3.8-seli-xinerama.patch
|
||||
|
||||
# Visibility patch, apply only on GCC 4.1 and later for safety
|
||||
# [[ $(gcc-major-version)$(gcc-minor-version) -ge 41 ]] && \
|
||||
epatch "${FILESDIR}"/qt-3.3.8-visibility.patch
|
||||
|
||||
# Fix configure to correctly pick up gcc version, bug 244732
|
||||
epatch "${FILESDIR}"/qt-3.3.8-fix-compiler-detection.patch
|
||||
|
||||
# Fix CJK script rendering, bug 229567
|
||||
epatch "${FILESDIR}"/qt-3.3.8b-cjk-fix.patch
|
||||
|
||||
if use immqt || use immqt-bc ; then
|
||||
epatch ../${IMMQT_P}.diff
|
||||
sh make-symlinks.sh || die "make symlinks failed"
|
||||
|
||||
epatch "${FILESDIR}"/qt-3.3.8-immqt+gcc-4.3.patch
|
||||
fi
|
||||
|
||||
if use mips; then
|
||||
epatch "${FILESDIR}"/qt-3.3.8-mips.patch
|
||||
fi
|
||||
|
||||
# known working flags wrt #77623
|
||||
use sparc && export CFLAGS="-O1" && export CXXFLAGS="${CFLAGS}"
|
||||
# set c/xxflags and ldflags
|
||||
strip-flags
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
if [[ $( gcc-fullversion ) == "3.4.6" && gcc-specs-ssp ]] ; then
|
||||
ewarn "Appending -fno-stack-protector to CFLAGS/CXXFLAGS"
|
||||
append-flags -fno-stack-protector
|
||||
fi
|
||||
|
||||
sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
|
||||
-e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
|
||||
-e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
|
||||
-e "s:\<QMAKE_CC\>.*=.*:QMAKE_CC=$(tc-getCC):" \
|
||||
-e "s:\<QMAKE_CXX\>.*=.*:QMAKE_CXX=$(tc-getCXX):" \
|
||||
-e "s:\<QMAKE_LINK\>.*=.*:QMAKE_LINK=$(tc-getCXX):" \
|
||||
-e "s:\<QMAKE_LINK_SHLIB\>.*=.*:QMAKE_LINK_SHLIB=$(tc-getCXX):" \
|
||||
"${S}"/mkspecs/${PLATFORM}/qmake.conf || die
|
||||
|
||||
if [ $(get_libdir) != "lib" ] ; then
|
||||
sed -i -e "s:/lib$:/$(get_libdir):" \
|
||||
"${S}"/mkspecs/${PLATFORM}/qmake.conf || die
|
||||
fi
|
||||
|
||||
sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
|
||||
-e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
|
||||
"${S}"/qmake/Makefile.unix || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export SYSCONF="${D}${QTBASE}"/etc/settings
|
||||
|
||||
# Let's just allow writing to these directories during Qt emerge
|
||||
# as it makes Qt much happier.
|
||||
addwrite "${QTBASE}/etc/settings"
|
||||
addwrite "${HOME}/.qt"
|
||||
|
||||
[ "$(get_libdir)" != "lib" ] && myconf="${myconf} -L/usr/$(get_libdir)"
|
||||
|
||||
# unixODBC support is now a PDEPEND on dev-db/qt-unixODBC; see bug 14178.
|
||||
use nas && myconf+=" -system-nas-sound"
|
||||
use nis && myconf+=" -nis" || myconf+=" -no-nis"
|
||||
use mysql && myconf+=" -plugin-sql-mysql -I/usr/include/mysql -L/usr/$(get_libdir)/mysql" || myconf+=" -no-sql-mysql"
|
||||
use postgres && myconf+=" -plugin-sql-psql -I/usr/include/postgresql/server -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server" || myconf+=" -no-sql-psql"
|
||||
use firebird && myconf+=" -plugin-sql-ibase -I/opt/firebird/include" || myconf+=" -no-sql-ibase"
|
||||
use sqlite && myconf+=" -plugin-sql-sqlite" || myconf+=" -no-sql-sqlite"
|
||||
use cups && myconf+=" -cups" || myconf+=" -no-cups"
|
||||
use opengl && myconf+=" -enable-module=opengl" || myconf+=" -disable-opengl"
|
||||
use debug && myconf+=" -debug" || myconf+=" -release -no-g++-exceptions"
|
||||
use xinerama && myconf+=" -xinerama" || myconf+=" -no-xinerama"
|
||||
|
||||
myconf="${myconf} -system-zlib -qt-gif"
|
||||
|
||||
use ipv6 && myconf+=" -ipv6" || myconf+=" -no-ipv6"
|
||||
use immqt-bc && myconf+=" -inputmethod"
|
||||
use immqt && myconf+=" -inputmethod -inputmethod-ext"
|
||||
|
||||
export YACC='byacc -d'
|
||||
tc-export CC CXX
|
||||
export LINK="$(tc-getCXX)"
|
||||
|
||||
./configure -sm -thread -stl -system-libjpeg -verbose -largefile \
|
||||
-qt-imgfmt-{jpeg,mng,png} -tablet -system-libmng \
|
||||
-system-libpng -xft -platform ${PLATFORM} -xplatform \
|
||||
${PLATFORM} -xrender -prefix ${QTBASE} -libdir ${QTBASE}/$(get_libdir) \
|
||||
-fast -no-sql-odbc ${myconf} -dlopen-opengl || die
|
||||
|
||||
emake src-qmake src-moc sub-src || die
|
||||
|
||||
export DYLD_LIBRARY_PATH="${S}/lib:/usr/X11R6/lib:${DYLD_LIBRARY_PATH}"
|
||||
export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
|
||||
|
||||
emake sub-tools || die
|
||||
|
||||
if use examples; then
|
||||
emake sub-tutorial sub-examples || die
|
||||
fi
|
||||
|
||||
# Make the msg2qm utility (not made by default)
|
||||
cd "${S}"/tools/msg2qm
|
||||
../../bin/qmake
|
||||
emake
|
||||
|
||||
# Make the qembed utility (not made by default)
|
||||
cd "${S}"/tools/qembed
|
||||
../../bin/qmake
|
||||
emake
|
||||
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# binaries
|
||||
into ${QTBASE}
|
||||
dobin bin/*
|
||||
dobin tools/msg2qm/msg2qm
|
||||
dobin tools/qembed/qembed
|
||||
|
||||
# libraries
|
||||
dolib.so lib/lib{editor,qassistantclient,designercore}.a
|
||||
dolib.so lib/libqt-mt.la
|
||||
dolib.so lib/libqt-mt.so.${PV/b} lib/libqui.so.1.0.0
|
||||
cd "${D}"/${QTBASE}/$(get_libdir)
|
||||
|
||||
for x in libqui.so ; do
|
||||
ln -s $x.1.0.0 $x.1.0
|
||||
ln -s $x.1.0 $x.1
|
||||
ln -s $x.1 $x
|
||||
done
|
||||
|
||||
# version symlinks - 3.3.5->3.3->3->.so
|
||||
ln -s libqt-mt.so.${PV/b} libqt-mt.so.3.3
|
||||
ln -s libqt-mt.so.3.3 libqt-mt.so.3
|
||||
ln -s libqt-mt.so.3 libqt-mt.so
|
||||
|
||||
# libqt -> libqt-mt symlinks
|
||||
ln -s libqt-mt.so.${PV/b} libqt.so.${PV/b}
|
||||
ln -s libqt-mt.so.3.3 libqt.so.3.3
|
||||
ln -s libqt-mt.so.3 libqt.so.3
|
||||
ln -s libqt-mt.so libqt.so
|
||||
|
||||
# plugins
|
||||
cd "${S}"
|
||||
local plugins=$(find plugins -name "lib*.so" -print)
|
||||
for x in ${plugins}; do
|
||||
exeinto ${QTBASE}/$(dirname ${x})
|
||||
doexe ${x}
|
||||
done
|
||||
|
||||
# Past this point just needs to be done once
|
||||
is_final_abi || return 0
|
||||
|
||||
# includes
|
||||
cd "${S}"
|
||||
dodir ${QTBASE}/include/private
|
||||
cp include/*\.h "${D}"/${QTBASE}/include/
|
||||
cp include/private/*\.h "${D}"/${QTBASE}/include/private/
|
||||
|
||||
# prl files
|
||||
sed -i -e "s:${S}:${QTBASE}:g" "${S}"/lib/*.prl
|
||||
insinto ${QTBASE}/$(get_libdir)
|
||||
doins "${S}"/lib/*.prl
|
||||
|
||||
# pkg-config file
|
||||
insinto ${QTBASE}/$(get_libdir)/pkgconfig
|
||||
doins "${S}"/lib/*.pc
|
||||
|
||||
# List all the multilib libdirs
|
||||
local libdirs
|
||||
for alibdir in $(get_all_libdirs); do
|
||||
libdirs="${libdirs}:${QTBASE}/${alibdir}"
|
||||
done
|
||||
|
||||
# environment variables
|
||||
cat <<EOF > "${T}"/45qt3
|
||||
PATH=${QTBASE}/bin
|
||||
ROOTPATH=${QTBASE}/bin
|
||||
LDPATH=${libdirs:1}
|
||||
QMAKESPEC=${PLATFORM}
|
||||
MANPATH=${QTBASE}/doc/man
|
||||
PKG_CONFIG_PATH=${QTBASE}/$(get_libdir)/pkgconfig
|
||||
EOF
|
||||
|
||||
cat <<EOF > "${T}"/50qtdir3
|
||||
QTDIR=${QTBASE}
|
||||
EOF
|
||||
|
||||
cat <<EOF > "${T}"/50-qt3-revdep
|
||||
SEARCH_DIRS="${QTBASE}"
|
||||
EOF
|
||||
|
||||
insinto /etc/revdep-rebuild
|
||||
doins "${T}"/50-qt3-revdep
|
||||
|
||||
doenvd "${T}"/45qt3 "${T}"/50qtdir3
|
||||
|
||||
if [ "${SYMLINK_LIB}" = "yes" ]; then
|
||||
dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) ${QTBASE}/lib
|
||||
fi
|
||||
|
||||
insinto ${QTBASE}/tools/designer
|
||||
doins -r tools/designer/templates
|
||||
|
||||
insinto ${QTBASE}
|
||||
doins -r translations
|
||||
|
||||
keepdir ${QTBASE}/etc/settings
|
||||
|
||||
if use doc; then
|
||||
insinto ${QTBASE}
|
||||
doins -r "${S}"/doc
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
find "${S}"/examples "${S}"/tutorial -name Makefile | \
|
||||
xargs sed -i -e "s:${S}:${QTBASE}:g"
|
||||
|
||||
cp -r "${S}"/examples "${D}"${QTBASE}/
|
||||
cp -r "${S}"/tutorial "${D}"${QTBASE}/
|
||||
fi
|
||||
|
||||
# misc build reqs
|
||||
insinto ${QTBASE}/mkspecs
|
||||
doins -r "${S}"/mkspecs/${PLATFORM}
|
||||
|
||||
sed -e "s:${S}:${QTBASE}:g" \
|
||||
"${S}"/.qmake.cache > "${D}"${QTBASE}/.qmake.cache
|
||||
|
||||
dodoc FAQ README README-QT.TXT changes*
|
||||
if use immqt || use immqt-bc ; then
|
||||
dodoc "${S}"/README.immodule
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
elog "After a rebuild of Qt, it can happen that Qt plugins (such as Qt/KDE styles,"
|
||||
elog "or widgets for the Qt designer) are no longer recognized. If this situation"
|
||||
elog "occurs you should recompile the packages providing these plugins,"
|
||||
elog "and you should also make sure that Qt and its plugins were compiled with the"
|
||||
elog "same version of GCC. Packages that may need to be rebuilt are, for instance,"
|
||||
elog "kde-base/kdelibs, kde-base/kdeartwork and kde-base/kdeartwork-styles."
|
||||
elog "See http://doc.trolltech.com/3.3/plugins-howto.html for more infos."
|
||||
echo
|
||||
}
|
374
trunk/novell4gentoo/x11-libs/qt/qt-3.3.8b-r2.ebuild
Normal file
374
trunk/novell4gentoo/x11-libs/qt/qt-3.3.8b-r2.ebuild
Normal file
@ -0,0 +1,374 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/qt-3.3.8b-r2.ebuild,v 1.7 2009/12/03 18:25:47 yngwin Exp $
|
||||
|
||||
# *** Please remember to update qt3.eclass when revbumping this ***
|
||||
|
||||
inherit eutils flag-o-matic toolchain-funcs
|
||||
|
||||
SRCTYPE="free"
|
||||
DESCRIPTION="The Qt toolkit is a comprehensive C++ application development framework."
|
||||
HOMEPAGE="http://qt.nokia.com/"
|
||||
|
||||
IMMQT_P="qt-x11-immodule-unified-qt3.3.8-20070321-gentoo"
|
||||
|
||||
SRC_URI="ftp://ftp.trolltech.com/qt/source/qt-x11-${SRCTYPE}-${PV}.tar.gz
|
||||
immqt? ( mirror://gentoo/${IMMQT_P}.diff.bz2 )
|
||||
immqt-bc? ( mirror://gentoo/${IMMQT_P}.diff.bz2 )"
|
||||
LICENSE="|| ( QPL-1.0 GPL-2 GPL-3 )"
|
||||
|
||||
SLOT="3"
|
||||
KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ~ppc64 sparc x86 ~x86-fbsd"
|
||||
IUSE="cups debug doc examples firebird ipv6 mysql nas nis odbc opengl postgres sqlite xinerama immqt immqt-bc"
|
||||
|
||||
RDEPEND="
|
||||
media-libs/jpeg
|
||||
>=media-libs/freetype-2
|
||||
>=media-libs/libmng-1.0.9
|
||||
media-libs/libpng
|
||||
sys-libs/zlib
|
||||
x11-libs/libXft
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXi
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libSM
|
||||
cups? ( net-print/cups )
|
||||
firebird? ( dev-db/firebird )
|
||||
mysql? ( virtual/mysql )
|
||||
nas? ( >=media-libs/nas-1.5 )
|
||||
opengl? ( virtual/opengl virtual/glu )
|
||||
postgres? ( virtual/postgresql-base )
|
||||
xinerama? ( x11-libs/libXinerama )"
|
||||
DEPEND="${RDEPEND}
|
||||
x11-proto/inputproto
|
||||
x11-proto/xextproto
|
||||
xinerama? ( x11-proto/xineramaproto )
|
||||
immqt? ( x11-proto/xineramaproto )
|
||||
immqt-bc? ( x11-proto/xineramaproto )"
|
||||
PDEPEND="odbc? ( ~dev-db/qt-unixODBC-$PV )"
|
||||
|
||||
S="${WORKDIR}/qt-x11-${SRCTYPE}-${PV}"
|
||||
|
||||
QTBASE="/usr/qt/3"
|
||||
|
||||
pkg_setup() {
|
||||
if use immqt && use immqt-bc ; then
|
||||
ewarn
|
||||
ewarn "immqt and immqt-bc are exclusive. You cannot set both."
|
||||
ewarn "Please specify either immqt or immqt-bc."
|
||||
ewarn
|
||||
die
|
||||
elif use immqt ; then
|
||||
ewarn
|
||||
ewarn "You are going to compile binary imcompatible immodule for Qt. This means"
|
||||
ewarn "you have to recompile everything depending on Qt after you install it."
|
||||
ewarn "Be aware."
|
||||
ewarn
|
||||
fi
|
||||
|
||||
export QTDIR="${S}"
|
||||
|
||||
CXX=$(tc-getCXX)
|
||||
if [[ ${CXX/g++/} != ${CXX} ]]; then
|
||||
PLATCXX="g++"
|
||||
elif [[ ${CXX/icpc/} != ${CXX} ]]; then
|
||||
PLATCXX="icc"
|
||||
else
|
||||
die "Unknown compiler ${CXX}."
|
||||
fi
|
||||
|
||||
case ${CHOST} in
|
||||
*-freebsd*|*-dragonfly*)
|
||||
PLATNAME="freebsd" ;;
|
||||
*-openbsd*)
|
||||
PLATNAME="openbsd" ;;
|
||||
*-netbsd*)
|
||||
PLATNAME="netbsd" ;;
|
||||
*-darwin*)
|
||||
PLATNAME="darwin" ;;
|
||||
*-linux-*|*-linux)
|
||||
PLATNAME="linux" ;;
|
||||
*)
|
||||
die "Unknown CHOST, no platform choosed."
|
||||
esac
|
||||
|
||||
# probably this should be '*-64' for 64bit archs
|
||||
# in a fully multilib environment (no compatibility symlinks)
|
||||
export PLATFORM="${PLATNAME}-${PLATCXX}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
sed -i -e 's:read acceptance:acceptance=yes:' configure
|
||||
|
||||
# Do not link with -rpath. See bug #75181.
|
||||
find "${S}"/mkspecs -name qmake.conf | xargs \
|
||||
sed -i -e 's:QMAKE_RPATH.*:QMAKE_RPATH =:'
|
||||
|
||||
# Patch for uic includehint errors (aseigo patch)
|
||||
epatch "${FILESDIR}"/qt-3.3.8-uic-fix.patch
|
||||
|
||||
# KDE related patches
|
||||
epatch "${FILESDIR}"/0001-dnd_optimization.patch
|
||||
epatch "${FILESDIR}"/0002-dnd_active_window_fix.patch
|
||||
epatch "${FILESDIR}"/0038-dragobject-dont-prefer-unknown.patch
|
||||
epatch "${FILESDIR}"/0044-qscrollview-windowactivate-fix.diff
|
||||
epatch "${FILESDIR}"/0047-fix-kmenu-widget.diff
|
||||
epatch "${FILESDIR}"/0048-qclipboard_hack_80072.patch
|
||||
|
||||
# ulibc patch (bug #100246)
|
||||
epatch "${FILESDIR}"/qt-ulibc.patch
|
||||
|
||||
# xinerama patch: http://ktown.kde.org/~seli/xinerama/
|
||||
epatch "${FILESDIR}"/qt-3.3.8-seli-xinerama.patch
|
||||
|
||||
# Visibility patch, apply only on GCC 4.1 and later for safety
|
||||
# [[ $(gcc-major-version)$(gcc-minor-version) -ge 41 ]] && \
|
||||
epatch "${FILESDIR}"/qt-3.3.8-visibility.patch
|
||||
|
||||
# Fix configure to correctly pick up gcc version, bug 244732
|
||||
epatch "${FILESDIR}"/qt-3.3.8-fix-compiler-detection.patch
|
||||
|
||||
# Fix CJK script rendering, bug 229567
|
||||
epatch "${FILESDIR}"/qt-3.3.8b-cjk-fix.patch
|
||||
|
||||
# Fix libpng-1.4 issues
|
||||
epatch "${FILESDIR}"/qt-3.3.8-libpng14.patch
|
||||
|
||||
if use immqt || use immqt-bc ; then
|
||||
epatch ../${IMMQT_P}.diff
|
||||
sh make-symlinks.sh || die "make symlinks failed"
|
||||
|
||||
epatch "${FILESDIR}"/qt-3.3.8-immqt+gcc-4.3.patch
|
||||
fi
|
||||
|
||||
if use mips; then
|
||||
epatch "${FILESDIR}"/qt-3.3.8-mips.patch
|
||||
fi
|
||||
|
||||
# known working flags wrt #77623
|
||||
use sparc && export CFLAGS="-O1" && export CXXFLAGS="${CFLAGS}"
|
||||
# set c/xxflags and ldflags
|
||||
strip-flags
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
if [[ $( gcc-fullversion ) == "3.4.6" && gcc-specs-ssp ]] ; then
|
||||
ewarn "Appending -fno-stack-protector to CFLAGS/CXXFLAGS"
|
||||
append-flags -fno-stack-protector
|
||||
fi
|
||||
|
||||
sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
|
||||
-e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
|
||||
-e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
|
||||
-e "s:\<QMAKE_CC\>.*=.*:QMAKE_CC=$(tc-getCC):" \
|
||||
-e "s:\<QMAKE_CXX\>.*=.*:QMAKE_CXX=$(tc-getCXX):" \
|
||||
-e "s:\<QMAKE_LINK\>.*=.*:QMAKE_LINK=$(tc-getCXX):" \
|
||||
-e "s:\<QMAKE_LINK_SHLIB\>.*=.*:QMAKE_LINK_SHLIB=$(tc-getCXX):" \
|
||||
"${S}"/mkspecs/${PLATFORM}/qmake.conf || die
|
||||
|
||||
if [ $(get_libdir) != "lib" ] ; then
|
||||
sed -i -e "s:/lib$:/$(get_libdir):" \
|
||||
"${S}"/mkspecs/${PLATFORM}/qmake.conf || die
|
||||
fi
|
||||
|
||||
sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
|
||||
-e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
|
||||
"${S}"/qmake/Makefile.unix || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export SYSCONF="${D}${QTBASE}"/etc/settings
|
||||
|
||||
# Let's just allow writing to these directories during Qt emerge
|
||||
# as it makes Qt much happier.
|
||||
addwrite "${QTBASE}/etc/settings"
|
||||
addwrite "${HOME}/.qt"
|
||||
|
||||
[ "$(get_libdir)" != "lib" ] && myconf="${myconf} -L/usr/$(get_libdir)"
|
||||
|
||||
# unixODBC support is now a PDEPEND on dev-db/qt-unixODBC; see bug 14178.
|
||||
use nas && myconf+=" -system-nas-sound"
|
||||
use nis && myconf+=" -nis" || myconf+=" -no-nis"
|
||||
use mysql && myconf+=" -plugin-sql-mysql -I/usr/include/mysql -L/usr/$(get_libdir)/mysql" || myconf+=" -no-sql-mysql"
|
||||
use postgres && myconf+=" -plugin-sql-psql -I/usr/include/postgresql/server -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server" || myconf+=" -no-sql-psql"
|
||||
use firebird && myconf+=" -plugin-sql-ibase -I/opt/firebird/include" || myconf+=" -no-sql-ibase"
|
||||
use sqlite && myconf+=" -plugin-sql-sqlite" || myconf+=" -no-sql-sqlite"
|
||||
use cups && myconf+=" -cups" || myconf+=" -no-cups"
|
||||
use opengl && myconf+=" -enable-module=opengl" || myconf+=" -disable-opengl"
|
||||
use debug && myconf+=" -debug" || myconf+=" -release -no-g++-exceptions"
|
||||
use xinerama && myconf+=" -xinerama" || myconf+=" -no-xinerama"
|
||||
|
||||
myconf="${myconf} -system-zlib -qt-gif"
|
||||
|
||||
use ipv6 && myconf+=" -ipv6" || myconf+=" -no-ipv6"
|
||||
use immqt-bc && myconf+=" -inputmethod"
|
||||
use immqt && myconf+=" -inputmethod -inputmethod-ext"
|
||||
|
||||
export YACC='byacc -d'
|
||||
tc-export CC CXX
|
||||
export LINK="$(tc-getCXX)"
|
||||
|
||||
./configure -sm -thread -stl -system-libjpeg -verbose -largefile \
|
||||
-qt-imgfmt-{jpeg,mng,png} -tablet -system-libmng \
|
||||
-system-libpng -xft -platform ${PLATFORM} -xplatform \
|
||||
${PLATFORM} -xrender -prefix ${QTBASE} -libdir ${QTBASE}/$(get_libdir) \
|
||||
-fast -no-sql-odbc ${myconf} -dlopen-opengl || die
|
||||
|
||||
emake src-qmake src-moc sub-src || die
|
||||
|
||||
export DYLD_LIBRARY_PATH="${S}/lib:/usr/X11R6/lib:${DYLD_LIBRARY_PATH}"
|
||||
export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
|
||||
|
||||
emake sub-tools || die
|
||||
|
||||
if use examples; then
|
||||
emake sub-tutorial sub-examples || die
|
||||
fi
|
||||
|
||||
# Make the msg2qm utility (not made by default)
|
||||
cd "${S}"/tools/msg2qm
|
||||
../../bin/qmake
|
||||
emake
|
||||
|
||||
# Make the qembed utility (not made by default)
|
||||
cd "${S}"/tools/qembed
|
||||
../../bin/qmake
|
||||
emake
|
||||
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# binaries
|
||||
into ${QTBASE}
|
||||
dobin bin/*
|
||||
dobin tools/msg2qm/msg2qm
|
||||
dobin tools/qembed/qembed
|
||||
|
||||
# libraries
|
||||
dolib.so lib/lib{editor,qassistantclient,designercore}.a
|
||||
dolib.so lib/libqt-mt.la
|
||||
dolib.so lib/libqt-mt.so.${PV/b} lib/libqui.so.1.0.0
|
||||
cd "${D}"/${QTBASE}/$(get_libdir)
|
||||
|
||||
for x in libqui.so ; do
|
||||
ln -s $x.1.0.0 $x.1.0
|
||||
ln -s $x.1.0 $x.1
|
||||
ln -s $x.1 $x
|
||||
done
|
||||
|
||||
# version symlinks - 3.3.5->3.3->3->.so
|
||||
ln -s libqt-mt.so.${PV/b} libqt-mt.so.3.3
|
||||
ln -s libqt-mt.so.3.3 libqt-mt.so.3
|
||||
ln -s libqt-mt.so.3 libqt-mt.so
|
||||
|
||||
# libqt -> libqt-mt symlinks
|
||||
ln -s libqt-mt.so.${PV/b} libqt.so.${PV/b}
|
||||
ln -s libqt-mt.so.3.3 libqt.so.3.3
|
||||
ln -s libqt-mt.so.3 libqt.so.3
|
||||
ln -s libqt-mt.so libqt.so
|
||||
|
||||
# plugins
|
||||
cd "${S}"
|
||||
local plugins=$(find plugins -name "lib*.so" -print)
|
||||
for x in ${plugins}; do
|
||||
exeinto ${QTBASE}/$(dirname ${x})
|
||||
doexe ${x}
|
||||
done
|
||||
|
||||
# Past this point just needs to be done once
|
||||
is_final_abi || return 0
|
||||
|
||||
# includes
|
||||
cd "${S}"
|
||||
dodir ${QTBASE}/include/private
|
||||
cp include/*\.h "${D}"/${QTBASE}/include/
|
||||
cp include/private/*\.h "${D}"/${QTBASE}/include/private/
|
||||
|
||||
# prl files
|
||||
sed -i -e "s:${S}:${QTBASE}:g" "${S}"/lib/*.prl
|
||||
insinto ${QTBASE}/$(get_libdir)
|
||||
doins "${S}"/lib/*.prl
|
||||
|
||||
# pkg-config file
|
||||
insinto /usr/$(get_libdir)/pkgconfig
|
||||
doins "${S}"/lib/*.pc
|
||||
|
||||
# List all the multilib libdirs
|
||||
local libdirs
|
||||
for alibdir in $(get_all_libdirs); do
|
||||
libdirs="${libdirs}:${QTBASE}/${alibdir}"
|
||||
done
|
||||
|
||||
# environment variables
|
||||
cat <<EOF > "${T}"/45qt3
|
||||
PATH=${QTBASE}/bin
|
||||
ROOTPATH=${QTBASE}/bin
|
||||
LDPATH=${libdirs:1}
|
||||
QMAKESPEC=${PLATFORM}
|
||||
MANPATH=${QTBASE}/doc/man
|
||||
EOF
|
||||
|
||||
cat <<EOF > "${T}"/50qtdir3
|
||||
QTDIR=${QTBASE}
|
||||
EOF
|
||||
|
||||
cat <<EOF > "${T}"/50-qt3-revdep
|
||||
SEARCH_DIRS="${QTBASE}"
|
||||
EOF
|
||||
|
||||
insinto /etc/revdep-rebuild
|
||||
doins "${T}"/50-qt3-revdep
|
||||
|
||||
doenvd "${T}"/45qt3 "${T}"/50qtdir3
|
||||
|
||||
if [ "${SYMLINK_LIB}" = "yes" ]; then
|
||||
dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) ${QTBASE}/lib
|
||||
fi
|
||||
|
||||
insinto ${QTBASE}/tools/designer
|
||||
doins -r tools/designer/templates
|
||||
|
||||
insinto ${QTBASE}
|
||||
doins -r translations
|
||||
|
||||
keepdir ${QTBASE}/etc/settings
|
||||
|
||||
if use doc; then
|
||||
insinto ${QTBASE}
|
||||
doins -r "${S}"/doc
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
find "${S}"/examples "${S}"/tutorial -name Makefile | \
|
||||
xargs sed -i -e "s:${S}:${QTBASE}:g"
|
||||
|
||||
cp -r "${S}"/examples "${D}"${QTBASE}/
|
||||
cp -r "${S}"/tutorial "${D}"${QTBASE}/
|
||||
fi
|
||||
|
||||
# misc build reqs
|
||||
insinto ${QTBASE}/mkspecs
|
||||
doins -r "${S}"/mkspecs/${PLATFORM}
|
||||
|
||||
sed -e "s:${S}:${QTBASE}:g" \
|
||||
"${S}"/.qmake.cache > "${D}"${QTBASE}/.qmake.cache
|
||||
|
||||
dodoc FAQ README README-QT.TXT changes*
|
||||
if use immqt || use immqt-bc ; then
|
||||
dodoc "${S}"/README.immodule
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
elog "After a rebuild of Qt, it can happen that Qt plugins (such as Qt/KDE styles,"
|
||||
elog "or widgets for the Qt designer) are no longer recognized. If this situation"
|
||||
elog "occurs you should recompile the packages providing these plugins,"
|
||||
elog "and you should also make sure that Qt and its plugins were compiled with the"
|
||||
elog "same version of GCC. Packages that may need to be rebuilt are, for instance,"
|
||||
elog "kde-base/kdelibs, kde-base/kdeartwork and kde-base/kdeartwork-styles."
|
||||
elog "See http://doc.trolltech.com/3.3/plugins-howto.html for more infos."
|
||||
echo
|
||||
}
|
Loading…
Reference in New Issue
Block a user