From ecd9b66bc8e2a3d45c938ac14023aa6b55caff2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 8 Aug 2025 22:01:12 +0700 Subject: [PATCH] codeblocks: update to 25.03. --- srcpkgs/codeblocks/patches/000.r11991.patch | 27 - srcpkgs/codeblocks/patches/000.r12008.patch | 22 - srcpkgs/codeblocks/patches/000.r12012.patch | 140 --- srcpkgs/codeblocks/patches/000.r12532.patch | 13 - srcpkgs/codeblocks/patches/000.r12580.patch | 944 ------------------ srcpkgs/codeblocks/patches/000.r12707.patch | 120 --- .../codeblocks/patches/codeblocks-gcc11.patch | 13 - .../patches/correct-file-access.patch | 29 - .../patches/cross-autorevision.patch | 12 +- srcpkgs/codeblocks/patches/wx-3.2.patch | 21 - .../patches/wxwiget-3.1-regex-is-pcre.patch | 14 - srcpkgs/codeblocks/template | 13 +- 12 files changed, 14 insertions(+), 1354 deletions(-) delete mode 100644 srcpkgs/codeblocks/patches/000.r11991.patch delete mode 100644 srcpkgs/codeblocks/patches/000.r12008.patch delete mode 100644 srcpkgs/codeblocks/patches/000.r12012.patch delete mode 100644 srcpkgs/codeblocks/patches/000.r12532.patch delete mode 100644 srcpkgs/codeblocks/patches/000.r12580.patch delete mode 100644 srcpkgs/codeblocks/patches/000.r12707.patch delete mode 100644 srcpkgs/codeblocks/patches/codeblocks-gcc11.patch delete mode 100644 srcpkgs/codeblocks/patches/correct-file-access.patch delete mode 100644 srcpkgs/codeblocks/patches/wx-3.2.patch delete mode 100644 srcpkgs/codeblocks/patches/wxwiget-3.1-regex-is-pcre.patch diff --git a/srcpkgs/codeblocks/patches/000.r11991.patch b/srcpkgs/codeblocks/patches/000.r11991.patch deleted file mode 100644 index 0cdb7251fdc..00000000000 --- a/srcpkgs/codeblocks/patches/000.r11991.patch +++ /dev/null @@ -1,27 +0,0 @@ -Index: src/src/main.cpp -=================================================================== ---- a/src/src/main.cpp (revision 11990) -+++ b/src/src/main.cpp (revision 11991) -@@ -2680,8 +2680,6 @@ - else - { - wxBusyCursor useless; -- wxPaintEvent e; -- ProcessEvent(e); - for (unsigned int i = 0; i < files.GetCount(); ++i) - success &= OpenGeneric(files[i]); - } -Index: src/src/watchesdlg.cpp -=================================================================== ---- a/src/src/watchesdlg.cpp (revision 11990) -+++ b/src/src/watchesdlg.cpp (revision 11991) -@@ -103,8 +103,7 @@ - cb_unused const wxPoint& pos, - cb_unused const wxSize& sz) const override - { -- wxPGWindowList const list; -- return list; -+ return wxPGWindowList(nullptr, nullptr); - } - void UpdateControl(cb_unused wxPGProperty* property, cb_unused wxWindow* ctrl) const override {} - bool OnEvent(cb_unused wxPropertyGrid* propgrid, cb_unused wxPGProperty* property, diff --git a/srcpkgs/codeblocks/patches/000.r12008.patch b/srcpkgs/codeblocks/patches/000.r12008.patch deleted file mode 100644 index 5a125f6cef7..00000000000 --- a/srcpkgs/codeblocks/patches/000.r12008.patch +++ /dev/null @@ -1,22 +0,0 @@ ------------------------------------------------------------------------- -r12008 | fuscated | 2020-03-30 19:14:41 +0200 (Mon, 30 Mar 2020) | 3 lines - -- DragScroll: Remove int3, so it might build on non-x86 machines (ticket #935) - -> I guess this is useful only for debugging. - -Index: src/plugins/contrib/dragscroll/dragscrollcfg.h -=================================================================== ---- a/src/plugins/contrib/dragscroll/dragscrollcfg.h (revision 12007) -+++ b/src/plugins/contrib/dragscroll/dragscrollcfg.h (revision 12008) -@@ -35,7 +35,7 @@ - wxString GetBitmapBaseName() const; - void OnApply(); - void OnCancel(){} -- virtual void InitDialog(){ asm("int3");} /*trap*/ -+ virtual void InitDialog() { } /*trap*/ - - // pointer to owner of the configuration diaglog needed to - // complete the OnApply/OnCancel EndModal() logic - ------------------------------------------------------------------------- diff --git a/srcpkgs/codeblocks/patches/000.r12012.patch b/srcpkgs/codeblocks/patches/000.r12012.patch deleted file mode 100644 index 12988765acb..00000000000 --- a/srcpkgs/codeblocks/patches/000.r12012.patch +++ /dev/null @@ -1,140 +0,0 @@ ------------------------------------------------------------------------- -r12012 | mortenmacfly | 2020-03-31 17:44:13 +0200 (Tue, 31 Mar 2020) | 2 lines - -* keybinder: remove old-school #pragmas to fix bug #936 and https://bugzilla.redhat.com/show_bug.cgi?id=1819154 -- keybinder: also, remove Borland c related pragmas. (Who will ever compile C::B using Borland C?) - -Index: src/plugins/contrib/keybinder/cbKeyConfigPanel.h -=================================================================== ---- a/src/plugins/contrib/keybinder/cbKeyConfigPanel.h (revision 12011) -+++ b/src/plugins/contrib/keybinder/cbKeyConfigPanel.h (revision 12012) -@@ -10,10 +10,6 @@ - #ifndef CBKEYCONFIGPANEL_H - #define CBKEYCONFIGPANEL_H - --#ifdef __BORLANDC__ -- #pragma hdrstop --#endif -- - // Modified Keybinder for CodeBlocks KeyBnder v2.0 - - // ---------------------------------------------------------------------------- -Index: src/plugins/contrib/keybinder/cbkeyConfigPanel.cpp -=================================================================== ---- a/src/plugins/contrib/keybinder/cbkeyConfigPanel.cpp (revision 12011) -+++ b/src/plugins/contrib/keybinder/cbkeyConfigPanel.cpp (revision 12012) -@@ -12,10 +12,6 @@ - - // Modified CodeBlocks KeyBnder v2.0 2019/04/8 - --#if defined(__GNUG__) && !defined(__APPLE__) -- #pragma implementation "cbkeybinder.h" --#endif -- - #include - - #include -Index: src/plugins/contrib/keybinder/cbkeybinder.cpp -=================================================================== ---- a/src/plugins/contrib/keybinder/cbkeybinder.cpp (revision 12011) -+++ b/src/plugins/contrib/keybinder/cbkeybinder.cpp (revision 12012) -@@ -12,10 +12,6 @@ - - // Modified CodeBlocks KeyBnder v2.0 2019/04/8 - --#if defined(__GNUG__) && !defined(__APPLE__) -- #pragma implementation "cbkeybinder.h" --#endif -- - #include - - #include -Index: src/plugins/contrib/keybinder/cbkeybinder.h -=================================================================== ---- a/src/plugins/contrib/keybinder/cbkeybinder.h (revision 12011) -+++ b/src/plugins/contrib/keybinder/cbkeybinder.h (revision 12012) -@@ -10,14 +10,6 @@ - #ifndef CBKEYBINDER_H - #define CBKEYBINDER_H - --#if defined(__GNUG__) && !defined(__APPLE__) -- #pragma interface "cbkeybinder.h" --#endif -- --#ifdef __BORLANDC__ -- #pragma hdrstop --#endif -- - #include - //-#include - #include -Index: src/plugins/contrib/keybinder/keybinder.cpp -=================================================================== ---- a/src/plugins/contrib/keybinder/keybinder.cpp (revision 12011) -+++ b/src/plugins/contrib/keybinder/keybinder.cpp (revision 12012) -@@ -12,11 +12,6 @@ - - // Modified Keybinder for CodeBlocks KeyBnder v2.0 2019/04/8 - --#ifdef __GNUG__ --#pragma implementation "keybinder.h" //necessary for linux, else undefines when linking --#endif -- -- - // includes - #include - #include // Manager::Get()->GetAppWindow() -Index: src/plugins/contrib/keybinder/keybinder.h -=================================================================== ---- a/src/plugins/contrib/keybinder/keybinder.h (revision 12011) -+++ b/src/plugins/contrib/keybinder/keybinder.h (revision 12012) -@@ -16,10 +16,6 @@ - #ifndef __KEYBINDER_G__ - #define __KEYBINDER_G__ - --#ifdef __GNUG__ --#pragma interface "keybinder.h" --#endif -- - // required includes - #include "wx/panel.h" - #include "wx/dialog.h" -Index: src/plugins/contrib/keybinder/menuutils.cpp -=================================================================== ---- a/src/plugins/contrib/keybinder/menuutils.cpp (revision 12011) -+++ b/src/plugins/contrib/keybinder/menuutils.cpp (revision 12012) -@@ -10,17 +10,10 @@ - // RCS-ID: $Id$ - - // menuutils for KeyBinder v2.0 2019/04/8 --#ifdef __GNUG__ --#pragma implementation "menuutils.h" --#endif - - // For compilers that support precompilation, includes "wx/wx.h". - #include "wx/wxprec.h" - --#ifdef __BORLANDC__ --#pragma hdrstop --#endif -- - #ifndef WX_PRECOMP - #include "wx/wx.h" - #endif -Index: src/plugins/contrib/keybinder/menuutils.h -=================================================================== ---- a/src/plugins/contrib/keybinder/menuutils.h (revision 12011) -+++ b/src/plugins/contrib/keybinder/menuutils.h (revision 12012) -@@ -15,10 +15,6 @@ - #ifndef __WX_MENUUTILS_H__ - #define __WX_MENUUTILS_H__ - --#ifdef __GNUG__ --#pragma interface "menuutils.h" --#endif -- - // includes - #include "wx/panel.h" - #include "wx/dialog.h" - ------------------------------------------------------------------------- diff --git a/srcpkgs/codeblocks/patches/000.r12532.patch b/srcpkgs/codeblocks/patches/000.r12532.patch deleted file mode 100644 index 15a2fff28e2..00000000000 --- a/srcpkgs/codeblocks/patches/000.r12532.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: src/include/ccmanager.h -=================================================================== ---- a/src/include/ccmanager.h (revision 12531) -+++ b/src/include/ccmanager.h (revision 12532) -@@ -44,7 +44,7 @@ - * list or the doxygen popup, the scroll event is instead sent there (and skipped for the editor - * window). - */ --class DLLIMPORT CCManager : public Mgr, wxEvtHandler -+class DLLIMPORT CCManager : public Mgr, public wxEvtHandler - { - public: - friend class Mgr; diff --git a/srcpkgs/codeblocks/patches/000.r12580.patch b/srcpkgs/codeblocks/patches/000.r12580.patch deleted file mode 100644 index 7930c5c5677..00000000000 --- a/srcpkgs/codeblocks/patches/000.r12580.patch +++ /dev/null @@ -1,944 +0,0 @@ -Index: src/src/notebookstyles.h -=================================================================== ---- a/src/src/notebookstyles.h (revision 12579) -+++ b/src/src/notebookstyles.h (revision 12580) -@@ -8,14 +8,6 @@ - - #include "cbauibook.h" - --#if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) -- #define GSocket GLibSocket -- #include -- #undef GSocket -- #include --#endif -- -- - class wxDC; - class wxWindow; - class wxRect; -@@ -53,35 +45,4 @@ - const wxSize& required_bmp_size) override; - }; - --#if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) --class NbStyleGTK : public wxAuiDefaultTabArt --{ --public: -- NbStyleGTK(); -- -- virtual wxAuiTabArt* Clone(); -- virtual void DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect); -- virtual void DrawTab(wxDC& dc, -- wxWindow* wnd, -- const wxAuiNotebookPage& page, -- const wxRect& in_rect, -- int close_button_state, -- wxRect* out_tab_rect, -- wxRect* out_button_rect, -- int* x_extent); -- void DrawButton(wxDC& dc, wxWindow* wnd, const wxRect& in_rect, int bitmap_id, -- int button_state, int orientation, wxRect* out_rect); -- int GetBestTabCtrlSize(wxWindow* wnd, const wxAuiNotebookPageArray& pages, -- const wxSize& required_bmp_size); -- virtual wxSize GetTabSize(wxDC& dc, wxWindow* wnd, const wxString& caption, const wxBitmap& bitmap, bool active, -- int close_button_state, int* x_extent); --private: -- int m_Xthickness; -- int m_Ythickness; -- int m_TabHBorder; -- int m_TabVBorder; -- wxBitmap m_ActiveCloseButton; --}; --#endif // #if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) -- - #endif // NOTEBOOKSTYLES_H -Index: src/plugins/compilergcc/compileroptionsdlg.cpp -=================================================================== ---- a/src/plugins/compilergcc/compileroptionsdlg.cpp (revision 12579) -+++ b/src/plugins/compilergcc/compileroptionsdlg.cpp (revision 12580) -@@ -677,13 +677,9 @@ - wxPGProperty *root = m_FlagsPG->GetRoot(); - if (root) - { -- unsigned count = root->GetChildCount(); -+ const unsigned count = root->GetChildCount(); - for (unsigned ii = 0; ii < count; ++ii) --#if wxCHECK_VERSION(3, 0, 0) - m_FlagsPG->SortChildren(root->Item(ii), wxPG_RECURSE); --#else -- m_FlagsPG->Sort(root->Item(ii)); --#endif - } - m_FlagsPG->Thaw(); - } // DoFillOptions -@@ -2118,11 +2114,7 @@ - CompilerFactory::SetDefaultCompiler(idx); - wxString msg; - Compiler* compiler = CompilerFactory::GetDefaultCompiler(); -- #if wxCHECK_VERSION(3, 0, 0) -- msg.Printf(_("%s is now selected as the default compiler for new projects"), compiler ? compiler->GetName().wx_str() : _("[invalid]").wx_str()); -- #else -- msg.Printf(_("%s is now selected as the default compiler for new projects"), compiler ? compiler->GetName().c_str() : _("[invalid]")); -- #endif -+ msg.Printf(_("%s is now selected as the default compiler for new projects"), compiler ? compiler->GetName() : _("[invalid]")); - cbMessageBox(msg); - } // OnSetDefaultCompilerClick - -Index: src/sdk/templatemanager.cpp -=================================================================== ---- a/src/sdk/templatemanager.cpp (revision 12579) -+++ b/src/sdk/templatemanager.cpp (revision 12580) -@@ -186,11 +186,7 @@ - ++count; - } - else -- #if wxCHECK_VERSION(3, 0, 0) - Manager::Get()->GetLogManager()->DebugLog(F(_T("Failed copying %s to %s"), src.wx_str(), dst.wx_str())); -- #else -- Manager::Get()->GetLogManager()->DebugLog(F(_T("Failed copying %s to %s"), src.c_str(), dst.c_str())); -- #endif - } - if (count != total_count) - cbMessageBox(_("Some files could not be loaded with the template..."), _("Error"), wxICON_ERROR); -@@ -303,21 +299,13 @@ - { - wxString src = (*it)->file.GetFullPath(); - wxString dst = templ + (*it)->relativeToCommonTopLevelPath; -- #if wxCHECK_VERSION(3, 0, 0) - Manager::Get()->GetLogManager()->DebugLog(F(_T("Copying %s to %s"), src.wx_str(), dst.wx_str())); -- #else -- Manager::Get()->GetLogManager()->DebugLog(F(_T("Copying %s to %s"), src.c_str(), dst.c_str())); -- #endif - if (!CreateDirRecursively(dst)) - Manager::Get()->GetLogManager()->DebugLog(_T("Failed creating directory for ") + dst); - if (wxCopyFile(src, dst, true)) - ++count; - else -- #if wxCHECK_VERSION(3, 0, 0) - Manager::Get()->GetLogManager()->DebugLog(F(_T("Failed copying %s to %s"), src.wx_str(), dst.wx_str())); -- #else -- Manager::Get()->GetLogManager()->DebugLog(F(_T("Failed copying %s to %s"), src.c_str(), dst.c_str())); -- #endif - } - - // cbProject doesn't have a GetRelativeToCommonTopLevelPath() function, so we simulate it here -Index: src/src/associations.cpp -=================================================================== ---- a/src/src/associations.cpp (revision 12579) -+++ b/src/src/associations.cpp (revision 12580) -@@ -201,11 +201,7 @@ - if (key.Exists()) - { - wxString s; -- #if wxCHECK_VERSION(3, 0, 0) - if (key.QueryValue(wxEmptyString, s) && s.StartsWith(_T("CodeBlocks"))) -- #else -- if (key.QueryValue(NULL, s) && s.StartsWith(_T("CodeBlocks"))) -- #endif - key.DeleteSelf(); - } - -Index: src/src/dlgabout.cpp -=================================================================== ---- a/src/src/dlgabout.cpp (revision 12579) -+++ b/src/src/dlgabout.cpp (revision 12580) -@@ -20,9 +20,7 @@ - #include - #include - #include -- #if wxCHECK_VERSION(3, 0, 0) -- #include -- #endif // wxCHECK_VERSION -+ #include - - #include "licenses.h" - #include "configmanager.h" -@@ -146,15 +144,11 @@ - wxTextCtrl *txtLicense = XRCCTRL(*this, "txtLicense", wxTextCtrl); - txtLicense->SetValue(LICENSE_GPL); - --#if wxCHECK_VERSION(3, 0, 0) - const wxVersionInfo scintillaVersion = wxScintilla::GetLibraryVersionInfo(); - const wxString scintillaStr = wxString::Format(wxT("%d.%d.%d"), - scintillaVersion.GetMajor(), - scintillaVersion.GetMinor(), - scintillaVersion.GetMicro()); --#else -- const wxString scintillaStr = wxSCINTILLA_VERSION; --#endif // wxCHECK_VERSION - - struct Item - { -@@ -218,9 +212,7 @@ - information += wxT(": ") + item.value + wxT("\n"); - } - --#if wxCHECK_VERSION(3, 0, 0) - information += wxT("\n") + wxGetLibraryVersionInfo().GetDescription(); --#endif // wxCHECK_VERSION(3, 0, 0) - - wxTextCtrl *txtInformation = XRCCTRL(*this, "txtInformation", wxTextCtrl); - txtInformation->SetValue(information); -Index: src/src/main.cpp -=================================================================== ---- a/src/src/main.cpp (revision 12579) -+++ b/src/src/main.cpp (revision 12580) -@@ -2075,11 +2075,7 @@ - { - if (!items[i]->IsCheckable()) - continue; --#if wxCHECK_VERSION(3, 0, 0) - items[i]->Check(items[i]->GetItemLabel().IsSameAs(name)); --#else -- items[i]->Check(items[i]->GetText().IsSameAs(name)); --#endif - } - - if (!m_LastLayoutIsTemp) -@@ -2401,12 +2397,7 @@ - break; - - default: // default style -- #if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) -- target->SetArtProvider(new NbStyleGTK()); -- #else - target->SetArtProvider(new wxAuiDefaultTabArt()); -- #endif -- break; - } - - target->SetTabCtrlHeight(-1); -@@ -4801,13 +4792,9 @@ - - if (Manager::Get()->GetEditorManager() && event.GetEditor() == Manager::Get()->GetEditorManager()->GetActiveEditor()) - { --#if wxCHECK_VERSION(3, 0, 0) - // Execute the code to update the status bar outside of the paint event for scintilla. - // Executing this function directly in the event handler causes redraw problems on Windows. - CallAfter(&MainFrame::DoUpdateStatusBar); --#else -- DoUpdateStatusBar(); --#endif // defined(__wxMSW__) && wxCHECK_VERSION(3, 0, 0) - } - - event.Skip(); -Index: src/src/notebookstyles.cpp -=================================================================== ---- a/src/src/notebookstyles.cpp (revision 12579) -+++ b/src/src/notebookstyles.cpp (revision 12580) -@@ -13,14 +13,6 @@ - #include "prep.h" - #include "notebookstyles.h" - --#if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) -- #define GSocket GLibSocket -- #include -- #undef GSocket -- #include -- #include --#endif -- - #include - #include - -@@ -42,15 +34,9 @@ - { - NbStyleVC71* clone = new NbStyleVC71(); - --#if wxCHECK_VERSION(3, 0, 0) - clone->SetNormalFont(m_normalFont); - clone->SetSelectedFont(m_selectedFont); - clone->SetMeasuringFont(m_measuringFont); --#else -- clone->SetNormalFont(m_normal_font); -- clone->SetSelectedFont(m_selected_font); -- clone->SetMeasuringFont(m_measuring_font); --#endif - - return clone; - } -@@ -75,11 +61,7 @@ - close_button_state, - x_extent); - --#if wxCHECK_VERSION(3, 0, 0) - wxCoord tab_height = m_tabCtrlHeight - 3; --#else -- wxCoord tab_height = m_tab_ctrl_height - 3; --#endif - wxCoord tab_width = tab_size.x; - wxCoord tab_x = in_rect.x; - wxCoord tab_y = in_rect.y + in_rect.height - tab_height; -@@ -166,17 +148,10 @@ - wxCoord textx; - wxCoord texty; - if (page.active) --#if wxCHECK_VERSION(3, 0, 0) - dc.SetFont(m_selectedFont); --#else -- dc.SetFont(m_selected_font); --#endif - else --#if wxCHECK_VERSION(3, 0, 0) - dc.SetFont(m_normalFont); --#else -- dc.SetFont(m_normal_font); --#endif -+ - dc.GetTextExtent(caption, &textx, &texty); - // draw tab text - dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); -@@ -186,21 +161,12 @@ - // draw 'x' on tab (if enabled) - if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) - { --#if wxCHECK_VERSION(3, 0, 0) - int close_button_width = m_activeCloseBmp.GetWidth(); - wxBitmap bmp = m_disabledCloseBmp; --#else -- int close_button_width = m_active_close_bmp.GetWidth(); -- wxBitmap bmp = m_disabled_close_bmp; --#endif - - if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) || - (close_button_state == wxAUI_BUTTON_STATE_PRESSED)) --#if wxCHECK_VERSION(3, 0, 0) - bmp = m_activeCloseBmp; --#else -- bmp = m_active_close_bmp; --#endif - - wxRect rect(tab_x + tab_width - close_button_width - 3, - drawn_tab_yoff + (drawn_tab_height / 2) - (bmp.GetHeight() / 2), -@@ -227,11 +193,7 @@ - // m_requested_tabctrl_height = -1; - // m_tab_ctrl_height = -1; - wxClientDC dc(wnd); --#if wxCHECK_VERSION(3, 0, 0) - dc.SetFont(m_measuringFont); --#else -- dc.SetFont(m_measuring_font); --#endif - int x_ext = 0; - wxSize s = GetTabSize(dc, wnd, wxT("ABCDEFGHIj"), wxNullBitmap, true, - wxAUI_BUTTON_STATE_HIDDEN, &x_ext); -@@ -246,15 +208,9 @@ - { - NbStyleFF2* clone = new NbStyleFF2(); - --#if wxCHECK_VERSION(3, 0, 0) - clone->SetNormalFont(m_normalFont); - clone->SetSelectedFont(m_selectedFont); - clone->SetMeasuringFont(m_measuringFont); --#else -- clone->SetNormalFont(m_normal_font); -- clone->SetSelectedFont(m_selected_font); -- clone->SetMeasuringFont(m_measuring_font); --#endif - - return clone; - } -@@ -272,11 +228,7 @@ - wxSize tab_size = GetTabSize(dc, wnd, page.caption, page.bitmap, - page.active, close_button_state, x_extent); - --#if wxCHECK_VERSION(3, 0, 0) - wxCoord tab_height = m_tabCtrlHeight - 2; --#else -- wxCoord tab_height = m_tab_ctrl_height - 2; --#endif - wxCoord tab_width = tab_size.x; - wxCoord tab_x = in_rect.x; - wxCoord tab_y = in_rect.y + in_rect.height - tab_height; -@@ -360,17 +312,10 @@ - wxCoord textx; - wxCoord texty; - if (page.active) --#if wxCHECK_VERSION(3, 0, 0) - dc.SetFont(m_selectedFont); --#else -- dc.SetFont(m_selected_font); --#endif - else --#if wxCHECK_VERSION(3, 0, 0) - dc.SetFont(m_normalFont); --#else -- dc.SetFont(m_normal_font); --#endif -+ - dc.GetTextExtent(caption, &textx, &texty); - // draw tab text - dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); -@@ -380,21 +325,12 @@ - // draw 'x' on tab (if enabled) - if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) - { --#if wxCHECK_VERSION(3, 0, 0) - int close_button_width = m_activeCloseBmp.GetWidth(); - wxBitmap bmp = m_disabledCloseBmp; --#else -- int close_button_width = m_active_close_bmp.GetWidth(); -- wxBitmap bmp = m_disabled_close_bmp; --#endif - - if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) || - (close_button_state == wxAUI_BUTTON_STATE_PRESSED)) --#if wxCHECK_VERSION(3, 0, 0) - bmp = m_activeCloseBmp; --#else -- bmp = m_active_close_bmp; --#endif - - wxRect rect(tab_x + tab_width - close_button_width - 3, - drawn_tab_yoff + (drawn_tab_height / 2) - (bmp.GetHeight() / 2), -@@ -421,533 +357,9 @@ - // m_requested_tabctrl_height = -1; - // m_tab_ctrl_height = -1; - wxClientDC dc(wnd); --#if wxCHECK_VERSION(3, 0, 0) - dc.SetFont(m_measuringFont); --#else -- dc.SetFont(m_measuring_font); --#endif - int x_ext = 0; - wxSize s = GetTabSize(dc, wnd, wxT("ABCDEFGHIj"), wxNullBitmap, true, - wxAUI_BUTTON_STATE_HIDDEN, &x_ext); - return s.y + 6; - } -- --#if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) -- --namespace --{ -- --static GtkWidget *g_window = nullptr; --static GtkWidget *g_container = nullptr; --static GtkWidget *g_notebook = nullptr; --static GtkWidget *g_button = nullptr; --static int s_CloseIconSize = 16; // default size -- --static void setup_widget_prototype(GtkWidget* widget) --{ -- if (!g_window) -- { -- g_window = gtk_window_new(GTK_WINDOW_POPUP); -- gtk_widget_realize(g_window); -- } -- if (!g_container) -- { -- g_container = gtk_fixed_new(); -- gtk_container_add(GTK_CONTAINER(g_window), g_container); -- } -- -- gtk_container_add(GTK_CONTAINER(g_container), widget); -- gtk_widget_realize(widget); --} -- --static GtkStyle * get_style_button() --{ -- if (!g_button) -- { -- g_button = gtk_button_new(); -- setup_widget_prototype(g_button); -- } -- return gtk_widget_get_style(g_button); --} -- --static GtkStyle * get_style_notebook() --{ -- if (!g_notebook) -- { -- g_notebook = gtk_notebook_new(); -- setup_widget_prototype(g_notebook); -- } -- return gtk_widget_get_style(g_notebook); --} -- --} -- --NbStyleGTK::NbStyleGTK(): -- m_Xthickness(0), -- m_Ythickness(0), -- m_TabHBorder(0), -- m_TabVBorder(0) -- --{ --} -- --wxAuiTabArt* NbStyleGTK::Clone() --{ -- NbStyleGTK* clone = new NbStyleGTK(); -- --#if wxCHECK_VERSION(3, 0, 0) -- clone->SetNormalFont(m_normalFont); -- clone->SetSelectedFont(m_normalFont); -- clone->SetMeasuringFont(m_normalFont); --#else -- clone->SetNormalFont(m_normal_font); -- clone->SetSelectedFont(m_normal_font); -- clone->SetMeasuringFont(m_normal_font); --#endif -- -- return clone; --} -- --void NbStyleGTK::DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect) --{ -- GtkStyle* style_notebook = get_style_notebook(); -- GtkNotebook* notebook = GTK_NOTEBOOK (g_notebook); -- -- // if one of the parameters have changed, the height needs to be recalculated, so we force it, -- if(m_Xthickness != style_notebook->xthickness || -- m_Ythickness != style_notebook->ythickness || -- m_TabVBorder != notebook->tab_vborder || -- m_TabHBorder != notebook->tab_hborder) -- { -- m_Xthickness = style_notebook->xthickness; -- m_Ythickness = style_notebook->ythickness; -- m_TabVBorder = notebook->tab_vborder; -- m_TabHBorder = notebook->tab_hborder; -- wxAuiNotebook* nb = nullptr; -- if(wnd) -- nb = (cbAuiNotebook*)wnd->GetParent(); -- if(nb) -- nb->SetTabCtrlHeight(-1); -- } --#if wxCHECK_VERSION(3, 0, 0) -- wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); -- GdkWindow* pWin = impldc->GetGDKWindow(); --#else -- GdkWindow* pWin = dc.GetGDKWindow(); --#endif -- gtk_style_apply_default_background(style_notebook, pWin, 1, GTK_STATE_NORMAL, nullptr, -- rect.x, rect.y, rect.width, rect.height); --} -- --void ButtonStateAndShadow(int button_state, GtkStateType &state, GtkShadowType &shadow) --{ -- -- if (button_state & wxAUI_BUTTON_STATE_DISABLED) -- { -- state = GTK_STATE_INSENSITIVE; -- shadow = GTK_SHADOW_ETCHED_IN; -- } -- else if (button_state & wxAUI_BUTTON_STATE_HOVER) -- { -- state = GTK_STATE_PRELIGHT; -- shadow = GTK_SHADOW_OUT; -- } -- else if (button_state & wxAUI_BUTTON_STATE_PRESSED) -- { -- state = GTK_STATE_ACTIVE; -- shadow = GTK_SHADOW_IN; -- } -- else -- { -- state = GTK_STATE_NORMAL; -- shadow = GTK_SHADOW_OUT; -- } --} -- --wxRect DrawCloseButton(wxDC& dc, -- GtkWidget *widget, -- int button_state, -- wxRect const &in_rect, -- int orientation, -- GdkRectangle* clipRect) --{ -- GtkStyle *style_button = get_style_button(); -- int xthickness = style_button->xthickness; -- int ythickness = style_button->ythickness; -- -- wxBitmap bmp; -- bmp.SetPixbuf(gtk_widget_render_icon(widget, GTK_STOCK_CLOSE, GTK_ICON_SIZE_SMALL_TOOLBAR, "tab")); -- -- if(bmp.GetWidth() != s_CloseIconSize || bmp.GetHeight() != s_CloseIconSize) -- { -- wxImage img = bmp.ConvertToImage(); -- img.Rescale(s_CloseIconSize, s_CloseIconSize); -- bmp = img; -- } -- -- int button_size = s_CloseIconSize + 2 * xthickness; -- -- wxRect out_rect; -- -- if (orientation == wxLEFT) -- out_rect.x = in_rect.x - ythickness; -- else -- out_rect.x = in_rect.x + in_rect.width - button_size - ythickness; -- -- out_rect.y = in_rect.y + (in_rect.height - button_size) / 2; -- out_rect.width = button_size; -- out_rect.height = button_size; -- --#if wxCHECK_VERSION(3, 0, 0) -- wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); -- GdkWindow* pWin = impldc->GetGDKWindow(); --#else -- GdkWindow* pWin = dc.GetGDKWindow(); --#endif -- -- if (button_state == wxAUI_BUTTON_STATE_HOVER) -- { -- gtk_paint_box(style_button, pWin, -- GTK_STATE_PRELIGHT, GTK_SHADOW_OUT, clipRect, widget, "button", -- out_rect.x, out_rect.y, out_rect.width, out_rect.height); -- } -- else if (button_state == wxAUI_BUTTON_STATE_PRESSED) -- { -- gtk_paint_box(style_button, pWin, -- GTK_STATE_ACTIVE, GTK_SHADOW_IN, clipRect, widget, "button", -- out_rect.x, out_rect.y, out_rect.width, out_rect.height); -- } -- -- -- dc.DrawBitmap(bmp, out_rect.x + xthickness, out_rect.y + ythickness, true); -- -- return out_rect; --} -- --void NbStyleGTK::DrawTab(wxDC& dc, wxWindow* wnd, const wxAuiNotebookPage& page, -- const wxRect& in_rect, int close_button_state, wxRect* out_tab_rect, -- wxRect* out_button_rect, int* x_extent) --{ -- GtkWidget *widget = wnd->GetHandle(); -- GtkStyle *style_notebook = get_style_notebook(); -- -- wxRect const &window_rect = wnd->GetRect(); -- -- int focus_width = 0; -- -- gtk_widget_style_get(g_notebook, -- "focus-line-width", &focus_width, -- NULL); -- -- int tab_pos; -- if (m_flags &wxAUI_NB_BOTTOM) -- tab_pos = wxAUI_NB_BOTTOM; -- else //if (m_flags & wxAUI_NB_TOP) {} -- tab_pos = wxAUI_NB_TOP; -- -- // TODO: else if (m_flags &wxAUI_NB_LEFT) {} -- // TODO: else if (m_flags &wxAUI_NB_RIGHT) {} -- -- // figure out the size of the tab -- wxSize tab_size = GetTabSize(dc, wnd, page.caption, page.bitmap, -- page.active, close_button_state, x_extent); -- -- wxRect tab_rect = in_rect; -- tab_rect.width = tab_size.x; -- tab_rect.height = tab_size.y; -- tab_rect.y += 2 * m_TabHBorder; -- -- if (page.active) -- tab_rect.height += 2 * m_TabHBorder; --#if wxCHECK_VERSION(3, 0, 0) -- // if no bitmap is set, we need a tiny correction -- if (! page.bitmap.IsOk()) -- tab_rect.height += 1; --#endif -- -- int gap_rect_height = 6 * m_TabHBorder; -- int gap_rect_x = 1, gap_start = 0, gap_width = 0; -- int gap_rect_y = tab_rect.y - gap_rect_height; -- int gap_rect_width = window_rect.width; -- -- switch (tab_pos) -- { -- case wxAUI_NB_TOP: -- tab_rect.y -= 2 * m_TabHBorder; -- if (!page.active) -- tab_rect.y += 2 * m_TabHBorder; -- gap_rect_y = tab_rect.y + tab_rect.height - m_TabHBorder / 2; -- // fall through -- case wxAUI_NB_BOTTOM: -- gap_start = tab_rect.x - m_TabVBorder / 2; -- gap_width = tab_rect.width; -- break; -- default: -- break; -- } -- tab_rect.y += m_TabHBorder / 2; -- gap_rect_y += m_TabHBorder / 2; -- -- int padding = focus_width + m_TabHBorder; -- -- int clip_width = tab_rect.width; -- if (tab_rect.x + tab_rect.width > in_rect.x + in_rect.width) -- clip_width = (in_rect.x + in_rect.width) - tab_rect.x; -- -- dc.SetClippingRegion(tab_rect.x, tab_rect.y - m_TabVBorder, clip_width, tab_rect.height + m_TabVBorder); -- -- GdkRectangle area; -- area.x = tab_rect.x - m_TabVBorder; -- area.y = tab_rect.y - 2 * m_TabHBorder; -- area.width = clip_width + m_TabVBorder; -- area.height = tab_rect.height + 2 * m_TabHBorder; -- --#if wxCHECK_VERSION(3, 0, 0) -- wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); -- GdkWindow* pWin = impldc->GetGDKWindow(); --#else -- GdkWindow* pWin = dc.GetGDKWindow(); --#endif -- -- if (tab_pos == wxAUI_NB_BOTTOM) -- { -- if (page.active) -- { -- gtk_paint_box_gap(style_notebook, pWin, GTK_STATE_NORMAL, GTK_SHADOW_OUT, -- NULL, widget, "notebook", -- gap_rect_x, gap_rect_y, -- gap_rect_width, gap_rect_height, -- GTK_POS_BOTTOM, gap_start , gap_width); -- } -- gtk_paint_extension(style_notebook, pWin, -- page.active ? GTK_STATE_NORMAL : GTK_STATE_ACTIVE, GTK_SHADOW_OUT, -- &area, widget, "tab", -- tab_rect.x, tab_rect.y, -- tab_rect.width, tab_rect.height, -- GTK_POS_TOP); -- } -- else -- { -- if (page.active) -- { -- gtk_paint_box_gap(style_notebook, pWin, GTK_STATE_NORMAL, GTK_SHADOW_OUT, -- NULL, widget, "notebook", -- gap_rect_x, gap_rect_y, -- gap_rect_width, gap_rect_height, -- GTK_POS_TOP, gap_start , gap_width); -- } -- gtk_paint_extension(style_notebook, pWin, -- page.active ? GTK_STATE_NORMAL : GTK_STATE_ACTIVE, GTK_SHADOW_OUT, -- &area, widget, "tab", -- tab_rect.x, tab_rect.y, -- tab_rect.width, tab_rect.height, -- GTK_POS_BOTTOM); -- } -- -- wxCoord textX = tab_rect.x + padding + m_Xthickness; -- -- int bitmap_offset = 0; -- if (page.bitmap.IsOk()) -- { -- bitmap_offset = textX; -- -- // draw bitmap -- int bitmapY = tab_rect.y +(tab_rect.height - page.bitmap.GetHeight()) / 2; -- if(!page.active) -- { -- if (tab_pos == wxAUI_NB_TOP) -- bitmapY += m_Ythickness / 2; -- else -- bitmapY -= m_Ythickness / 2; -- } -- dc.DrawBitmap(page.bitmap, -- bitmap_offset, -- bitmapY, -- true); -- -- textX += page.bitmap.GetWidth() + padding; -- } -- -- wxCoord textW, textH, textY; -- --#if wxCHECK_VERSION(3, 0, 0) -- dc.SetFont(m_normalFont); --#else -- dc.SetFont(m_normal_font); --#endif -- dc.GetTextExtent(page.caption, &textW, &textH); -- textY = tab_rect.y + (tab_rect.height - textH) / 2; -- if(!page.active) -- { -- if (tab_pos == wxAUI_NB_TOP) -- textY += m_Ythickness / 2; -- else -- textY -= m_Ythickness / 2; -- } -- -- // draw tab text -- GdkColor text_colour = page.active ? style_notebook->fg[GTK_STATE_NORMAL] : style_notebook->fg[GTK_STATE_ACTIVE]; -- dc.SetTextForeground(wxColor(text_colour)); -- GdkRectangle focus_area; -- -- int padding_focus = padding - focus_width; -- focus_area.x = tab_rect.x + padding_focus; -- focus_area.y = textY - focus_width; -- focus_area.width = tab_rect.width - 2 * padding_focus; -- focus_area.height = textH + 2 * focus_width; -- -- if(page.active && (wnd->FindFocus() == wnd) && focus_area.x <= (area.x + area.width)) -- { -- // clipping seems not to work here, so we we have to recalc the focus-area manually -- if((focus_area.x + focus_area.width) > (area.x + area.width)) -- focus_area.width = area.x + area.width - focus_area.x + focus_width - m_TabVBorder; -- gtk_paint_focus (style_notebook, pWin, -- GTK_STATE_ACTIVE, NULL, widget, "tab", -- focus_area.x, focus_area.y, focus_area.width, focus_area.height); -- } -- -- dc.DrawText(page.caption, textX, textY); -- -- // draw close-button on tab (if enabled) -- if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) -- { -- wxRect rect(tab_rect.x, tab_rect.y, tab_rect.width - m_Xthickness, tab_rect.height); -- if(!page.active) -- { -- if (tab_pos == wxAUI_NB_TOP) -- rect.y += m_Ythickness / 2; -- else -- rect.y -= m_Ythickness / 2; -- } -- *out_button_rect = DrawCloseButton(dc, widget, close_button_state, rect, wxRIGHT, &area); -- } -- -- tab_rect.width = std::min(tab_rect.width, clip_width); -- *out_tab_rect = tab_rect; -- -- dc.DestroyClippingRegion(); --} -- --wxRect DrawSimpleArrow(wxDC& dc, -- GtkWidget *widget, -- int button_state, -- wxRect const &in_rect, -- int orientation, -- GtkArrowType arrow_type) --{ -- int scroll_arrow_hlength, scroll_arrow_vlength; -- gtk_widget_style_get(widget, -- "scroll-arrow-hlength", &scroll_arrow_hlength, -- "scroll-arrow-vlength", &scroll_arrow_vlength, -- NULL); -- -- GtkStateType state; -- GtkShadowType shadow; -- ButtonStateAndShadow(button_state, state, shadow); -- -- wxRect out_rect; -- -- if (orientation == wxLEFT) -- out_rect.x = in_rect.x; -- else -- out_rect.x = in_rect.x + in_rect.width - scroll_arrow_hlength; -- out_rect.y = (in_rect.y + in_rect.height - 3 * get_style_notebook()->ythickness - scroll_arrow_vlength) / 2; -- out_rect.width = scroll_arrow_hlength; -- out_rect.height = scroll_arrow_vlength; -- --#if wxCHECK_VERSION(3, 0, 0) -- wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); -- GdkWindow* pWin = impldc->GetGDKWindow(); --#else -- GdkWindow* pWin = dc.GetGDKWindow(); --#endif -- gtk_paint_arrow (get_style_button(), pWin, state, shadow, nullptr, widget, "notebook", -- arrow_type, TRUE, out_rect.x, out_rect.y, out_rect.width, out_rect.height); -- -- return out_rect; --} -- --void NbStyleGTK::DrawButton(wxDC& dc, wxWindow* wnd, -- const wxRect& in_rect, -- int bitmap_id, -- int button_state, -- int orientation, -- wxRect* out_rect) --{ -- GtkWidget *widget = wnd->GetHandle(); -- wxRect rect = in_rect; -- if (m_flags &wxAUI_NB_BOTTOM) -- rect.y += 2 * get_style_button()->ythickness; -- -- switch (bitmap_id) -- { -- case wxAUI_BUTTON_CLOSE: -- rect.y -= 2 * get_style_button()->ythickness; -- rect = DrawCloseButton(dc, widget, button_state, rect, orientation, NULL); -- break; -- -- case wxAUI_BUTTON_LEFT: -- rect = DrawSimpleArrow(dc, widget, button_state, rect, orientation, GTK_ARROW_LEFT); -- break; -- -- case wxAUI_BUTTON_RIGHT: -- rect = DrawSimpleArrow(dc, widget, button_state, rect, orientation, GTK_ARROW_RIGHT); -- break; -- -- case wxAUI_BUTTON_WINDOWLIST: -- { -- rect.height -= 4 * get_style_button()->ythickness; -- rect.width = rect.height; -- rect.x = in_rect.x + in_rect.width - rect.width; -- -- if (button_state == wxAUI_BUTTON_STATE_HOVER) -- wxRendererNative::Get().DrawComboBoxDropButton(wnd, dc, rect, wxCONTROL_CURRENT); -- else if (button_state == wxAUI_BUTTON_STATE_PRESSED) -- wxRendererNative::Get().DrawComboBoxDropButton(wnd, dc, rect, wxCONTROL_PRESSED); -- else -- wxRendererNative::Get().DrawDropArrow(wnd, dc, rect); -- } -- break; -- -- default: -- break; -- } -- -- *out_rect = rect; --} -- -- --int NbStyleGTK::GetBestTabCtrlSize(wxWindow* wnd, -- const wxAuiNotebookPageArray& pages, -- const wxSize& required_bmp_size) --{ --#if wxCHECK_VERSION(3, 0, 0) -- SetMeasuringFont(m_normalFont); -- SetSelectedFont(m_normalFont); --#else -- SetMeasuringFont(m_normal_font); -- SetSelectedFont(m_normal_font); --#endif -- int tab_height = 3 * get_style_notebook()->ythickness + wxAuiDefaultTabArt::GetBestTabCtrlSize(wnd, pages, required_bmp_size); -- return tab_height; --} -- --wxSize NbStyleGTK::GetTabSize(wxDC& dc, -- wxWindow* wnd, -- const wxString& caption, -- const wxBitmap& bitmap, -- bool active, -- int close_button_state, -- int* x_extent) --{ -- wxSize s = wxAuiDefaultTabArt::GetTabSize(dc, wnd, caption, bitmap, active, close_button_state, x_extent); -- -- int overlap = 0; -- gtk_widget_style_get (wnd->GetHandle(), -- "focus-line-width", &overlap, -- NULL); -- *x_extent -= overlap; -- return s; --} -- --#endif // #if defined(__WXGTK__) && (USE_GTK_NOTEBOOK) && !wxCHECK_VERSION(3, 0, 0) -Index: src/src/projectmanagerui.cpp -=================================================================== ---- a/src/src/projectmanagerui.cpp (revision 12579) -+++ b/src/src/projectmanagerui.cpp (revision 12580) -@@ -1875,11 +1875,7 @@ - { - size_t operator()(const wxString& s) const - { --#if wxCHECK_VERSION(3, 0, 0) - return std::hash()(s.ToStdWstring()); --#else -- return std::hash()(s.wc_str()); --#endif // wxCHECK_VERSION - } - }; - diff --git a/srcpkgs/codeblocks/patches/000.r12707.patch b/srcpkgs/codeblocks/patches/000.r12707.patch deleted file mode 100644 index bca974fbe57..00000000000 --- a/srcpkgs/codeblocks/patches/000.r12707.patch +++ /dev/null @@ -1,120 +0,0 @@ -Index: src/src/notebookstyles.cpp -=================================================================== ---- a/src/src/notebookstyles.cpp (revision 12706) -+++ b/src/src/notebookstyles.cpp (revision 12707) -@@ -124,8 +124,16 @@ - if (page.bitmap.IsOk()) - { - bitmap_offset = tab_x + 8; -+ // draw bitmap -+#if wxCHECK_VERSION(3, 1, 6) -+ const wxBitmap bmp(page.bitmap.GetBitmapFor(wnd)); -+ dc.DrawBitmap(bmp, -+ bitmap_offset, -+ drawn_tab_yoff + (drawn_tab_height/2) - (bmp.GetHeight()/2), -+ true); - -- // draw bitmap -+ text_offset = bitmap_offset + bmp.GetWidth(); -+#else - dc.DrawBitmap(page.bitmap, - bitmap_offset, - drawn_tab_yoff + (drawn_tab_height/2) - (page.bitmap.GetHeight()/2), -@@ -132,6 +140,7 @@ - true); - - text_offset = bitmap_offset + page.bitmap.GetWidth(); -+#endif - text_offset += 3; // bitmap padding - } - else -@@ -161,13 +170,23 @@ - // draw 'x' on tab (if enabled) - if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) - { -- int close_button_width = m_activeCloseBmp.GetWidth(); -- wxBitmap bmp = m_disabledCloseBmp; -+ wxBitmap bmp; - -+#if wxCHECK_VERSION(3, 1, 6) - if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) || - (close_button_state == wxAUI_BUTTON_STATE_PRESSED)) -+ bmp = m_activeCloseBmp.GetBitmapFor(wnd); -+ else -+ bmp = m_disabledCloseBmp.GetBitmapFor(wnd); -+#else -+ if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) || -+ (close_button_state == wxAUI_BUTTON_STATE_PRESSED)) - bmp = m_activeCloseBmp; -+ else -+ bmp = m_disabledCloseBmp; -+#endif - -+ const int close_button_width = bmp.GetWidth(); - wxRect rect(tab_x + tab_width - close_button_width - 3, - drawn_tab_yoff + (drawn_tab_height / 2) - (bmp.GetHeight() / 2), - close_button_width, tab_height); -@@ -285,11 +304,20 @@ - int text_offset = tab_x + 8; - - int bitmap_offset = 0; -+ - if (page.bitmap.IsOk()) - { - bitmap_offset = tab_x + 8; -+ // draw bitmap -+#if wxCHECK_VERSION(3, 1, 6) -+ const wxBitmap bmp(page.bitmap.GetBitmapFor(wnd)); -+ dc.DrawBitmap(bmp, -+ bitmap_offset, -+ drawn_tab_yoff + (drawn_tab_height/2) - (bmp.GetHeight()/2), -+ true); - -- // draw bitmap -+ text_offset = bitmap_offset + bmp.GetWidth(); -+#else - dc.DrawBitmap(page.bitmap, - bitmap_offset, - drawn_tab_yoff + (drawn_tab_height/2) - (page.bitmap.GetHeight()/2), -@@ -296,6 +324,7 @@ - true); - - text_offset = bitmap_offset + page.bitmap.GetWidth(); -+#endif - text_offset += 3; // bitmap padding - } - else -@@ -303,7 +332,6 @@ - text_offset = tab_x + 8; - } - -- - // if the caption is empty, measure some temporary text - wxString caption = page.caption; - if (caption.empty()) -@@ -325,13 +353,23 @@ - // draw 'x' on tab (if enabled) - if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) - { -- int close_button_width = m_activeCloseBmp.GetWidth(); -- wxBitmap bmp = m_disabledCloseBmp; -+ wxBitmap bmp; - -+#if wxCHECK_VERSION(3, 1, 6) - if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) || - (close_button_state == wxAUI_BUTTON_STATE_PRESSED)) -+ bmp = m_activeCloseBmp.GetBitmapFor(wnd); -+ else -+ bmp = m_disabledCloseBmp.GetBitmapFor(wnd); -+#else -+ if ((close_button_state == wxAUI_BUTTON_STATE_HOVER) || -+ (close_button_state == wxAUI_BUTTON_STATE_PRESSED)) - bmp = m_activeCloseBmp; -+ else -+ bmp = m_disabledCloseBmp; -+#endif - -+ const int close_button_width = bmp.GetWidth(); - wxRect rect(tab_x + tab_width - close_button_width - 3, - drawn_tab_yoff + (drawn_tab_height / 2) - (bmp.GetHeight() / 2), - close_button_width, tab_height); diff --git a/srcpkgs/codeblocks/patches/codeblocks-gcc11.patch b/srcpkgs/codeblocks/patches/codeblocks-gcc11.patch deleted file mode 100644 index 760a8e1ec3a..00000000000 --- a/srcpkgs/codeblocks/patches/codeblocks-gcc11.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/plugins/openfileslist/openfileslistplugin.h b/src/plugins/openfileslist/openfileslistplugin.h -index 7fd7a95..87b08ee 100644 ---- a/src/plugins/openfileslist/openfileslistplugin.h -+++ b/src/plugins/openfileslist/openfileslistplugin.h -@@ -23,7 +23,7 @@ struct TargetFilesData - // Functor for the std::set predicate to sort the opened editor files according to their tab order - struct compareLess - { -- bool operator()(const ProjectFile* lhs, const ProjectFile* rhs) { return lhs->editorTabPos < rhs->editorTabPos; } -+ bool operator()(const ProjectFile* lhs, const ProjectFile* rhs) const { return lhs->editorTabPos < rhs->editorTabPos; } - }; - typedef std::set OpenFilesSet; - ProjectFile* activeFile; diff --git a/srcpkgs/codeblocks/patches/correct-file-access.patch b/srcpkgs/codeblocks/patches/correct-file-access.patch deleted file mode 100644 index e73d12e3066..00000000000 --- a/srcpkgs/codeblocks/patches/correct-file-access.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/src/plugins/contrib/FileManager/FileExplorer.cpp -+++ b/src/plugins/contrib/FileManager/FileExplorer.cpp -@@ -812,7 +812,7 @@ void FileExplorer::WriteConfig() - wxString ref=wxString::Format(_T("FileExplorer/RootList/I%i"),i); - cfg->Write(ref, m_Loc->GetString(m_favdirs.GetCount()+i)); - } -- count=static_cast(m_Loc->GetCount()); -+ count=static_cast(m_WildCards->GetCount()); - cfg->Write(_T("FileExplorer/WildMask/Len"), count); - for(int i=0;iGetFullPath(ti).c_str()); - m_wildcard=wxString(m_fe->m_WildCards->GetValue().c_str()); - m_vcs_type=wxString(m_fe->m_VCS_Type->GetLabel().c_str()); -- m_vcs_commit_string=wxString(m_fe->m_VCS_Control->GetString(m_fe->m_VCS_Control->GetSelection()).c_str()); -+ if (m_fe->m_VCS_Control->GetSelection() == wxNOT_FOUND) -+ { -+ m_vcs_commit_string = ""; -+ } -+ else -+ { -+ m_vcs_commit_string=wxString(m_fe->m_VCS_Control->GetString(m_fe->m_VCS_Control->GetSelection()).c_str()); -+ } - m_vcs_changes_only = m_fe->m_VCS_ChangesOnly->IsChecked(); - if (m_vcs_type != wxEmptyString) - m_repo_path=wxString(m_fe->GetRootFolder().c_str()); diff --git a/srcpkgs/codeblocks/patches/cross-autorevision.patch b/srcpkgs/codeblocks/patches/cross-autorevision.patch index 7d3ef3acfd2..4e5a43305eb 100644 --- a/srcpkgs/codeblocks/patches/cross-autorevision.patch +++ b/srcpkgs/codeblocks/patches/cross-autorevision.patch @@ -13,7 +13,7 @@ --- a/src/build_tools/autorevision/Makefile.in +++ b/src/build_tools/autorevision/Makefile.in -@@ -240,17 +240,17 @@ CB_SQUIRREL_CFLAGS = @CB_SQUIRREL_CFLAGS +@@ -237,19 +237,19 @@ CB_SQUIRREL_CFLAGS = @CB_SQUIRREL_CFLAGS CB_SQUIRREL_LIBS = @CB_SQUIRREL_LIBS@ CB_TINYXML_CFLAGS = @CB_TINYXML_CFLAGS@ CB_TINYXML_LIBS = @CB_TINYXML_LIBS@ @@ -21,15 +21,17 @@ +CC = cc CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -+CFLAGS = -O2 -pipe ++CFLAGS := -O2 -pipe CODEBLOCKS_PLATFORM = @CODEBLOCKS_PLATFORM@ CODEBLOCKS_VERSION_INFO = @CODEBLOCKS_VERSION_INFO@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ ++CPP = cpp ++CPPFLAGS := -DNDEBUG + CSCOPE = @CSCOPE@ + CTAGS = @CTAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -+CPP = cpp -+CPPFLAGS := +CXX = g++ +CXXCPP = g++ CXXDEPMODE = @CXXDEPMODE@ @@ -38,7 +40,7 @@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ -@@ -288,8 +288,8 @@ INSTALL_DATA = @INSTALL_DATA@ +@@ -287,8 +287,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ diff --git a/srcpkgs/codeblocks/patches/wx-3.2.patch b/srcpkgs/codeblocks/patches/wx-3.2.patch deleted file mode 100644 index 0400ce63461..00000000000 --- a/srcpkgs/codeblocks/patches/wx-3.2.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: codeblocks-20.03/src/sdk/scripting/bindings/sc_wxtypes.cpp -=================================================================== ---- codeblocks-20.03.orig/src/sdk/scripting/bindings/sc_wxtypes.cpp -+++ codeblocks-20.03/src/sdk/scripting/bindings/sc_wxtypes.cpp -@@ -322,6 +322,7 @@ namespace ScriptBindings - typedef bool(wxFileName::*WXFN_SETCWD)(); - #endif - typedef bool(wxFileName::*WXFN_ISFILEWRITEABLE)()const; -+ typedef bool(wxFileName::*WXFN_NORMALIZE)(int, const wxString&, wxPathFormat); - - SqPlus::SQClassDef("wxFileName"). - emptyCtor(). -@@ -354,7 +355,7 @@ namespace ScriptBindings - func(&wxFileName::IsDir, "IsDir"). - func(&wxFileName::MakeAbsolute, "MakeAbsolute"). - func(&wxFileName::MakeRelativeTo, "MakeRelativeTo"). -- func(&wxFileName::Normalize, "Normalize"). -+ func(&wxFileName::Normalize, "Normalize"). - func(&wxFileName::PrependDir, "PrependDir"). - func(&wxFileName::RemoveDir, "RemoveDir"). - func(&wxFileName::RemoveLastDir, "RemoveLastDir"). diff --git a/srcpkgs/codeblocks/patches/wxwiget-3.1-regex-is-pcre.patch b/srcpkgs/codeblocks/patches/wxwiget-3.1-regex-is-pcre.patch deleted file mode 100644 index 5b123a0a6d9..00000000000 --- a/srcpkgs/codeblocks/patches/wxwiget-3.1-regex-is-pcre.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/sdk/macrosmanager.cpp -+++ b/src/sdk/macrosmanager.cpp -@@ -83,9 +83,9 @@ void MacrosManager::Reset() - m_Plugins = UnixFilename(ConfigManager::GetPluginsFolder()); - m_DataPath = UnixFilename(ConfigManager::GetDataFolder()); - ClearProjectKeys(); -- m_RE_Unix.Compile(_T("([^$]|^)(\\$[({]?(#?[A-Za-z_0-9.]+)[)} /\\]?)"), wxRE_EXTENDED | wxRE_NEWLINE); -+ m_RE_Unix.Compile(_T("([^$]|^)(\\$[({]?(#?[A-Za-z_0-9.]+)[\\)} \\/\\\\]?)"), wxRE_EXTENDED | wxRE_NEWLINE); - m_RE_DOS.Compile(_T("([^%]|^)(%(#?[A-Za-z_0-9.]+)%)"), wxRE_EXTENDED | wxRE_NEWLINE); -- m_RE_If.Compile(_T("\\$if\\(([^)]*)\\)[::space::]*(\\{([^}]*)\\})(\\{([^}]*)\\})?"), wxRE_EXTENDED | wxRE_NEWLINE); -+ m_RE_If.Compile(_T("\\$if\\(([^)]*)\\)\\s*(\\{([^}]*)\\})(\\{([^}]*)\\})?"), wxRE_EXTENDED | wxRE_NEWLINE); - m_RE_IfSp.Compile(_T("[^=!<>]+|(([^=!<>]+)[ ]*(=|==|!=|>|<|>=|<=)[ ]*([^=!<>]+))"), wxRE_EXTENDED | wxRE_NEWLINE); - m_RE_Script.Compile(_T("(\\[\\[(.*)\\]\\])"), wxRE_EXTENDED | wxRE_NEWLINE); - m_RE_ToAbsolutePath.Compile(_T("\\$TO_ABSOLUTE_PATH{([^}]*)}"), diff --git a/srcpkgs/codeblocks/template b/srcpkgs/codeblocks/template index 785560214c3..157de6a978a 100644 --- a/srcpkgs/codeblocks/template +++ b/srcpkgs/codeblocks/template @@ -1,7 +1,7 @@ # Template file for 'codeblocks' pkgname=codeblocks -version=20.03 -revision=7 +version=25.03 +revision=1 build_style=gnu-configure configure_args="--with-wx-config=wx-config-gtk3 --with-contrib-plugins --with-boost=${XBPS_CROSS_BASE}/usr @@ -9,16 +9,17 @@ configure_args="--with-wx-config=wx-config-gtk3 --with-contrib-plugins ac_cv_exeext=no --with-gnu-ld" hostmakedepends="libtool pkg-config zip tinyxml-devel" makedepends="gtk+3-devel wxWidgets-gtk3-devel tinyxml-devel hunspell-devel - gamin-devel boost-devel boost-build tinyxml-devel" + gamin-devel boost-devel-minimal libboost_system boost-build tinyxml-devel" short_desc="Free C, C++ and Fortran IDE" maintainer="Orphaned " license="GPL-3.0-only" homepage="http://www.codeblocks.org" -distfiles="${SOURCEFORGE_SITE}/${pkgname}/Sources/${version}/${pkgname}-${version}.tar.xz" -checksum=15eeb3e28aea054e1f38b0c7f4671b4d4d1116fd05f63c07aa95a91db89eaac5 -disable_parallel_build="plugins use same working directory" +distfiles="${SOURCEFORGE_SITE}/${pkgname}/Sources/${version}/${pkgname}_${version}.tar.xz" +checksum=b0f6aa5908d336d7f41f9576b2418ac7d27efbc59282aa8c9171d88cea74049e +# disable_parallel_build="plugins use same working directory" CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +LDFLAGS="-ltinyxml" post_install() { vinstall debian/codeblocks.sharedmime 644 /usr/share/mime/packages codeblocks.xml