aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2021-11-02 18:12:12 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-11-05 22:56:42 +0700
commit0b11353610f7aa2efde3646958c2cee797228a6f (patch)
tree7bc89cebdf6ec8a7c293e4c82df6e79cb94bac99
parentca8b9aff665cc40608899a808e4ad4e8564a289f (diff)
development/codeblocks: Patch for gcc >= 11.x.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--development/codeblocks/codeblocks-gcc11.patch28
-rw-r--r--development/codeblocks/codeblocks.SlackBuild2
2 files changed, 30 insertions, 0 deletions
diff --git a/development/codeblocks/codeblocks-gcc11.patch b/development/codeblocks/codeblocks-gcc11.patch
new file mode 100644
index 000000000000..df4a087accf1
--- /dev/null
+++ b/development/codeblocks/codeblocks-gcc11.patch
@@ -0,0 +1,28 @@
+Index: src/plugins/openfileslist/openfileslistplugin.h
+===================================================================
+diff --git a/src/plugins/openfileslist/openfileslistplugin.h b/src/plugins/openfileslist/openfileslistplugin.h
+--- a/src/plugins/openfileslist/openfileslistplugin.h (revision 12302)
++++ b/src/plugins/openfileslist/openfileslistplugin.h (revision 12303)
+@@ -10,6 +10,7 @@
+ #include <projectfile.h>
+
+ #include <wx/dynarray.h>
++#include <functional>
+
+ class wxTreeCtrl;
+ class wxTreeEvent;
+@@ -20,12 +21,8 @@
+ struct TargetFilesData
+ {
+ TargetFilesData() : activeFile(nullptr) {} // ctor
+- // 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; }
+- };
+- typedef std::set<ProjectFile*, compareLess> OpenFilesSet;
++
++ typedef std::set<ProjectFile*, std::less<ProjectFile*>> OpenFilesSet;
+ ProjectFile* activeFile;
+ OpenFilesSet openFiles;
+ };
diff --git a/development/codeblocks/codeblocks.SlackBuild b/development/codeblocks/codeblocks.SlackBuild
index c21bd07338d2..2d09b550a393 100644
--- a/development/codeblocks/codeblocks.SlackBuild
+++ b/development/codeblocks/codeblocks.SlackBuild
@@ -84,6 +84,8 @@ if [ "${PLUGINS:-no}" = 'yes' ]; then
WITHPLUGINS='--with-contrib-plugins=all'
fi
+patch -p1 < $CWD/codeblocks-gcc11.patch
+
./bootstrap
LDFLAGS="-lX11" \