[111716] trunk/dports/devel/codeblocks
mojca at macports.org
mojca at macports.org
Sun Sep 29 13:27:31 PDT 2013
Revision: 111716
https://trac.macports.org/changeset/111716
Author: mojca at macports.org
Date: 2013-09-29 13:27:31 -0700 (Sun, 29 Sep 2013)
Log Message:
-----------
codeblocks: experimental support for wxWidgets 2.9 (#40390)
Modified Paths:
--------------
trunk/dports/devel/codeblocks/Portfile
Added Paths:
-----------
trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-core.diff
trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-NassiShneiderman.diff
trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-codesnippets.diff
trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-exporter.diff
trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-wxcontrib.diff
Modified: trunk/dports/devel/codeblocks/Portfile
===================================================================
--- trunk/dports/devel/codeblocks/Portfile 2013-09-29 20:09:14 UTC (rev 111715)
+++ trunk/dports/devel/codeblocks/Portfile 2013-09-29 20:27:31 UTC (rev 111716)
@@ -28,6 +28,7 @@
# TODO: maybe more dependencies are needed in this version, please help complete the list (see also the list below)
depends_build path:bin/pkg-config:pkgconfig
+# TODO: if hunspell is updated, fix post-configure below (or patch configure[.in])
depends_lib port:boost \
port:hunspell
@@ -39,6 +40,9 @@
# patch-src-plugins-contrib-profiler-cbprofiler.cpp.diff: https://developer.berlios.de/patch/?func=detailpatch&patch_id=3496&group_id=5358
# patch-src-sdk-wxscintilla-src-PlatWX.cpp.diff: fixed upstream
# patch-src-src-Makefile.in.diff: https://trac.macports.org/ticket/40531
+# patch-wxWidgets30-compatibility-core.diff: https://developer.berlios.de/patch/?func=detailpatch&patch_id=3499&group_id=5358
+# patch-wxWidgets30-compatibility-plugins-codesnippets.diff: https://developer.berlios.de/patch/?func=detailpatch&patch_id=3500&group_id=5358
+# patch-wxWidgets30-compatibility-plugins-wxcontrib.diff: https://developer.berlios.de/patch/?func=detailpatch&patch_id=3501&group_id=5358
patchfiles patch-MouseSap-Makefile.diff \
patch-Makefile.diff \
patch-src-include-prep.h.diff \
@@ -46,6 +50,9 @@
patch-src-plugins-contrib-profiler-cbprofiler.cpp.diff \
patch-src-sdk-wxscintilla-src-PlatWX.cpp.diff \
patch-src-src-Makefile.in.diff \
+ patch-wxWidgets30-compatibility-core.diff \
+ patch-wxWidgets30-compatibility-plugins-codesnippets.diff \
+ patch-wxWidgets30-compatibility-plugins-wxcontrib.diff \
# not sure what this patch was used for
# patch-sdk-configmanager.cpp
@@ -107,8 +114,23 @@
variant aqua {}
variant x11 {}
+variant wxwidgets30 conflicts wxwidgets28 wxgtk28 description {Use wxWidgets 2.9 (experimental)} {
+ wxWidgets.use wxWidgets-3.0
+ depends_lib-append port:${wxWidgets.port}
+ # TODO: maybe the patch for NassiShneiderman also solves the issue with wxWidgets 2.8
+ patchfiles-append patch-wxWidgets30-compatibility-plugins-NassiShneiderman.diff \
+ patch-wxWidgets30-compatibility-plugins-exporter.diff
+ configure.args-append --with-wxdir=${wxWidgets.wxdir} \
+ --with-contrib-plugins=all,-FileManager
+
+ # TODO: this should be patched in configure[.in]
+ post-configure {
+ reinplace "s|CB_HUNSPELL_LIBS =|CB_HUNSPELL_LIBS = -lhunspell-1.3.0|" ${worksrcpath}/src/plugins/contrib/SpellChecker/Makefile
+ }
+}
+
# this variant seems to be broken
-variant wxwidgets28 conflicts wxgtk28 description {Use 32-bit Carbon-based wxWidgets 2.8} {
+variant wxwidgets28 conflicts wxwidgets30 wxgtk28 description {Use 32-bit Carbon-based wxWidgets 2.8} {
wxWidgets.use wxWidgets-2.8
depends_lib-append port:${wxWidgets.port}
# NassiShneiderman seems to be broken (http://trac.macports.org/ticket/40389)
@@ -119,7 +141,7 @@
configure.sdkroot ${wxWidgets.sdk}
}
}
-variant wxgtk28 conflicts wxwidgets28 description {Use wxWidgets 2.8 with GTK} {
+variant wxgtk28 conflicts wxwidgets30 wxwidgets28 description {Use wxWidgets 2.8 with GTK} {
wxWidgets.use wxGTK-2.8
patchfiles-append patch-src-plugins-contrib-source_exporter-Makefile.diff
# TODO: someone needs to do a careful check of this list of dependencies
@@ -152,7 +174,7 @@
--with-contrib-plugins=all,-FileManager
}
-if {![variant_isset wxwidgets28] && ![variant_isset wxgtk28]} {
+if {![variant_isset wxwidgets30] && ![variant_isset wxwidgets28] && ![variant_isset wxgtk28]} {
if {[variant_isset aqua]} {
default_variants +wxwidgets28
} elseif {[variant_isset x11]} {
Added: trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-core.diff
===================================================================
--- trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-core.diff (rev 0)
+++ trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-core.diff 2013-09-29 20:27:31 UTC (rev 111716)
@@ -0,0 +1,65 @@
+https://developer.berlios.de/patch/?func=detailpatch&patch_id=3499&group_id=5358
+--- src/sdk/configmanager.cpp.orig
++++ src/sdk/configmanager.cpp
+@@ -36,7 +36,11 @@
+ #endif
+
+ #ifdef __WXMAC__
++#if wxCHECK_VERSION(2,9,0)
++#include "wx/osx/core/cfstring.h"
++#else
+ #include "wx/mac/corefoundation/cfstring.h"
++#endif
+ #include "wx/intl.h"
+
+ #include <CoreFoundation/CFBundle.h>
+@@ -121,7 +125,11 @@
+ CFRelease(resourcesURL);
+ CFStringRef cfStrPath = CFURLCopyFileSystemPath(absoluteURL,kCFURLPOSIXPathStyle);
+ CFRelease(absoluteURL);
+- wxString str = wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding());
++ #if wxCHECK_VERSION(2,9,0)
++ wxString str = wxCFStringRef(cfStrPath).AsString(wxLocale::GetSystemEncoding());
++ #else
++ wxString str = wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding());
++ #endif
+ if (!str.Contains(wxString(_T("/Resources"))))
+ return ::DetermineExecutablePath() + _T("/.."); // not a bundle, use relative path
+ return str;
+--- src/sdk/xtra_res.cpp.orig
++++ src/sdk/xtra_res.cpp
+@@ -15,6 +15,7 @@
+ #include <wx/wx.h>
+ #endif
+
++#include <wx/xml/xml.h>
+
+ /////////////////////////////////////////////////////////////////////////////
+ // Name: xh_toolb.cpp
+--- src/src/app.cpp.orig
++++ src/src/app.cpp
+@@ -271,7 +271,11 @@
+ END_EVENT_TABLE()
+
+ #ifdef __WXMAC__
++#if wxCHECK_VERSION(2,9,0)
++#include "wx/osx/core/cfstring.h"
++#else
+ #include "wx/mac/corefoundation/cfstring.h"
++#endif
+ #include "wx/intl.h"
+
+ #include <CoreFoundation/CFBundle.h>
+@@ -286,7 +290,11 @@
+ CFRelease(resourcesURL);
+ CFStringRef cfStrPath = CFURLCopyFileSystemPath(absoluteURL,kCFURLPOSIXPathStyle);
+ CFRelease(absoluteURL);
+- return wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding());
++ #if wxCHECK_VERSION(2,9,0)
++ return wxCFStringRef(cfStrPath).AsString(wxLocale::GetSystemEncoding());
++ #else
++ return wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding());
++ #endif
+ }
+ #endif
+
Added: trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-NassiShneiderman.diff
===================================================================
--- trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-NassiShneiderman.diff (rev 0)
+++ trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-NassiShneiderman.diff 2013-09-29 20:27:31 UTC (rev 111716)
@@ -0,0 +1,22 @@
+This patch might not work with wxGTK, but it's needed for wxMAC and wxOSX (2.8 and 2.9).
+It needs to be fixed upstream, but a better patch is needed to deal with the problem.
+See also http://docs.wxwidgets.org/2.9.5/overview_bitmap.html
+
+--- src/plugins/contrib/NassiShneiderman/NassiView.cpp.orig
++++ src/plugins/contrib/NassiShneiderman/NassiView.cpp
+@@ -1048,15 +1048,9 @@
+
+ if ( dataptr )
+ {
+- #if defined(__WXMSW__)
+ wxCursor copycursor(dnd_copy_cur_xpm);
+ wxCursor movecursor(dnd_move_cur_xpm);
+ wxCursor nonecursor(dnd_none_cur_xpm);
+- #else
+- wxIcon copycursor(dnd_copy_cur_xpm);
+- wxIcon movecursor(dnd_move_cur_xpm);
+- wxIcon nonecursor(dnd_none_cur_xpm);
+- #endif
+ //wxDragResult result;
+
+ wxDropSource dndSource(m_diagramwindow, copycursor, movecursor, nonecursor);
Added: trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-codesnippets.diff
===================================================================
--- trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-codesnippets.diff (rev 0)
+++ trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-codesnippets.diff 2013-09-29 20:27:31 UTC (rev 111716)
@@ -0,0 +1,76 @@
+https://developer.berlios.de/patch/?func=detailpatch&patch_id=3500&group_id=5358
+--- src/plugins/contrib/codesnippets/codesnippetsapp.cpp.orig
++++ src/plugins/contrib/codesnippets/codesnippetsapp.cpp
+@@ -95,7 +95,11 @@
+ END_EVENT_TABLE()
+
+ #ifdef __WXMAC__
+- #include "wx/mac/corefoundation/cfstring.h"
++ #if wxCHECK_VERSION(2,9,0)
++ #include "wx/osx/core/cfstring.h"
++ #else
++ #include "wx/mac/corefoundation/cfstring.h"
++ #endif
+ #include "wx/intl.h"
+
+ #include <CoreFoundation/CFBundle.h>
+@@ -112,7 +116,11 @@
+ CFRelease(resourcesURL);
+ CFStringRef cfStrPath = CFURLCopyFileSystemPath(absoluteURL,kCFURLPOSIXPathStyle);
+ CFRelease(absoluteURL);
+- return wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding());
++ #if wxCHECK_VERSION(2,9,0)
++ return wxCFStringRef(cfStrPath).AsString(wxLocale::GetSystemEncoding());
++ #else
++ return wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding());
++ #endif
+ }
+ #endif
+
+@@ -268,8 +276,6 @@
+ m_KeepAliveFileName = wxEmptyString;
+ m_pFilesHistory = 0;
+
+- wxStandardPaths stdPaths;
+-
+ // -------------------------------
+ // initialize version and logging
+ // -------------------------------
+@@ -325,7 +331,7 @@
+ // Find Config File
+ // -----------------------------------------
+ // Create filename like {%HOME%}\codesnippets.ini
+- m_ConfigFolder = Normalize(stdPaths.GetUserDataDir());
++ m_ConfigFolder = Normalize(wxStandardPaths::Get().GetUserDataDir());
+ wxString m_ExecuteFolder = Normalize(FindAppPath(wxTheApp->argv[0], ::wxGetCwd(), wxEmptyString));
+
+ #if defined(LOGGING)
+@@ -1387,8 +1393,6 @@
+ void CodeSnippetsAppFrame::ImportCBResources()
+ // ----------------------------------------------------------------------------
+ {
+- wxStandardPaths stdPaths;
+-
+ // Location of app config folder
+ wxString appConfigFolder = Normalize(m_ConfigFolder) ;
+
+@@ -1399,7 +1403,7 @@
+ wxString cbExeFolder = Normalize(GetCBExeFolder());
+
+ // location of CodeBlocks config folder
+- wxString cbConfigFolder = Normalize(stdPaths.GetUserDataDir());
++ wxString cbConfigFolder = Normalize(wxStandardPaths::Get().GetUserDataDir());
+ wxString appParent = GetConfig()->GetAppParent();
+ if ( appParent.empty()) appParent =_T("codeblocks");
+ wxString prefixPath;
+--- src/plugins/contrib/codesnippets/snippetsconfig.cpp.orig
++++ src/plugins/contrib/codesnippets/snippetsconfig.cpp
+@@ -128,8 +128,6 @@
+ {
+ // file will be saved in $HOME/codesnippets.ini
+
+- wxStandardPaths stdPaths;
+-
+ #ifdef LOGGING
+ wxString fn(__FUNCTION__, wxConvUTF8);
+ LOGIT( _T("--- [%s] ---"),fn.c_str() );
Added: trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-exporter.diff
===================================================================
--- trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-exporter.diff (rev 0)
+++ trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-exporter.diff 2013-09-29 20:27:31 UTC (rev 111716)
@@ -0,0 +1,75 @@
+This patch is only needed and only works with wxWidgets >= 2.9.5.
+This should be fixed upstream, but a better patch is needed for backward compatibility.
+
+--- src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfdc29.h.orig
++++ src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfdc29.h
+@@ -162,9 +162,9 @@
+ virtual void DoGetSize(int* width, int* height) const;
+ virtual void DoGetSizeMM(int* width, int* height) const;
+
+- virtual void DoDrawLines(int n, wxPoint points[],
++ virtual void DoDrawLines(int n, const wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset);
+- virtual void DoDrawPolygon(int n, wxPoint points[],
++ virtual void DoDrawPolygon(int n, const wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset,
+ wxPolygonFillMode fillStyle = wxODDEVEN_RULE);
+ virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
+--- src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfprint.h.orig
++++ src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfprint.h
+@@ -867,7 +867,7 @@
+ return rval;
+ }
+
+- virtual void DoDrawLines(int n, wxPoint points[],
++ virtual void DoDrawLines(int n, const wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset)
+ {
+ m_dc.DoDrawLines(n, points,xoffset, yoffset);
+@@ -874,7 +874,7 @@
+ UpdateBoundingBox();
+ }
+
+- virtual void DoDrawPolygon(int n, wxPoint points[],
++ virtual void DoDrawPolygon(int n, const wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset,
+ wxPolygonFillMode fillStyle = wxODDEVEN_RULE)
+ {
+--- src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfdc29.inc.orig
++++ src/plugins/contrib/source_exporter/wxPdfDocument/src/pdfdc29.inc
+@@ -1032,7 +1032,7 @@
+ }
+
+ void
+-wxPdfDCImpl::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset)
++wxPdfDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset)
+ {
+ wxCHECK_RET(m_pdfDocument, wxT("Invalid PDF DC"));
+ SetupPen();
+@@ -1039,7 +1039,7 @@
+ int i;
+ for (i = 0; i < n; ++i)
+ {
+- wxPoint& point = points[i];
++ const wxPoint& point = points[i];
+ double xx = ScaleLogicalToPdfX(xoffset + point.x);
+ double yy = ScaleLogicalToPdfY(yoffset + point.y);
+ CalcBoundingBox(point.x+xoffset, point.y+yoffset);
+@@ -1056,7 +1056,7 @@
+ }
+
+ void
+-wxPdfDCImpl::DoDrawPolygon(int n, wxPoint points[],
++wxPdfDCImpl::DoDrawPolygon(int n, const wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset,
+ wxPolygonFillMode fillStyle /* = wxODDEVEN_RULE*/)
+ {
+@@ -1068,7 +1068,7 @@
+ int i;
+ for (i = 0; i < n; ++i)
+ {
+- wxPoint& point = points[i];
++ const wxPoint& point = points[i];
+ xp.Add(ScaleLogicalToPdfX(xoffset + point.x));
+ yp.Add(ScaleLogicalToPdfY(yoffset + point.y));
+ CalcBoundingBox(point.x + xoffset, point.y + yoffset);
Added: trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-wxcontrib.diff
===================================================================
--- trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-wxcontrib.diff (rev 0)
+++ trunk/dports/devel/codeblocks/files/patch-wxWidgets30-compatibility-plugins-wxcontrib.diff 2013-09-29 20:27:31 UTC (rev 111716)
@@ -0,0 +1,49 @@
+https://developer.berlios.de/patch/?func=detailpatch&patch_id=3501&group_id=5358
+This needs to be fixed upstream.
+The first three patches are safe, but I'm not sure how to properly fix
+the last one to achieve the desired functionality.
+The constants are already deprecated on 2.8.
+--- src/plugins/contrib/wxContribItems/KWIC/include/wx/KWIC/AngularRegulator.h.orig
++++ src/plugins/contrib/wxContribItems/KWIC/include/wx/KWIC/AngularRegulator.h
+@@ -11,6 +11,7 @@
+ //
+ /////////////////////////////////////////////////////////////////////////////
+
++#include <wx/control.h>
+
+ const int kwxEVT_ANGREG_FIRST = wxEVT_FIRST + 5402;
+
+--- src/plugins/contrib/wxContribItems/KWIC/include/wx/KWIC/LinearRegulator.h.orig
++++ src/plugins/contrib/wxContribItems/KWIC/include/wx/KWIC/LinearRegulator.h
+@@ -11,6 +11,7 @@
+ //
+ /////////////////////////////////////////////////////////////////////////////
+
++#include <wx/control.h>
+
+ const int kwxEVT_LINEARREG_FIRST = wxEVT_FIRST + 5401;
+
+--- src/plugins/contrib/wxContribItems/wxTreeList/src/treelistctrl.cpp.orig
++++ src/plugins/contrib/wxContribItems/wxTreeList/src/treelistctrl.cpp
+@@ -49,8 +49,12 @@
+ #include <wx/hashmap.h>
+
+ #ifdef __WXMAC__
++#if wxCHECK_VERSION(2,9,0)
++#include "wx/osx/private.h"
++#else
+ #include "wx/mac/private.h"
+ #endif
++#endif
+
+ #include "wx/treelistctrl.h"
+
+@@ -2017,8 +2021,6 @@
+ const wxString& name) {
+
+ #ifdef __WXMAC__
+- if (style & wxTR_HAS_BUTTONS) style |= wxTR_MAC_BUTTONS;
+- if (style & wxTR_HAS_BUTTONS) style &= ~wxTR_HAS_BUTTONS;
+ style &= ~wxTR_LINES_AT_ROOT;
+ style |= wxTR_NO_LINES;
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130929/16b91a02/attachment-0001.html>
More information about the macports-changes
mailing list