summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hill <dirtyepic@gentoo.org>2008-06-07 19:12:16 +0000
committerRyan Hill <dirtyepic@gentoo.org>2008-06-07 19:12:16 +0000
commit9979bfc5f457d1dd56d7f9f41da50ab9cfb2e8a2 (patch)
treecf53dbb4181cce7aeb1420d6230af64da1a66748 /x11-libs
parentamd64 stable, bug #225085 (diff)
downloadgentoo-2-9979bfc5f457d1dd56d7f9f41da50ab9cfb2e8a2.tar.gz
gentoo-2-9979bfc5f457d1dd56d7f9f41da50ab9cfb2e8a2.tar.bz2
gentoo-2-9979bfc5f457d1dd56d7f9f41da50ab9cfb2e8a2.zip
Add patch from upstream to fix race condition in wxWakeUpIdle.
(Portage version: 2.2_pre7-r1/cvs/Linux 2.6.25-gentoo-r3 Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz)
Diffstat (limited to 'x11-libs')
-rw-r--r--x11-libs/wxGTK/ChangeLog8
-rw-r--r--x11-libs/wxGTK/files/wxGTK-2.8.7-race-fix.patch109
-rw-r--r--x11-libs/wxGTK/wxGTK-2.8.7.1-r2.ebuild150
3 files changed, 266 insertions, 1 deletions
diff --git a/x11-libs/wxGTK/ChangeLog b/x11-libs/wxGTK/ChangeLog
index 7f73bd323d65..1bfd5a7d49c7 100644
--- a/x11-libs/wxGTK/ChangeLog
+++ b/x11-libs/wxGTK/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for x11-libs/wxGTK
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/wxGTK/ChangeLog,v 1.189 2008/03/17 12:27:47 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/wxGTK/ChangeLog,v 1.190 2008/06/07 19:12:16 dirtyepic Exp $
+
+*wxGTK-2.8.7.1-r2 (07 Jun 2008)
+
+ 07 Jun 2008; Ryan Hill <dirtyepic@gentoo.org>
+ +files/wxGTK-2.8.7-race-fix.patch, +wxGTK-2.8.7.1-r2.ebuild:
+ Add patch from upstream to fix race condition in wxWakeUpIdle.
17 Mar 2008; Peter Volkov <pva@gentoo.org> wxGTK-2.6.4.0-r3.ebuild,
wxGTK-2.8.7.1-r1.ebuild:
diff --git a/x11-libs/wxGTK/files/wxGTK-2.8.7-race-fix.patch b/x11-libs/wxGTK/files/wxGTK-2.8.7-race-fix.patch
new file mode 100644
index 000000000000..c58f3956d453
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-2.8.7-race-fix.patch
@@ -0,0 +1,109 @@
+--- wxWidgets/src/gtk/app.cpp 2008/03/13 02:56:21 52464
++++ wxWidgets/src/gtk/app.cpp 2008/03/13 04:37:03 52465
+@@ -174,59 +174,63 @@
+ if (!wxTheApp)
+ return false;
+
+- bool moreIdles = false;
+-
++ guint idleID_save;
++ {
++ // Allow another idle source to be added while this one is busy.
++ // Needed if an idle event handler runs a new event loop,
++ // for example by showing a dialog.
++#if wxUSE_THREADS
++ wxMutexLocker lock(gs_idleTagsMutex);
++#endif
++ idleID_save = wxTheApp->m_idleTag;
++ wxTheApp->m_idleTag = 0;
++ g_isIdle = true;
++ wxAddEmissionHook();
++ }
+ #ifdef __WXDEBUG__
+ // don't generate the idle events while the assert modal dialog is shown,
+ // this matches the behavior of wxMSW
+- if (!wxTheApp->IsInAssert())
++ if (wxTheApp->IsInAssert())
++ return false;
+ #endif // __WXDEBUG__
+- {
+- guint idleID_save;
+- {
+- // Allow another idle source to be added while this one is busy.
+- // Needed if an idle event handler runs a new event loop,
+- // for example by showing a dialog.
+-#if wxUSE_THREADS
+- wxMutexLocker lock(gs_idleTagsMutex);
+-#endif
+- idleID_save = wxTheApp->m_idleTag;
+- wxTheApp->m_idleTag = 0;
+- g_isIdle = true;
+- wxAddEmissionHook();
+- }
+
+- // When getting called from GDK's time-out handler
+- // we are no longer within GDK's grab on the GUI
+- // thread so we must lock it here ourselves.
+- gdk_threads_enter();
+-
+- // Send idle event to all who request them as long as
+- // no events have popped up in the event queue.
+- do {
+- moreIdles = wxTheApp->ProcessIdle();
+- } while (moreIdles && gtk_events_pending() == 0);
++ // When getting called from GDK's time-out handler
++ // we are no longer within GDK's grab on the GUI
++ // thread so we must lock it here ourselves.
++ gdk_threads_enter();
+
+- // Release lock again
+- gdk_threads_leave();
+-
+- {
+- // If another idle source was added, remove it
++ // Send idle event to all who request them as long as
++ // no events have popped up in the event queue.
++ bool moreIdles;
++ do {
++ moreIdles = wxTheApp->ProcessIdle();
++ } while (moreIdles && gtk_events_pending() == 0);
++
++ // Release lock again
++ gdk_threads_leave();
++
+ #if wxUSE_THREADS
+- wxMutexLocker lock(gs_idleTagsMutex);
++ wxMutexLocker lock(gs_idleTagsMutex);
+ #endif
+- if (wxTheApp->m_idleTag != 0)
+- g_source_remove(wxTheApp->m_idleTag);
+- wxTheApp->m_idleTag = idleID_save;
+- g_isIdle = false;
+- }
+- }
++ // If another idle source was added, remove it
++ if (wxTheApp->m_idleTag != 0)
++ g_source_remove(wxTheApp->m_idleTag);
++ wxTheApp->m_idleTag = idleID_save;
++ g_isIdle = false;
+
+- if (!moreIdles)
+- {
+ #if wxUSE_THREADS
+- wxMutexLocker lock(gs_idleTagsMutex);
++ if (wxPendingEventsLocker)
++ wxPendingEventsLocker->Enter();
+ #endif
++ // Pending events can be added asynchronously,
++ // need to keep idle source if any have appeared
++ moreIdles = moreIdles || (wxPendingEvents && !wxPendingEvents->IsEmpty());
++#if wxUSE_THREADS
++ if (wxPendingEventsLocker)
++ wxPendingEventsLocker->Leave();
++#endif
++ if (!moreIdles)
++ {
+ // Indicate that we are now in idle mode and event handlers
+ // will have to reinstall the idle handler again.
+ g_isIdle = true;
+
diff --git a/x11-libs/wxGTK/wxGTK-2.8.7.1-r2.ebuild b/x11-libs/wxGTK/wxGTK-2.8.7.1-r2.ebuild
new file mode 100644
index 000000000000..6282e1a6a3ef
--- /dev/null
+++ b/x11-libs/wxGTK/wxGTK-2.8.7.1-r2.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/wxGTK/wxGTK-2.8.7.1-r2.ebuild,v 1.1 2008/06/07 19:12:16 dirtyepic Exp $
+
+inherit eutils versionator flag-o-matic
+
+DESCRIPTION="GTK+ version of wxWidgets, a cross-platform C++ GUI toolkit."
+HOMEPAGE="http://wxwidgets.org/"
+
+BASE_PV="$(get_version_component_range 1-3)"
+BASE_P="${PN}-${BASE_PV}"
+
+# we use the wxPython tarballs because they include the full wxGTK sources and
+# docs, and are released more frequently than wxGTK.
+SRC_URI="mirror://sourceforge/wxpython/wxPython-src-${PV}.tar.bz2"
+
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="X doc debug gnome gstreamer odbc opengl pch sdl"
+
+RDEPEND="
+ dev-libs/expat
+ odbc? ( dev-db/unixODBC )
+ sdl? ( media-libs/libsdl )
+ X? (
+ >=x11-libs/gtk+-2.4
+ >=dev-libs/glib-2.4
+ media-libs/jpeg
+ media-libs/tiff
+ x11-libs/libSM
+ x11-libs/libXinerama
+ x11-libs/libXxf86vm
+ gnome? ( gnome-base/libgnomeprintui )
+ gstreamer? ( >=media-libs/gstreamer-0.10 )
+ opengl? ( virtual/opengl )
+ )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ X? (
+ x11-proto/xproto
+ x11-proto/xineramaproto
+ x11-proto/xf86vidmodeproto
+ )"
+
+PDEPEND=">=app-admin/eselect-wxwidgets-0.7"
+
+SLOT="2.8"
+LICENSE="wxWinLL-3
+ GPL-2
+ odbc? ( LGPL-2 )
+ doc? ( wxWinFDL-3 )"
+
+S="${WORKDIR}/wxPython-src-${PV}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-2.6.3-unicode-odbc.patch
+ epatch "${FILESDIR}"/${PN}-2.8.4-collision.patch
+ epatch "${FILESDIR}"/${PN}-2.8.6-wxrc_link_fix.patch
+ epatch "${FILESDIR}"/${PN}-2.8.7-mmedia.patch # Bug #174874
+ epatch "${FILESDIR}"/${PN}-2.8.7-race-fix.patch # https://bugzilla.redhat.com/440011
+}
+
+src_compile() {
+ local myconf
+
+ append-flags -fno-strict-aliasing
+
+ # X independent options
+ myconf="--enable-compat26
+ --enable-shared
+ --enable-unicode
+ --with-regex=builtin
+ --with-zlib=sys
+ --with-expat
+ $(use_enable debug)
+ $(use_enable pch precomp-headers)
+ $(use_with sdl)
+ $(use_with odbc)"
+
+ # wxGTK options
+ # --enable-graphics_ctx - needed for webkit, editra
+ # --without-gnomevfs - bug #203389
+
+ use X && \
+ myconf="${myconf}
+ --enable-graphics_ctx
+ --enable-gui
+ --with-libpng
+ --with-libxpm
+ --with-libjpeg
+ --with-libtiff
+ $(use_enable gstreamer mediactrl)
+ $(use_enable opengl)
+ $(use_with opengl)
+ $(use_with gnome gnomeprint)
+ --without-gnomevfs"
+
+ # wxBase options
+ use X || \
+ myconf="${myconf}
+ --disable-gui"
+
+ mkdir "${S}"/wxgtk_build
+ cd "${S}"/wxgtk_build
+
+ ECONF_SOURCE="${S}" econf ${myconf} || die "configure failed."
+
+ emake || die "make failed."
+
+ if [[ -d contrib/src ]]; then
+ cd contrib/src
+ emake || die "make contrib failed."
+ fi
+}
+
+src_install() {
+ cd "${S}"/wxgtk_build
+
+ emake DESTDIR="${D}" install || die "install failed."
+
+ if [[ -d contrib/src ]]; then
+ cd contrib/src
+ emake DESTDIR="${D}" install || die "install contrib failed."
+ fi
+
+ cd "${S}"/docs
+ dodoc changes.txt readme.txt todo30.txt
+ newdoc base/readme.txt base_readme.txt
+ newdoc gtk/readme.txt gtk_readme.txt
+
+ if use doc; then
+ dohtml -r "${S}"/docs/html/*
+ fi
+
+ # We don't want this
+ rm "${D}"usr/share/locale/it/LC_MESSAGES/wxmsw.mo
+}
+
+pkg_postinst() {
+ has_version app-admin/eselect-wxwidgets \
+ && eselect wxwidgets update
+}
+
+pkg_postrm() {
+ has_version app-admin/eselect-wxwidgets \
+ && eselect wxwidgets update
+}