[110757] trunk/dports/devel/codeblocks

mojca at macports.org mojca at macports.org
Thu Sep 5 06:49:01 PDT 2013


Revision: 110757
          https://trac.macports.org/changeset/110757
Author:   mojca at macports.org
Date:     2013-09-05 06:49:00 -0700 (Thu, 05 Sep 2013)
Log Message:
-----------
codeblocks: fix compilation with clang (#40386), add (probably too much) dependencies

Modified Paths:
--------------
    trunk/dports/devel/codeblocks/Portfile
    trunk/dports/devel/codeblocks/files/patch-sdk-configmanager.cpp
    trunk/dports/devel/codeblocks/files/patch-src-plugins-contrib-source_exporter-Makefile.diff

Added Paths:
-----------
    trunk/dports/devel/codeblocks/files/patch-MouseSap-Makefile.diff
    trunk/dports/devel/codeblocks/files/patch-src-plugins-contrib-lib_finder-librariesdlg.cpp.diff
    trunk/dports/devel/codeblocks/files/patch-src-plugins-contrib-profiler-cbprofiler.cpp.diff
    trunk/dports/devel/codeblocks/files/patch-src-sdk-wxscintilla-src-PlatWX.cpp.diff

Removed Paths:
-------------
    trunk/dports/devel/codeblocks/files/patch-MouseSap-Makefile.am

Modified: trunk/dports/devel/codeblocks/Portfile
===================================================================
--- trunk/dports/devel/codeblocks/Portfile	2013-09-05 12:56:40 UTC (rev 110756)
+++ trunk/dports/devel/codeblocks/Portfile	2013-09-05 13:49:00 UTC (rev 110757)
@@ -36,11 +36,7 @@
     }
 }
 
-# TODO: Project bug, file upstream report, fixing might be doable
-# http://trac.macports.org/ticket/35072
-compiler.blacklist  *clang*
-
-# TODO: apparently more dependencies are needed in this version, please help complete the list
+# TODO: apparently more dependencies are needed in this version, please help complete the list (see also the list below)
 depends_build       path:bin/pkg-config:pkgconfig
 depends_lib         port:boost
 
@@ -49,12 +45,19 @@
 configure.args      "--with-contrib-plugins=all,-FileManager"
 
 # TODO:
-# patch-MouseSap-Makefile.am: report upstream
-# patch-Makefile.diff: not sure why it is needed
-# patch-src-plugins-contrib-source_exporter-Makefile.diff: report upstream
-patchfiles          patch-MouseSap-Makefile.am \
+# patch-MouseSap-Makefile.diff:                               report upstream
+# patch-Makefile.diff:                                        not sure why it is needed
+# patch-src-plugins-contrib-lib_finder-librariesdlg.cpp.diff: report upstream
+# patch-src-plugins-contrib-profiler-cbprofiler.cpp.diff:     http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=3496&group_id=5358
+# patch-src-plugins-contrib-source_exporter-Makefile.diff:    report upstream
+# patch-src-sdk-wxscintilla-src-PlatWX.cpp.diff:              fixed upstream
+patchfiles          patch-MouseSap-Makefile.diff \
                     patch-Makefile.diff \
-                    patch-src-plugins-contrib-source_exporter-Makefile.diff
+                    patch-src-plugins-contrib-lib_finder-librariesdlg.cpp.diff \
+                    patch-src-plugins-contrib-profiler-cbprofiler.cpp.diff \
+                    patch-src-plugins-contrib-source_exporter-Makefile.diff \
+                    patch-src-sdk-wxscintilla-src-PlatWX.cpp.diff \
+
 # not sure what this patch was used for
 #                   patch-sdk-configmanager.cpp
 
@@ -121,7 +124,42 @@
 }
 variant wxgtk28 conflicts wxwidgets28 description {Use wxWidgets 2.8 with GTK} {
     wxWidgets.use           wxGTK-2.8
-    depends_lib-append      port:${wxWidgets.port}
+    # TODO: someone needs to do a careful check of this list of dependencies
+    # codeblocks ends up linking against these, but it is quite possible that:
+    # - some of them are also needed when liking against Carbon/Cocoa-based wxWidgets
+    # - some of them are only gtk's dependencies and are not used directly in codeblocks at all
+    depends_lib-append      port:${wxWidgets.port} \
+                            port:atk \
+                            port:bzip2 \
+                            path:lib/pkgconfig/cairo.pc:cairo \
+                            port:expat \
+                            port:fontconfig \
+                            port:freetype \
+                            port:gdk-pixbuf2 \
+                            port:gettext \
+                            port:glib2 \
+                            port:graphite2 \
+                            port:gtk2 \
+                            port:harfbuzz \
+                            port:libffi \
+                            port:libiconv \
+                            port:libpixman \
+                            port:libpng \
+                            port:pango \
+                            port:xorg-libX11 \
+                            port:xorg-libXau \
+                            port:xorg-libXcomposite \
+                            port:xorg-libXcursor \
+                            port:xorg-libXdamage \
+                            port:xorg-libXdmcp \
+                            port:xorg-libXext \
+                            port:xorg-libXfixes \
+                            port:xorg-libXi \
+                            port:xorg-libXinerama \
+                            port:xorg-libXrandr \
+                            port:xorg-libxcb \
+                            port:xrender \
+                            port:zlib
     configure.args-append   --with-wxdir=${wxWidgets.wxdir}
 }
 

Deleted: trunk/dports/devel/codeblocks/files/patch-MouseSap-Makefile.am
===================================================================
--- trunk/dports/devel/codeblocks/files/patch-MouseSap-Makefile.am	2013-09-05 12:56:40 UTC (rev 110756)
+++ trunk/dports/devel/codeblocks/files/patch-MouseSap-Makefile.am	2013-09-05 13:49:00 UTC (rev 110757)
@@ -1,22 +0,0 @@
---- src/plugins/contrib/MouseSap/Makefile.am.orig	2010-05-22 12:20:19.000000000 +0200
-+++ src/plugins/contrib/MouseSap/Makefile.am	2010-11-11 10:03:40.000000000 +0100
-@@ -7,7 +7,7 @@ pluginlibdir = $(pkglibdir)/plugins
- 
- pluginlib_LTLIBRARIES = libMouseSap.la
- 
--libMouseSap_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
-+libMouseSap_la_LDFLAGS = $(WX_GTK2_LIBS) -module -version-info 0:1:0 -shared -no-undefined -avoid-version
- 
- libMouseSap_la_LIBADD = $(PLUGIN_WX_LIBS) ../../../sdk/libcodeblocks.la
- 
---- src/plugins/contrib/MouseSap/Makefile.in.orig	2010-06-08 10:55:48.000000000 +0200
-+++ src/plugins/contrib/MouseSap/Makefile.in	2010-11-11 10:04:07.000000000 +0100
-@@ -288,7 +288,7 @@ INCLUDES = $(WX_CXXFLAGS) \
- 
- pluginlibdir = $(pkglibdir)/plugins
- pluginlib_LTLIBRARIES = libMouseSap.la
--libMouseSap_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
-+libMouseSap_la_LDFLAGS = $(WX_GTK2_LIBS) -module -version-info 0:1:0 -shared -no-undefined -avoid-version
- libMouseSap_la_LIBADD = $(PLUGIN_WX_LIBS) ../../../sdk/libcodeblocks.la
- libMouseSap_la_SOURCES = MouseSap.cpp
- noinst_HEADERS = MouseSap.h

Copied: trunk/dports/devel/codeblocks/files/patch-MouseSap-Makefile.diff (from rev 110751, trunk/dports/devel/codeblocks/files/patch-MouseSap-Makefile.am)
===================================================================
--- trunk/dports/devel/codeblocks/files/patch-MouseSap-Makefile.diff	                        (rev 0)
+++ trunk/dports/devel/codeblocks/files/patch-MouseSap-Makefile.diff	2013-09-05 13:49:00 UTC (rev 110757)
@@ -0,0 +1,23 @@
+http://developer.berlios.de/bugs/?func=detailbug&bug_id=19115&group_id=5358
+--- src/plugins/contrib/MouseSap/Makefile.am.orig
++++ src/plugins/contrib/MouseSap/Makefile.am
+@@ -7,7 +7,7 @@ pluginlibdir = $(pkglibdir)/plugins
+ 
+ pluginlib_LTLIBRARIES = libMouseSap.la
+ 
+-libMouseSap_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
++libMouseSap_la_LDFLAGS = $(WX_GTK2_LIBS) -module -version-info 0:1:0 -shared -no-undefined -avoid-version
+ 
+ libMouseSap_la_LIBADD = $(PLUGIN_WX_LIBS) ../../../sdk/libcodeblocks.la
+ 
+--- src/plugins/contrib/MouseSap/Makefile.in.orig
++++ src/plugins/contrib/MouseSap/Makefile.in
+@@ -347,7 +347,7 @@ INCLUDES = $(WX_CXXFLAGS) \
+ 
+ pluginlibdir = $(pkglibdir)/plugins
+ pluginlib_LTLIBRARIES = libMouseSap.la
+-libMouseSap_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
++libMouseSap_la_LDFLAGS = $(WX_GTK2_LIBS) -module -version-info 0:1:0 -shared -no-undefined -avoid-version
+ libMouseSap_la_LIBADD = $(PLUGIN_WX_LIBS) ../../../sdk/libcodeblocks.la
+ libMouseSap_la_SOURCES = MouseSap.cpp
+ noinst_HEADERS = MouseSap.h

Modified: trunk/dports/devel/codeblocks/files/patch-sdk-configmanager.cpp
===================================================================
--- trunk/dports/devel/codeblocks/files/patch-sdk-configmanager.cpp	2013-09-05 12:56:40 UTC (rev 110756)
+++ trunk/dports/devel/codeblocks/files/patch-sdk-configmanager.cpp	2013-09-05 13:49:00 UTC (rev 110757)
@@ -1,5 +1,5 @@
---- src/sdk/configmanager.cpp.orig	2010-05-22 12:10:05.000000000 +0200
-+++ src/sdk/configmanager.cpp	2010-11-11 22:27:20.000000000 +0100
+--- src/sdk/configmanager.cpp.orig
++++ src/sdk/configmanager.cpp
 @@ -1442,8 +1442,10 @@ void ConfigManager::InitPaths()
  #ifdef CB_AUTOCONF
      if (plugin_path_global.IsEmpty())

Added: trunk/dports/devel/codeblocks/files/patch-src-plugins-contrib-lib_finder-librariesdlg.cpp.diff
===================================================================
--- trunk/dports/devel/codeblocks/files/patch-src-plugins-contrib-lib_finder-librariesdlg.cpp.diff	                        (rev 0)
+++ trunk/dports/devel/codeblocks/files/patch-src-plugins-contrib-lib_finder-librariesdlg.cpp.diff	2013-09-05 13:49:00 UTC (rev 110757)
@@ -0,0 +1,28 @@
+needed to compile with clang
+--- src/plugins/contrib/lib_finder/librariesdlg.cpp.orig
++++ src/plugins/contrib/lib_finder/librariesdlg.cpp
+@@ -14,6 +14,7 @@
+ #include <wx/string.h>
+ //*)
+ 
++#include <algorithm>
+ #include <sdk.h>
+ #include <manager.h>
+ #include <configmanager.h>
+@@ -90,7 +91,6 @@ END_EVENT_TABLE()
+ 
+ LibrariesDlg::LibrariesDlg(wxWindow* parent, TypedResults& knownLibraries)
+     : m_KnownLibraries(knownLibraries)
+-    , m_WorkingCopy(knownLibraries)
+     , m_SelectedConfig(0)
+     , m_WhileUpdating(false)
+ {
+@@ -124,6 +124,8 @@ LibrariesDlg::LibrariesDlg(wxWindow* parent, TypedResults& knownLibraries)
+     wxBoxSizer* BoxSizer3;
+     wxStdDialogButtonSizer* StdDialogButtonSizer1;
+ 
++    std::copy(m_KnownLibraries, m_KnownLibraries+sizeof(m_WorkingCopy)/sizeof(m_WorkingCopy[0]), m_WorkingCopy);
++
+     Create(parent, wxID_ANY, _("Registered libraries"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER, _T("wxID_ANY"));
+     BoxSizer1 = new wxBoxSizer(wxVERTICAL);
+     BoxSizer16 = new wxBoxSizer(wxHORIZONTAL);

Added: trunk/dports/devel/codeblocks/files/patch-src-plugins-contrib-profiler-cbprofiler.cpp.diff
===================================================================
--- trunk/dports/devel/codeblocks/files/patch-src-plugins-contrib-profiler-cbprofiler.cpp.diff	                        (rev 0)
+++ trunk/dports/devel/codeblocks/files/patch-src-plugins-contrib-profiler-cbprofiler.cpp.diff	2013-09-05 13:49:00 UTC (rev 110757)
@@ -0,0 +1,21 @@
+needed for compilation with clang
+http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=3496&group_id=5358
+--- src/plugins/contrib/profiler/cbprofiler.cpp.orig
++++ src/plugins/contrib/profiler/cbprofiler.cpp
+@@ -101,7 +101,7 @@ int CBProfiler::Execute()
+     if (project->GetBuildTargetsCount() > 1)
+     {
+         // more than one executable target? ask...
+-        wxString choices[project->GetBuildTargetsCount()];
++        wxString *choices = new wxString[project->GetBuildTargetsCount()];
+         wxString active_target = project->GetActiveBuildTarget();
+         int selected = 0;
+         for (int i=0; i<project->GetBuildTargetsCount(); ++i)
+@@ -114,6 +114,7 @@ int CBProfiler::Execute()
+                                     _("Select the target you want to profile"),
+                                     _("Select Target"),project->GetBuildTargetsCount(),choices);
+         dialog.SetSelection(selected);
++        delete [] choices;
+         if (dialog.ShowModal() != wxID_OK)
+             return -1;
+         int targetIndex = dialog.GetSelection();

Modified: trunk/dports/devel/codeblocks/files/patch-src-plugins-contrib-source_exporter-Makefile.diff
===================================================================
--- trunk/dports/devel/codeblocks/files/patch-src-plugins-contrib-source_exporter-Makefile.diff	2013-09-05 12:56:40 UTC (rev 110756)
+++ trunk/dports/devel/codeblocks/files/patch-src-plugins-contrib-source_exporter-Makefile.diff	2013-09-05 13:49:00 UTC (rev 110757)
@@ -1,3 +1,4 @@
+Not sure whether -lfontconfig is only needed for wxGTK or also for Carbon/Cocoa-based wxWidgets
 --- src/plugins/contrib/source_exporter/Makefile.am.orig
 +++ src/plugins/contrib/source_exporter/Makefile.am
 @@ -12,7 +12,7 @@ pluginlib_LTLIBRARIES = libexporter.la

Added: trunk/dports/devel/codeblocks/files/patch-src-sdk-wxscintilla-src-PlatWX.cpp.diff
===================================================================
--- trunk/dports/devel/codeblocks/files/patch-src-sdk-wxscintilla-src-PlatWX.cpp.diff	                        (rev 0)
+++ trunk/dports/devel/codeblocks/files/patch-src-sdk-wxscintilla-src-PlatWX.cpp.diff	2013-09-05 13:49:00 UTC (rev 110757)
@@ -0,0 +1,24 @@
+an upstream patch for clang compile error
+--- src/sdk/wxscintilla/src/PlatWX.cpp.orig
++++ src/sdk/wxscintilla/src/PlatWX.cpp
+@@ -299,12 +299,14 @@ void SurfaceImpl::Polygon(Point *pts, int npts, ColourDesired fore, ColourDesire
+     PenColour(fore);
+     BrushColour(back);
+ /* C::B begin */
+-    // Since Point now has float as x and y, it seems no longer to be interchangeable with wxPoint,
+-    // and the polygon is not drawn, so we convert it explicitely
+-    wxPoint points[npts];
+-    for (int i = 0; i < npts; ++i)
+-        points[i] = wxPoint(pts[i].x, pts[i].y);
+-    hDC->DrawPolygon(npts, points);
++    wxPoint *p = new wxPoint[npts];
++
++    for (int i=0; i<npts; i++) {
++        p[i].x = pts[i].x;
++        p[i].y = pts[i].y;
++    }
++    hDC->DrawPolygon(npts, p);
++    delete [] p;
+ /* C::B end */
+ }
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130905/95846a7e/attachment-0001.html>


More information about the macports-changes mailing list