wok-current rev 4317

Codeblocks: hack for new glib
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 29 10:37:40 2009 +0200 (2009-09-29)
parents 255a25f55b78
children fa2a91c3bfa6
files codeblocks/receipt codeblocks/stuff/glib.u
line diff
     1.1 --- a/codeblocks/receipt	Mon Sep 28 23:42:55 2009 +0200
     1.2 +++ b/codeblocks/receipt	Tue Sep 29 10:37:40 2009 +0200
     1.3 @@ -15,6 +15,7 @@
     1.4  compile_rules()
     1.5  {
     1.6  	cd $src
     1.7 +	busybox patch -p1 -i ../stuff/glib.u
     1.8  	./configure \
     1.9  		--with-contrib-plugins="all, -help" \
    1.10  		--prefix=/usr \
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/codeblocks/stuff/glib.u	Tue Sep 29 10:37:40 2009 +0200
     2.3 @@ -0,0 +1,78 @@
     2.4 +Both glib and wx define GSocket, see http://trac.wxwidgets.org/ticket/10883
     2.5 +
     2.6 +--- codeblocks-8.02/src/src/prefix.cpp
     2.7 ++++ codeblocks-8.02/src/src/prefix.cpp
     2.8 +@@ -393,7 +393,7 @@
     2.9 + 
    2.10 + 	br_return_val_if_fail (path != (char *) NULL, (char *) NULL);
    2.11 + 
    2.12 +-	end = strrchr (path, '/');
    2.13 ++	end = strrchr ((char *) path, '/');
    2.14 + 	if (!end) return strdup (".");
    2.15 + 
    2.16 + 	while (end > path && *end == '/')
    2.17 +@@ -429,7 +429,7 @@
    2.18 + 	br_return_val_if_fail (path != (char *) NULL, (char *) NULL);
    2.19 + 
    2.20 + 	if (!*path) return strdup ("/");
    2.21 +-	end = strrchr (path, '/');
    2.22 ++	end = strrchr ((char *) path, '/');
    2.23 + 	if (!end) return strdup (path);
    2.24 + 
    2.25 + 	tmp = br_strndup ((char *) path, end - path);
    2.26 +
    2.27 +--- codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippets.cpp
    2.28 ++++ codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippets.cpp
    2.29 +@@ -21,6 +21,13 @@
    2.30 + 
    2.31 + #include <cstring>
    2.32 + #include "sdk.h"
    2.33 ++#if defined(__WXGTK__)
    2.34 ++#define GSocket GlibGSocket
    2.35 ++    #include "wx/gtk/win_gtk.h"
    2.36 ++#undef GSocket
    2.37 ++    #include <gdk/gdkx.h>
    2.38 ++#endif
    2.39 ++
    2.40 + #ifndef CB_PRECOMP
    2.41 + 	#include <wx/event.h>
    2.42 + 	#include <wx/frame.h> // Manager::Get()->GetAppWindow()
    2.43 +@@ -51,11 +58,6 @@
    2.44 + #include <wx/wxFlatNotebook/wxFlatNotebook.h>
    2.45 + #include "memorymappedfile.h"
    2.46 + 
    2.47 +-#if defined(__WXGTK__)
    2.48 +-    #include "wx/gtk/win_gtk.h"
    2.49 +-    #include <gdk/gdkx.h>
    2.50 +-#endif
    2.51 +-
    2.52 + // The plugin needs a flag ON to enable some code for the plugin
    2.53 + #if !defined(BUILDING_PLUGIN)
    2.54 +     #error preprocessor BUILDING_PLUGIN flag required for this target
    2.55 +
    2.56 +--- codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp
    2.57 ++++ codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp
    2.58 +@@ -19,6 +19,12 @@
    2.59 + */
    2.60 + // RCS-ID: $Id: codesnippetstreectrl.cpp 112 2008-01-07 17:03:31Z Pecan $
    2.61 + 
    2.62 ++#if defined(__WXGTK__)
    2.63 ++#define GSocket GlibGSocket
    2.64 ++    #include "wx/gtk/win_gtk.h"
    2.65 ++#undef GSocket
    2.66 ++    #include <gdk/gdkx.h>
    2.67 ++#endif
    2.68 + #ifdef WX_PRECOMP
    2.69 +     #include "wx_pch.h"
    2.70 + #else
    2.71 +@@ -48,10 +54,6 @@
    2.72 + #include "messagebox.h"
    2.73 + #include "menuidentifiers.h"
    2.74 + #include "editsnippetframe.h"
    2.75 +-#if defined(__WXGTK__)
    2.76 +-    #include "wx/gtk/win_gtk.h"
    2.77 +-    #include <gdk/gdkx.h>
    2.78 +-#endif
    2.79 + 
    2.80 + IMPLEMENT_DYNAMIC_CLASS(CodeSnippetsTreeCtrl, wxTreeCtrl)
    2.81 +