Compare commits

...

6 Commits
master ... f13

Author SHA1 Message Date
Dan Horák 12977afd75 update patches 2011-04-14 11:47:48 +02:00
Dan Horák 9b2a0d94df updated to 2.8.12
Conflicts:

	wxGTK.spec
2011-04-14 11:47:34 +02:00
Dan Horák f2ed533773 - added fix for crashes during DnD (#626012)
- bakefiles are included in devel subpackage (#626314)

Conflicts:

	wxGTK.spec
2010-11-29 16:42:43 +01:00
Fedora Release Engineering 5b7f015382 dist-git conversion 2010-07-29 15:28:21 +00:00
Dan Horák afc48d620b - updated to 2.8.11 2010-04-26 09:22:52 +00:00
Jesse Keating 8e53a8710e Initialize branch F-13 for wxGTK 2010-02-17 03:28:10 +00:00
11 changed files with 43 additions and 256 deletions

View File

@ -1 +0,0 @@
wxGTK-2.8.10.tar.bz2

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
wxGTK-2.8.11.tar.bz2
/wxGTK-2.8.12.tar.bz2

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: wxGTK
# $Id$
NAME := wxGTK
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -1 +1 @@
88b867bc118a183af56efc67014bdf27 wxGTK-2.8.10.tar.bz2
08f81ab60647308058f6ce99712b14f8 wxGTK-2.8.12.tar.bz2

View File

@ -1,75 +0,0 @@
Index: src/common/imagpng.cpp
===================================================================
--- src/common/imagpng.cpp (revision 60874)
+++ src/common/imagpng.cpp (revision 60875)
@@ -568,18 +568,16 @@
if (!image->Ok())
goto error;
- lines = (unsigned char **)malloc( (size_t)(height * sizeof(unsigned char *)) );
+ // initialize all line pointers to NULL to ensure that they can be safely
+ // free()d if an error occurs before all of them could be allocated
+ lines = (unsigned char **)calloc(height, sizeof(unsigned char *));
if ( !lines )
goto error;
for (i = 0; i < height; i++)
{
if ((lines[i] = (unsigned char *)malloc( (size_t)(width * (sizeof(unsigned char) * 4)))) == NULL)
- {
- for ( unsigned int n = 0; n < i; n++ )
- free( lines[n] );
goto error;
- }
}
png_read_image( png_ptr, lines );
Index: src/common/imagtiff.cpp
===================================================================
--- src/common/imagtiff.cpp (revision 60875)
+++ src/common/imagtiff.cpp (revision 60876)
@@ -261,7 +261,6 @@
}
uint32 w, h;
- uint32 npixels;
uint32 *raster;
TIFFGetField( tif, TIFFTAG_IMAGEWIDTH, &w );
@@ -275,10 +274,21 @@
(samplesInfo[0] == EXTRASAMPLE_ASSOCALPHA ||
samplesInfo[0] == EXTRASAMPLE_UNASSALPHA));
- npixels = w * h;
+ // guard against integer overflow during multiplication which could result
+ // in allocating a too small buffer and then overflowing it
+ const double bytesNeeded = w * h * sizeof(uint32);
+ if ( bytesNeeded >= 4294967295U /* UINT32_MAX */ )
+ {
+ if ( verbose )
+ wxLogError( _("TIFF: Image size is abnormally big.") );
- raster = (uint32*) _TIFFmalloc( npixels * sizeof(uint32) );
+ TIFFClose(tif);
+ return false;
+ }
+
+ raster = (uint32*) _TIFFmalloc( bytesNeeded );
+
if (!raster)
{
if (verbose)
Index: src/common/imagtiff.cpp
===================================================================
--- src/common/imagtiff.cpp (revision 60896)
+++ src/common/imagtiff.cpp (revision 60897)
@@ -276,7 +276,7 @@
// guard against integer overflow during multiplication which could result
// in allocating a too small buffer and then overflowing it
- const double bytesNeeded = w * h * sizeof(uint32);
+ const double bytesNeeded = (double)w * (double)h * sizeof(uint32);
if ( bytesNeeded >= 4294967295U /* UINT32_MAX */ )
{
if ( verbose )

View File

@ -1,19 +0,0 @@
Index: 2.8/src/gtk/gsockgtk.cpp
===================================================================
--- 2.8/src/gtk/gsockgtk.cpp (revision 60599)
+++ 2.8/src/gtk/gsockgtk.cpp (working copy)
@@ -15,8 +15,13 @@
#include <stdlib.h>
#include <stdio.h>
+// newer versions of glib define its own GSocket but we unfortunately use this
+// name in our own (semi-)public header and so can't change it -- rename glib
+// one instead
+#define GSocket GlibGSocket
#include <gdk/gdk.h>
#include <glib.h>
+#undef GSocket
#include "wx/gsocket.h"
#include "wx/unix/gsockunx.h"

View File

@ -1,20 +0,0 @@
Index: src/html/m_tables.cpp
===================================================================
--- src/html/m_tables.cpp (revision 59686)
+++ src/html/m_tables.cpp (revision 59687)
@@ -684,6 +684,7 @@
{
wxHtmlTableCell *oldt = m_Table;
+ wxHtmlContainerCell *oldEnclosing = m_enclosingContainer;
m_enclosingContainer = c = m_WParser->OpenContainer();
m_Table = new wxHtmlTableCell(c, tag, m_WParser->GetPixelScale());
@@ -722,6 +723,7 @@
m_WParser->CloseContainer();
m_Table = oldt;
+ m_enclosingContainer = oldEnclosing;
return true; // ParseInner() called
}

View File

@ -1,55 +0,0 @@
Index: src/gtk/frame.cpp
===================================================================
--- src/gtk/frame.cpp (revision 62486)
+++ src/gtk/frame.cpp (revision 62487)
@@ -78,6 +78,30 @@
}
}
+//-----------------------------------------------------------------------------
+// "size-request" from menubar
+//-----------------------------------------------------------------------------
+
+extern "C" {
+static void menubar_size_request(GtkWidget* widget, GtkRequisition*, wxFrame* win)
+{
+ g_signal_handlers_disconnect_by_func(
+ widget, (void*)menubar_size_request, win);
+ win->UpdateMenuBarSize();
+}
+}
+
+//-----------------------------------------------------------------------------
+// "style-set" from menubar
+//-----------------------------------------------------------------------------
+
+extern "C" {
+static void menubar_style_set(GtkWidget* widget, GtkStyle*, wxFrame* win)
+{
+ g_signal_connect(widget, "size-request",
+ G_CALLBACK(menubar_size_request), win);
+}
+}
#endif // wxUSE_MENUS_NATIVE
#if wxUSE_TOOLBAR
@@ -571,6 +595,9 @@
if ( m_frameMenuBar )
{
+ g_signal_handlers_disconnect_by_func(
+ m_frameMenuBar->m_widget, (void*)menubar_style_set, this);
+
m_frameMenuBar->UnsetInvokingWindow( this );
if (m_frameMenuBar->GetWindowStyle() & wxMB_DOCKABLE)
@@ -621,6 +648,9 @@
gtk_widget_show( m_frameMenuBar->m_widget );
UpdateMenuBarSize();
+
+ g_signal_connect(menuBar->m_widget, "style-set",
+ G_CALLBACK(menubar_style_set), this);
}
else
{

View File

@ -1,39 +0,0 @@
Index: src/gtk/app.cpp
===================================================================
--- src/gtk/app.cpp (revision 62396)
+++ src/gtk/app.cpp (revision 62397)
@@ -149,9 +149,11 @@
// One-shot emission hook for "event" signal, to install idle handler.
// This will be called when the "event" signal is issued on any GtkWidget object.
static gboolean
-event_emission_hook(GSignalInvocationHint*, guint, const GValue*, gpointer)
+event_emission_hook(GSignalInvocationHint*, guint, const GValue*, gpointer data)
{
wxapp_install_idle_handler();
+ bool* hook_installed = (bool*)data;
+ *hook_installed = false;
// remove hook
return false;
}
@@ -159,12 +161,17 @@
// add emission hook for "event" signal, to re-install idle handler when needed
static inline void wxAddEmissionHook()
{
+ static bool hook_installed;
GType widgetType = GTK_TYPE_WIDGET;
- // if GtkWidget type is loaded
- if (g_type_class_peek(widgetType) != NULL)
+ // if hook not installed and GtkWidget type is loaded
+ if (!hook_installed && g_type_class_peek(widgetType))
{
- guint sig_id = g_signal_lookup("event", widgetType);
- g_signal_add_emission_hook(sig_id, 0, event_emission_hook, NULL, NULL);
+ static guint sig_id;
+ if (sig_id == 0)
+ sig_id = g_signal_lookup("event", widgetType);
+ hook_installed = true;
+ g_signal_add_emission_hook(
+ sig_id, 0, event_emission_hook, &hook_installed, NULL);
}
}

18
wxGTK-2.8.12-test.patch Normal file
View File

@ -0,0 +1,18 @@
--- wxGTK-2.8.12.orig/tests/test.cpp 2011-03-22 13:18:05.000000000 +0100
+++ wxGTK-2.8.12/tests/test.cpp 2011-04-14 10:35:44.000000000 +0200
@@ -86,11 +86,11 @@ void TestApp::OnInitCmdLine(wxCmdLinePar
{ wxCMD_LINE_SWITCH, _T("L"), _T("longlist"),
_T("list the test cases, do not run them"),
wxCMD_LINE_VAL_NONE, 0 },
- { wxCMD_LINE_SWITCH, "d", "detail",
- "print the test case names, run them (not implemented)",
+ { wxCMD_LINE_SWITCH, _T("d"), _T("detail"),
+ _T("print the test case names, run them (not implemented)"),
wxCMD_LINE_VAL_NONE, 0 },
- { wxCMD_LINE_SWITCH, "t", "timing",
- "print names and mesure running time of individual test, run them (not implemented)",
+ { wxCMD_LINE_SWITCH, _T("t"), _T("timing"),
+ _T("print names and mesure running time of individual test, run them (not implemented)"),
wxCMD_LINE_VAL_NONE, 0 },
{ wxCMD_LINE_PARAM, 0, 0, _T("REGISTRY"), wxCMD_LINE_VAL_STRING,
wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE },

View File

@ -1,23 +1,13 @@
Name: wxGTK
Version: 2.8.10
Release: 9%{?dist}
Version: 2.8.12
Release: 1%{?dist}
Summary: GTK2 port of the wxWidgets GUI library
License: wxWidgets
Group: System Environment/Libraries
URL: http://www.wxwidgets.org/
Source0: http://downloads.sourceforge.net/wxwindows/%{name}-%{version}.tar.bz2
Source1: wx-config
# http://trac.wxwidgets.org/ticket/10883
Patch0: %{name}-2.8.10-gsocket.patch
# http://trac.wxwidgets.org/ticket/10993 (#511279)
Patch1: %{name}-2.8.10-CVE-2009-2369.patch
# http://trac.wxwidgets.org/ticket/11315 (#494425)
Patch2: %{name}-2.8.10-wxTimer-fix.patch
# http://trac.wxwidgets.org/ticket/11310 (#528376)
Patch3: %{name}-2.8.10-menubar-height.patch
# http://trac.wxwidgets.org/ticket/10370 (#534030)
Patch4: %{name}-2.8.10-htmltable.patch
Patch0: %{name}-2.8.12-test.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -29,6 +19,7 @@ BuildRequires: libSM-devel
BuildRequires: gstreamer-devel >= 0.10, gstreamer-plugins-base-devel >= 0.10
BuildRequires: GConf2-devel
BuildRequires: autoconf, gettext
BuildRequires: cppunit-devel
Requires: wxBase = %{version}-%{release}
@ -48,6 +39,7 @@ Requires: %{name}-media = %{version}-%{release}
Requires: wxBase = %{version}-%{release}
Requires: gtk2-devel
Requires: libGL-devel, libGLU-devel
Requires: bakefile
%description devel
This package include files needed to link with the wxGTK2 library.
@ -85,11 +77,7 @@ libraries or the X Window System.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .gsocket
%patch1 -p0 -b .CVE-2009-2369
%patch2 -p0 -b .wxTimer-fix
%patch3 -p0 -b .menubar-height
%patch4 -p0 -b .htmltable
%patch0 -p1 -b .test
sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure
@ -103,10 +91,6 @@ chmod a-x src/common/msgout.cpp
%build
# must do this to regenerate ./configure if patching to a cvs
# version.
#autoconf
export GDK_USE_XFT=1
# this code dereferences type-punned pointers like there's no tomorrow.
@ -159,9 +143,6 @@ rm -rf $RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{_bindir}/wx-config
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/wx-config
# we don't support bakefiles
rm -rf $RPM_BUILD_ROOT%{_datadir}/bakefile
%find_lang wxstd
%find_lang wxmsw
cat wxmsw.lang >> wxstd.lang
@ -169,6 +150,11 @@ cat wxmsw.lang >> wxstd.lang
%clean
rm -rf $RPM_BUILD_ROOT
%check
pushd tests
make test
popd
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@ -212,6 +198,7 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_libdir}/wx/config
%{_libdir}/wx/config/gtk2*
%{_datadir}/aclocal/*
%{_datadir}/bakefile/presets/*
%files gl
%defattr(-,root,root,-)
@ -231,6 +218,16 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Apr 14 2011 Dan Horák <dan[at]danny.cz> - 2.8.12-1
- updated to 2.8.12
* Mon Nov 29 2010 Dan Horák <dan[at]danny.cz> - 2.8.11-2
- added fix for crashes during DnD (#626012)
- bakefiles are included in devel subpackage (#626314)
* Thu Apr 15 2010 Dan Horák <dan[at]danny.cz> - 2.8.11-1
- updated to 2.8.11
* Wed Nov 25 2009 Dan Horák <dan[at]danny.cz> - 2.8.10-9
- updated the wrapper script (#541087)