summaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorDavide Pesavento <pesa@gentoo.org>2014-07-07 20:03:53 +0000
committerDavide Pesavento <pesa@gentoo.org>2014-07-07 20:03:53 +0000
commit0dbeefb42b58aa28a51f43ac7172bd03a7a95bb6 (patch)
tree4d0b9600dca66ce9e2e0da4caa2b33267206e90a /dev-qt
parentImprove dependencies (diff)
downloadgentoo-2-0dbeefb42b58aa28a51f43ac7172bd03a7a95bb6.tar.gz
gentoo-2-0dbeefb42b58aa28a51f43ac7172bd03a7a95bb6.tar.bz2
gentoo-2-0dbeefb42b58aa28a51f43ac7172bd03a7a95bb6.zip
Add fixes for libreoffice, bug 514968.
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xDADED6B2671CB57D!)
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qtcore/ChangeLog11
-rw-r--r--dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch81
-rw-r--r--dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch (renamed from dev-qt/qtcore/files/moc-boost-lexical-cast.patch)0
-rw-r--r--dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch94
-rw-r--r--dev-qt/qtcore/qtcore-4.8.5-r1.ebuild4
-rw-r--r--dev-qt/qtcore/qtcore-4.8.5-r2.ebuild177
6 files changed, 364 insertions, 3 deletions
diff --git a/dev-qt/qtcore/ChangeLog b/dev-qt/qtcore/ChangeLog
index 4685f4d6d898..0dcd3ba4d586 100644
--- a/dev-qt/qtcore/ChangeLog
+++ b/dev-qt/qtcore/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-qt/qtcore
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-qt/qtcore/ChangeLog,v 1.44 2014/04/23 10:29:02 zlogene Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-qt/qtcore/ChangeLog,v 1.45 2014/07/07 20:03:53 pesa Exp $
+
+*qtcore-4.8.5-r2 (07 Jul 2014)
+
+ 07 Jul 2014; Davide Pesavento <pesa@gentoo.org>
+ +files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch,
+ +files/qtcore-4.8.5-moc-boost-lexical-cast.patch,
+ +files/qtcore-4.8.5-qeventdispatcher-recursive.patch, +qtcore-4.8.5-r2.ebuild,
+ -files/moc-boost-lexical-cast.patch, qtcore-4.8.5-r1.ebuild:
+ Add fixes for libreoffice, bug 514968.
23 Apr 2014; Mikle Kolyada <zlogene@gentoo.org> -qtcore-5.2.1.ebuild:
Drop qt5 ebuild.
diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch b/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch
new file mode 100644
index 000000000000..0fcc1fa6561d
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch
@@ -0,0 +1,81 @@
+From 267feb2de49eed0823ca0c29f1cd5238537c7116 Mon Sep 17 00:00:00 2001
+From: Jan-Marek Glogowski <glogow@fbihome.de>
+Date: Thu, 6 Mar 2014 18:44:43 +0100
+Subject: Honor ExcludeSocketNotifiers in glib event loop
+
+Implements QEventLoop::ExcludeSocketNotifiers in the same way
+QEventLoop::X11ExcludeTimers is already implemented for the glib
+event loop.
+
+This prevents crashes when QClipboard checks for clipboard events
+and
+ qApp->clipboard()->setProperty( "useEventLoopWhenWaiting", true );
+is set.
+
+Task-number: QTBUG-34614
+Task-number: QTBUG-37380
+
+Change-Id: Id4e2a74c6bdf8c3b439a4e3813d24d11368b607d
+---
+ src/corelib/kernel/qeventdispatcher_glib.cpp | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
+index 0b0e308..ba522fa 100644
+--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
++++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
+@@ -65,6 +65,7 @@ struct GPollFDWithQSocketNotifier
+ struct GSocketNotifierSource
+ {
+ GSource source;
++ QEventLoop::ProcessEventsFlags processEventsFlags;
+ QList<GPollFDWithQSocketNotifier *> pollfds;
+ };
+
+@@ -80,6 +81,9 @@ static gboolean socketNotifierSourceCheck(GSource *source)
+ GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
+
+ bool pending = false;
++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)
++ return pending;
++
+ for (int i = 0; !pending && i < src->pollfds.count(); ++i) {
+ GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
+
+@@ -103,6 +107,9 @@ static gboolean socketNotifierSourceDispatch(GSource *source, GSourceFunc, gpoin
+ QEvent event(QEvent::SockAct);
+
+ GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)
++ return true;
++
+ for (int i = 0; i < src->pollfds.count(); ++i) {
+ GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
+
+@@ -331,6 +338,7 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
+ reinterpret_cast<GSocketNotifierSource *>(g_source_new(&socketNotifierSourceFuncs,
+ sizeof(GSocketNotifierSource)));
+ (void) new (&socketNotifierSource->pollfds) QList<GPollFDWithQSocketNotifier *>();
++ socketNotifierSource->processEventsFlags = QEventLoop::AllEvents;
+ g_source_set_can_recurse(&socketNotifierSource->source, true);
+ g_source_attach(&socketNotifierSource->source, mainContext);
+
+@@ -416,6 +424,7 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
+ // tell postEventSourcePrepare() and timerSource about any new flags
+ QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
+ d->timerSource->processEventsFlags = flags;
++ d->socketNotifierSource->processEventsFlags = flags;
+
+ if (!(flags & QEventLoop::EventLoopExec)) {
+ // force timers to be sent at normal priority
+@@ -427,6 +436,7 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
+ result = g_main_context_iteration(d->mainContext, canWait);
+
+ d->timerSource->processEventsFlags = savedFlags;
++ d->socketNotifierSource->processEventsFlags = savedFlags;
+
+ if (canWait)
+ emit awake();
+--
+2.0.0
+
diff --git a/dev-qt/qtcore/files/moc-boost-lexical-cast.patch b/dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch
index b464c926b0e1..b464c926b0e1 100644
--- a/dev-qt/qtcore/files/moc-boost-lexical-cast.patch
+++ b/dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch
diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch b/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch
new file mode 100644
index 000000000000..6d3bf2f2cde2
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch
@@ -0,0 +1,94 @@
+--- src/corelib/kernel/qeventdispatcher_glib.cpp.sav 2014-03-28 15:26:37.000000000 +0100
++++ src/corelib/kernel/qeventdispatcher_glib.cpp 2014-04-24 09:44:09.358659204 +0200
+@@ -255,22 +255,30 @@ struct GPostEventSource
+ GSource source;
+ QAtomicInt serialNumber;
+ int lastSerialNumber;
++ QEventLoop::ProcessEventsFlags processEventsFlags;
+ QEventDispatcherGlibPrivate *d;
+ };
+
+ static gboolean postEventSourcePrepare(GSource *s, gint *timeout)
+ {
++ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ QThreadData *data = QThreadData::current();
+ if (!data)
+ return false;
+
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((source->processEventsFlags & excludeAllFlags) == excludeAllFlags)
++ return false;
++
+ gint dummy;
+ if (!timeout)
+ timeout = &dummy;
+ const bool canWait = data->canWaitLocked();
+ *timeout = canWait ? -1 : 0;
+
+- GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ return (!canWait
+ || (source->serialNumber != source->lastSerialNumber));
+ }
+@@ -284,8 +292,14 @@ static gboolean postEventSourceDispatch(
+ {
+ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ source->lastSerialNumber = source->serialNumber;
+- QCoreApplication::sendPostedEvents();
+- source->d->runTimersOnceWithNormalPriority();
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((source->processEventsFlags & excludeAllFlags) != excludeAllFlags) {
++ QCoreApplication::sendPostedEvents();
++ source->d->runTimersOnceWithNormalPriority();
++ }
+ return true; // i dunno, george...
+ }
+
+@@ -329,6 +343,7 @@ QEventDispatcherGlibPrivate::QEventDispa
+ postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs,
+ sizeof(GPostEventSource)));
+ postEventSource->serialNumber = 1;
++ postEventSource->processEventsFlags = QEventLoop::AllEvents;
+ postEventSource->d = this;
+ g_source_set_can_recurse(&postEventSource->source, true);
+ g_source_attach(&postEventSource->source, mainContext);
+@@ -423,6 +438,7 @@ bool QEventDispatcherGlib::processEvents
+
+ // tell postEventSourcePrepare() and timerSource about any new flags
+ QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
++ d->postEventSource->processEventsFlags = flags;
+ d->timerSource->processEventsFlags = flags;
+ d->socketNotifierSource->processEventsFlags = flags;
+
+@@ -435,6 +451,7 @@ bool QEventDispatcherGlib::processEvents
+ while (!result && canWait)
+ result = g_main_context_iteration(d->mainContext, canWait);
+
++ d->postEventSource->processEventsFlags = savedFlags;
+ d->timerSource->processEventsFlags = savedFlags;
+ d->socketNotifierSource->processEventsFlags = savedFlags;
+
+--- src/corelib/kernel/qeventdispatcher_unix.cpp.sav 2013-06-07 07:16:52.000000000 +0200
++++ src/corelib/kernel/qeventdispatcher_unix.cpp 2014-04-24 09:43:06.927589535 +0200
+@@ -905,7 +905,15 @@ bool QEventDispatcherUNIX::processEvents
+
+ // we are awake, broadcast it
+ emit awake();
+- QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
++
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((flags & excludeAllFlags) == excludeAllFlags)
++ return false;
++ if(( flags & excludeAllFlags ) != excludeAllFlags )
++ QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
+
+ int nevents = 0;
+ const bool canWait = (d->threadData->canWaitLocked()
diff --git a/dev-qt/qtcore/qtcore-4.8.5-r1.ebuild b/dev-qt/qtcore/qtcore-4.8.5-r1.ebuild
index 7ff6b61d19d4..a1400fd2d43e 100644
--- a/dev-qt/qtcore/qtcore-4.8.5-r1.ebuild
+++ b/dev-qt/qtcore/qtcore-4.8.5-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-qt/qtcore/qtcore-4.8.5-r1.ebuild,v 1.10 2014/01/26 11:55:45 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-qt/qtcore/qtcore-4.8.5-r1.ebuild,v 1.11 2014/07/07 20:03:53 pesa Exp $
EAPI=5
@@ -28,7 +28,7 @@ PDEPEND="
"
PATCHES=(
- "${FILESDIR}/moc-boost-lexical-cast.patch"
+ "${FILESDIR}/${PN}-4.8.5-moc-boost-lexical-cast.patch"
"${FILESDIR}/CVE-2013-4549-01-disallow-deep-or-widely-nested-entity-refs.patch"
"${FILESDIR}/CVE-2013-4549-02-fully-expand-entities.patch"
)
diff --git a/dev-qt/qtcore/qtcore-4.8.5-r2.ebuild b/dev-qt/qtcore/qtcore-4.8.5-r2.ebuild
new file mode 100644
index 000000000000..f6eb256f7f2a
--- /dev/null
+++ b/dev-qt/qtcore/qtcore-4.8.5-r2.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-qt/qtcore/qtcore-4.8.5-r2.ebuild,v 1.1 2014/07/07 20:03:53 pesa Exp $
+
+EAPI=5
+
+inherit qt4-build
+
+DESCRIPTION="Cross-platform application development framework"
+SLOT="4"
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+IUSE="+glib iconv icu qt3support ssl"
+
+DEPEND="
+ sys-libs/zlib
+ glib? ( dev-libs/glib:2 )
+ icu? ( >=dev-libs/icu-49:= )
+ ssl? ( dev-libs/openssl )
+ !<x11-libs/cairo-1.10.2-r2
+"
+RDEPEND="${DEPEND}"
+PDEPEND="
+ qt3support? ( ~dev-qt/qtgui-${PV}[aqua=,debug=,glib=,qt3support] )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.5-moc-boost-lexical-cast.patch"
+ "${FILESDIR}/${PN}-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch" # bug 514968
+ "${FILESDIR}/${PN}-4.8.5-qeventdispatcher-recursive.patch" # bug 514968
+ "${FILESDIR}/CVE-2013-4549-01-disallow-deep-or-widely-nested-entity-refs.patch"
+ "${FILESDIR}/CVE-2013-4549-02-fully-expand-entities.patch"
+)
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ src/tools/bootstrap
+ src/tools/moc
+ src/tools/rcc
+ src/tools/uic
+ src/corelib
+ src/xml
+ src/network
+ src/plugins/codecs
+ tools/linguist/lconvert
+ tools/linguist/lrelease
+ tools/linguist/lupdate"
+
+ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
+ include
+ src/plugins/plugins.pro
+ src/plugins/qpluginbase.pri
+ src/src.pro
+ src/3rdparty/des
+ src/3rdparty/harfbuzz
+ src/3rdparty/md4
+ src/3rdparty/md5
+ src/3rdparty/sha1
+ src/3rdparty/easing
+ src/3rdparty/zlib_dependency.pri
+ src/declarative
+ src/gui
+ src/script
+ tools/shared
+ tools/linguist/shared
+ translations"
+
+ qt4-build_pkg_setup
+}
+
+src_prepare() {
+ # Don't pre-strip, bug 235026
+ for i in kr jp cn tw; do
+ echo "CONFIG+=nostrip" >> "${S}"/src/plugins/codecs/${i}/${i}.pro
+ done
+
+ qt4-build_src_prepare
+
+ # bug 172219
+ sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
+ "${S}/qmake/Makefile.unix" || die "sed qmake/Makefile.unix CXXFLAGS failed"
+ sed -i -e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
+ "${S}/qmake/Makefile.unix" || die "sed qmake/Makefile.unix LDFLAGS failed"
+
+ # bug 427782
+ sed -i -e "/^CPPFLAGS/s/-g//" \
+ "${S}/qmake/Makefile.unix" || die "sed qmake/Makefile.unix CPPFLAGS failed"
+ sed -i -e "s/setBootstrapVariable QMAKE_CFLAGS_RELEASE/QMakeVar set QMAKE_CFLAGS_RELEASE/" \
+ -e "s/setBootstrapVariable QMAKE_CXXFLAGS_RELEASE/QMakeVar set QMAKE_CXXFLAGS_RELEASE/" \
+ "${S}/configure" || die "sed configure setBootstrapVariable failed"
+}
+
+src_configure() {
+ myconf+="
+ -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon
+ -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg
+ -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl -no-openvg
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
+ $(qt_use glib)
+ $(qt_use iconv)
+ $(qt_use icu)
+ $(use ssl && echo -openssl-linked || echo -no-openssl)
+ $(qt_use qt3support)"
+
+ qt4-build_src_configure
+}
+
+src_install() {
+ dobin bin/{qmake,moc,rcc,uic,lconvert,lrelease,lupdate}
+
+ install_directories src/{corelib,xml,network,plugins/codecs}
+
+ emake INSTALL_ROOT="${D}" install_mkspecs
+
+ # install private headers
+ insinto "${QTHEADERDIR#${EPREFIX}}"/QtCore/private
+ find "${S}"/src/corelib -type f -name "*_p.h" -exec doins {} +
+
+ # use freshly built libraries
+ local DYLD_FPATH=
+ [[ -d "${S}"/lib/QtCore.framework ]] \
+ && DYLD_FPATH=$(for x in "${S}"/lib/*.framework; do echo -n ":$x"; done)
+ DYLD_LIBRARY_PATH="${S}/lib${DYLD_FPATH}" \
+ LD_LIBRARY_PATH="${S}/lib" \
+ "${S}"/bin/lrelease translations/*.ts \
+ || die "generating translations failed"
+ insinto "${QTTRANSDIR#${EPREFIX}}"
+ doins translations/*.qm
+
+ setqtenv
+ fix_library_files
+
+ # List all the multilib libdirs
+ local libdirs=
+ for libdir in $(get_all_libdirs); do
+ libdirs+=":${EPREFIX}/usr/${libdir}/qt4"
+ done
+
+ cat <<-EOF > "${T}"/44qt4
+ LDPATH="${libdirs:1}"
+ EOF
+ doenvd "${T}"/44qt4
+
+ dodir "${QTDATADIR#${EPREFIX}}"/mkspecs/gentoo
+ mv "${D}/${QTDATADIR}"/mkspecs/qconfig.pri "${D}${QTDATADIR}"/mkspecs/gentoo \
+ || die "failed to move qconfig.pri"
+
+ # Framework hacking
+ if use aqua && [[ ${CHOST#*-darwin} -ge 9 ]]; then
+ # TODO: do this better
+ sed -i -e '2a#include <QtCore/Gentoo/gentoo-qconfig.h>\n' \
+ "${D}${QTLIBDIR}"/QtCore.framework/Headers/qconfig.h \
+ || die "sed for qconfig.h failed."
+ dosym "${QTHEADERDIR#${EPREFIX}}"/Gentoo "${QTLIBDIR#${EPREFIX}}"/QtCore.framework/Headers/Gentoo
+ else
+ sed -i -e '2a#include <Gentoo/gentoo-qconfig.h>\n' \
+ "${D}${QTHEADERDIR}"/QtCore/qconfig.h \
+ "${D}${QTHEADERDIR}"/Qt/qconfig.h \
+ || die "sed for qconfig.h failed"
+ fi
+
+ QCONFIG_DEFINE="QT_ZLIB"
+ install_qconfigs
+
+ # remove .la files
+ prune_libtool_files
+
+ keepdir "${QTSYSCONFDIR#${EPREFIX}}"
+
+ # Framework magic
+ fix_includes
+}