From 52301ec827424c6b80ac156d1549f47ad95ccd18 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Feb 06 2006 19:39:37 +0000 Subject: fix bug #178184 (amule crashes), and also make build with gcc 4.1. --- diff --git a/wxGTK-2.6.2-gcc41stringh.patch b/wxGTK-2.6.2-gcc41stringh.patch new file mode 100644 index 0000000..3e487fa --- /dev/null +++ b/wxGTK-2.6.2-gcc41stringh.patch @@ -0,0 +1,28 @@ +=================================================================== +RCS file: /pack/cvsroots/wxwidgets/wxWidgets/include/wx/string.h,v +retrieving revision 1.206.2.2 +retrieving revision 1.206.2.3 +diff -u -r1.206.2.2 -r1.206.2.3 +--- wxWidgets/include/wx/string.h 2005/11/01 13:32:48 1.206.2.2 ++++ wxWidgets/include/wx/string.h 2005/12/15 19:26:27 1.206.2.3 +@@ -1291,16 +1291,15 @@ + { return (wxString&)wxStringBase::operator+=(ch); } + }; + +-// IBM xlC compiler needs these operators to be declared in global scope, +-// although this shouldn't be a problem for the other compilers we prefer to +-// only do it for it in stable 2.6 branch +-#ifdef __IBMCPP__ ++// notice that even though for many compilers the friend declarations above are ++// enough, from the point of view of C++ standard we must have the declarations ++// here as friend ones are not injected in the enclosing namespace and without ++// them the code fails to compile with conforming compilers such as xlC or g++4 + wxString WXDLLIMPEXP_BASE operator+(const wxString& string1, const wxString& string2); + wxString WXDLLIMPEXP_BASE operator+(const wxString& string, wxChar ch); + wxString WXDLLIMPEXP_BASE operator+(wxChar ch, const wxString& string); + wxString WXDLLIMPEXP_BASE operator+(const wxString& string, const wxChar *psz); + wxString WXDLLIMPEXP_BASE operator+(const wxChar *psz, const wxString& string); +-#endif // __IBMCPP__ + + // define wxArrayString, for compatibility + #if WXWIN_COMPATIBILITY_2_4 && !wxUSE_STL diff --git a/wxGTK-2.6.2-socketclosefix.patch b/wxGTK-2.6.2-socketclosefix.patch new file mode 100644 index 0000000..4e6d618 --- /dev/null +++ b/wxGTK-2.6.2-socketclosefix.patch @@ -0,0 +1,26 @@ +=================================================================== +RCS file: /pack/cvsroots/wxwidgets/wxWidgets/src/unix/gsocket.cpp,v +retrieving revision 1.51 +retrieving revision 1.51.2.1 +diff -u -r1.51 -r1.51.2.1 +--- wxWidgets/src/unix/gsocket.cpp 2005/09/19 15:18:27 1.51 ++++ wxWidgets/src/unix/gsocket.cpp 2005/10/05 15:37:42 1.51.2.1 +@@ -8,7 +8,7 @@ + * Guillermo Rodriguez Garcia + * Purpose: GSocket main Unix and OS/2 file + * Licence: The wxWindows licence +- * CVSID: $Id: gsocket.cpp,v 1.51 2005/09/19 15:18:27 JS Exp $ ++ * CVSID: $Id: gsocket.cpp,v 1.51.2.1 2005/10/05 15:37:42 KH Exp $ + * ------------------------------------------------------------------------- + */ + +@@ -331,6 +331,9 @@ + + assert(this); + ++ /* Don't allow events to fire after socket has been closed */ ++ gs_gui_functions->Disable_Events(this); ++ + /* If socket has been created, shutdown it */ + if (m_fd != INVALID_SOCKET) + { diff --git a/wxGTK.spec b/wxGTK.spec index 6884176..7d1bbd1 100644 --- a/wxGTK.spec +++ b/wxGTK.spec @@ -2,7 +2,7 @@ Name: wxGTK Version: 2.6.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: GTK2 port of the wxWidgets GUI library # The wxWindows licence is the LGPL with a specific exemption allowing # distribution of derived binaries under any terms. (This will eventually @@ -12,6 +12,8 @@ Group: System Environment/Libraries URL: http://www.wxwidgets.org/ Source0: http://dl.sf.net/wxwindows/%{name}-%{version}.tar.bz2 Patch0: wxGTK-2.6.2-intl_cpp.patch +Patch1: wxGTK-2.6.2-socketclosefix.patch +Patch2: wxGTK-2.6.2-gcc41stringh.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gtk2-devel, zlib-devel >= 1.1.4 @@ -72,6 +74,8 @@ OpenGL add-on for the wxWidgets library. %prep %setup -q %patch0 -p0 -b .intlcpp +%patch1 -p1 -b .socketclose +%patch2 -p1 -b .gcc41 sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure @@ -168,6 +172,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Feb 06 2006 Matthew Miller - 2.6.2-4 +- add wxGTK-2.6.2-socketclosefix.patch to fix aMule crashes. see + bugzilla bug #178184 +- add wxGTK-2.6.2-gcc41stringh.patch (pulled from CVS) to make build on + FC5 devel w/ gcc-4.1. + * Wed Nov 30 2005 Matthew Miller - 2.6.2-3 - add wxGTK-2.6.2-intl_cpp.patch to deal with amule and probably other issues (see bug #154618 comment #47)