public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/codeblocks/files/, dev-util/codeblocks/
@ 2018-05-28 22:05 Mart Raudsepp
  0 siblings, 0 replies; 7+ messages in thread
From: Mart Raudsepp @ 2018-05-28 22:05 UTC (permalink / raw
  To: gentoo-commits

commit:     34f9194950f67c0863fed71c61990f811cd3b395
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Mon May 28 22:04:50 2018 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Mon May 28 22:04:50 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34f91949

dev-util/codeblocks: remove old

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 dev-util/codeblocks/Manifest                       |  1 -
 dev-util/codeblocks/codeblocks-16.01.ebuild        | 45 ----------------------
 .../codeblocks/files/codeblocks-16.01-gcc7.patch   | 30 ---------------
 3 files changed, 76 deletions(-)

diff --git a/dev-util/codeblocks/Manifest b/dev-util/codeblocks/Manifest
index 4c4d964fdb7..7bfced6413f 100644
--- a/dev-util/codeblocks/Manifest
+++ b/dev-util/codeblocks/Manifest
@@ -1,3 +1,2 @@
 DIST codeblocks-17.12-fortran.tar.xz 3048 BLAKE2B 58fd3b95cea3303a41da31f5cffe08698fa51ff896c456224edd63d17ddfe8dd54b0c058bd2a68920cf15789bfe5e412054e4e603b1d644034d8cb43d3de3224 SHA512 78534706b6433ae93b680740b2e6c0b747119f6ac62477b901ceeb1900692465615e29f2837ceca48d127181fc6b653d6d49a85fdb8d2fb873ad5a915527936c
-DIST codeblocks_16.01.tar.gz 20250097 BLAKE2B 7d3ede49b38ee3c58be30435d39ece38fd4f043a9b1cf0a3f53685ad93789ce650b5d8837f6f29f7bd73e150b527784321f7dcd3d94a767d80a8a3d4350e5905 SHA512 496ff2dbcf9a8248fa9f1060d50567d1fc6480cc9d8fc9f7d2cd532c82f4344deafe9b43f2b17d2510c74851e21acf2ca90d5cc7b61237d69a17e78e9907a63a
 DIST codeblocks_17.12.tar.xz 15725976 BLAKE2B 871427b5d8a2296e04d640c35d9129deebf1bb35cd1573652099c02ad4495c4c1369ed382ba714848d6bd75304195a25f6a91bece398bedaffbee8ae3547c46b SHA512 f90e756ca6f532656eeed34c6259c6a96ae85d172fc11e39f696ded9189cab7171d0cead18524fbab50dd782f21adbc7d52e2ea90535a3ed0aef5946b8a476e1

diff --git a/dev-util/codeblocks/codeblocks-16.01.ebuild b/dev-util/codeblocks/codeblocks-16.01.ebuild
deleted file mode 100644
index 07a042e6263..00000000000
--- a/dev-util/codeblocks/codeblocks-16.01.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-WX_GTK_VER="2.8"
-
-inherit eutils flag-o-matic wxwidgets
-
-DESCRIPTION="The open source, cross platform, free C++ IDE"
-HOMEPAGE="http://www.codeblocks.org/"
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~x86 ~x86-fbsd"
-SRC_URI="mirror://sourceforge/codeblocks/${P/-/_}.tar.gz"
-
-IUSE="contrib debug pch static-libs"
-
-S="${WORKDIR}/${P}.release"
-
-RDEPEND="app-arch/zip
-	x11-libs/wxGTK:${WX_GTK_VER}[X]
-	contrib? (
-		app-text/hunspell
-		dev-libs/boost:=
-		dev-libs/libgamin
-	)"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig"
-
-PATCHES=( "${FILESDIR}"/${P}-gcc7.patch )
-
-src_configure() {
-	touch "${S}"/revision.m4 -r "${S}"/acinclude.m4
-	setup-wxwidgets
-
-	append-cxxflags $(test-flags-CXX -fno-delete-null-pointer-checks)
-
-	econf \
-		--with-wx-config="${WX_CONFIG}" \
-		$(use_enable debug) \
-		$(use_enable pch) \
-		$(use_enable static-libs static) \
-		$(use_with contrib contrib-plugins all)
-}

diff --git a/dev-util/codeblocks/files/codeblocks-16.01-gcc7.patch b/dev-util/codeblocks/files/codeblocks-16.01-gcc7.patch
deleted file mode 100644
index 84cbc88696c..00000000000
--- a/dev-util/codeblocks/files/codeblocks-16.01-gcc7.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Bug: https://bugs.gentoo.org/649248
-SVN Revision: https://sourceforge.net/p/codeblocks/code/11006
-GIT Commit: https://github.com/jenslody/codeblocks/commit/1fd6799ded8475fafaca17de9c23db767177d31b
-
-From 1fd6799ded8475fafaca17de9c23db767177d31b Mon Sep 17 00:00:00 2001
-From: jenslody <jenslody@2a5c6006-c6dd-42ca-98ab-0921f2732cef>
-Date: Fri, 10 Feb 2017 20:56:25 +0000
-Subject: [PATCH] gcc7 build-fix: avoid template-related error
-
----
- src/include/scripting/sqplus/sqplus.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/include/scripting/sqplus/sqplus.h b/src/include/scripting/sqplus/sqplus.h
-index 73f37b24f..ae7d3c75f 100644
---- a/src/include/scripting/sqplus/sqplus.h
-+++ b/src/include/scripting/sqplus/sqplus.h
-@@ -154,10 +154,10 @@ struct ScriptStringVar : ScriptStringVarBase {
-     return safeStringCopy(s,_s.s,MaxLength);
-   }
-   bool operator == (const ScriptStringVar & _s) {
--    return _strcmp(s,_s.s) == 0;
-+    return strcmp(s,_s.s) == 0;
-   }
-   bool compareCaseInsensitive(const ScriptStringVar & _s) {
--    return _stricmp(s,_s.s) == 0;
-+    return strcasecmp(s,_s.s) == 0;
-   }
- };
- 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/codeblocks/files/, dev-util/codeblocks/
@ 2018-07-14 19:33 Mart Raudsepp
  0 siblings, 0 replies; 7+ messages in thread
From: Mart Raudsepp @ 2018-07-14 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     7cb12e41fb9ad7c68edacfe5d3f7509c912ca2c8
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 14 18:40:40 2018 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sat Jul 14 19:32:12 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cb12e41

dev-util/codeblocks: move large astyle patch to distfiles

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-util/codeblocks/Manifest                       |   1 +
 dev-util/codeblocks/codeblocks-17.12-r1.ebuild     |   6 +-
 dev-util/codeblocks/codeblocks-17.12-r301.ebuild   |   6 +-
 ...blocks-17.12_update_astyle_plugin_to_v3.1.patch | 414 ---------------------
 4 files changed, 9 insertions(+), 418 deletions(-)

diff --git a/dev-util/codeblocks/Manifest b/dev-util/codeblocks/Manifest
index 7bfced6413f..c685be7d1e5 100644
--- a/dev-util/codeblocks/Manifest
+++ b/dev-util/codeblocks/Manifest
@@ -1,2 +1,3 @@
 DIST codeblocks-17.12-fortran.tar.xz 3048 BLAKE2B 58fd3b95cea3303a41da31f5cffe08698fa51ff896c456224edd63d17ddfe8dd54b0c058bd2a68920cf15789bfe5e412054e4e603b1d644034d8cb43d3de3224 SHA512 78534706b6433ae93b680740b2e6c0b747119f6ac62477b901ceeb1900692465615e29f2837ceca48d127181fc6b653d6d49a85fdb8d2fb873ad5a915527936c
+DIST codeblocks-17.12_update_astyle_plugin_to_v3.1.patch.xz 3712 BLAKE2B 4a5f75c18b365030a08196dcb2808d8f42d8adf9442552d372cb3923629d9d5b74c98c77557f0af46965bb875543cc6f221a5197fa2b4dba12409225c6cc61d9 SHA512 b216f2659b8ce2a22fd2f9af456af71328b40428510b75f0bb36cec4695d28bbd3133b7385614a84862c2ab5c560d314cc8153ddab09019410e179f5d337669b
 DIST codeblocks_17.12.tar.xz 15725976 BLAKE2B 871427b5d8a2296e04d640c35d9129deebf1bb35cd1573652099c02ad4495c4c1369ed382ba714848d6bd75304195a25f6a91bece398bedaffbee8ae3547c46b SHA512 f90e756ca6f532656eeed34c6259c6a96ae85d172fc11e39f696ded9189cab7171d0cead18524fbab50dd782f21adbc7d52e2ea90535a3ed0aef5946b8a476e1

diff --git a/dev-util/codeblocks/codeblocks-17.12-r1.ebuild b/dev-util/codeblocks/codeblocks-17.12-r1.ebuild
index d6592a32274..33bc6b02fc6 100644
--- a/dev-util/codeblocks/codeblocks-17.12-r1.ebuild
+++ b/dev-util/codeblocks/codeblocks-17.12-r1.ebuild
@@ -12,7 +12,9 @@ HOMEPAGE="http://www.codeblocks.org/"
 LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
-SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.tar.xz https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz"
+SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.tar.xz
+https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz
+https://dev.gentoo.org/~leio/distfiles/${P}_update_astyle_plugin_to_v3.1.patch.xz"
 
 # USE="fortran" enables FortranProject plugin (v1.5)
 # that is delivered with Code::Blocks 17.12 source code.
@@ -42,7 +44,7 @@ PATCHES=(
 src_prepare() {
 	default
 	if has_version ">=dev-util/astyle-3.1" ; then
-		epatch "${FILESDIR}"/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch
+		epatch "${WORKDIR}"/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch
 	fi
 	eautoreconf
 }

diff --git a/dev-util/codeblocks/codeblocks-17.12-r301.ebuild b/dev-util/codeblocks/codeblocks-17.12-r301.ebuild
index ccc5d2c786a..faf2dc26b2c 100644
--- a/dev-util/codeblocks/codeblocks-17.12-r301.ebuild
+++ b/dev-util/codeblocks/codeblocks-17.12-r301.ebuild
@@ -12,7 +12,9 @@ HOMEPAGE="http://www.codeblocks.org/"
 LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
-SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.tar.xz https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz"
+SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.tar.xz
+https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz
+https://dev.gentoo.org/~leio/distfiles/${P}_update_astyle_plugin_to_v3.1.patch.xz"
 
 # USE="fortran" enables FortranProject plugin (v1.5)
 # that is delivered with Code::Blocks 17.12 source code.
@@ -42,7 +44,7 @@ PATCHES=(
 src_prepare() {
 	default
 	if has_version ">=dev-util/astyle-3.1" ; then
-		epatch "${FILESDIR}"/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch
+		epatch "${WORKDIR}"/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch
 	fi
 	eautoreconf
 }

diff --git a/dev-util/codeblocks/files/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch b/dev-util/codeblocks/files/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch
deleted file mode 100644
index c70cf083a44..00000000000
--- a/dev-util/codeblocks/files/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch
+++ /dev/null
@@ -1,414 +0,0 @@
-# Patch from: https://sourceforge.net/p/codeblocks/code/11266/
-# * updated astyle plugin to v3.1
-# * removed obsolete astyle options
-# * added new astyle options
-# Authored by: jenslody 2018-01-15
-diff -Naur codeblocks-17.12/src/plugins/astyle/asstreamiterator.cpp codeblocks-code-11266-trunk/src/plugins/astyle/asstreamiterator.cpp
---- codeblocks-17.12/src/plugins/astyle/asstreamiterator.cpp	2017-11-01 02:32:42.000000000 +0300
-+++ codeblocks-code-11266-trunk/src/plugins/astyle/asstreamiterator.cpp	2018-01-15 20:54:23.000000000 +0300
-@@ -2,9 +2,9 @@
-  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
-  * http://www.gnu.org/licenses/gpl-3.0.html
-  *
-- * $Revision: 9995 $
-- * $Id: asstreamiterator.cpp 9995 2014-10-16 09:01:46Z mortenmacfly $
-- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/asstreamiterator.cpp $
-+ * $Revision: 11266 $
-+ * $Id: asstreamiterator.cpp 11266 2018-01-15 17:54:23Z jenslody $
-+ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/asstreamiterator.cpp $
-  */
- 
- #include "asstreamiterator.h"
-@@ -53,8 +53,10 @@
- 
- std::string ASStreamIterator::peekNextLine()
- {
--    if (!m_SavedCharPtr)
-+    if (!m_SavedCharPtr){
-         m_SavedCharPtr = m_CharPtr;
-+        m_SavedCurChar = m_CurChar;
-+    }
- 
-     return readLine();
- }
-@@ -62,6 +64,7 @@
- void ASStreamIterator::peekReset()
- {
-     m_CharPtr = m_SavedCharPtr;
-+    m_CurChar = m_SavedCurChar;
-     m_SavedCharPtr = 0;
- }
- 
-diff -Naur codeblocks-17.12/src/plugins/astyle/asstreamiterator.h codeblocks-code-11266-trunk/src/plugins/astyle/asstreamiterator.h
---- codeblocks-17.12/src/plugins/astyle/asstreamiterator.h	2017-11-01 02:32:42.000000000 +0300
-+++ codeblocks-code-11266-trunk/src/plugins/astyle/asstreamiterator.h	2018-01-15 20:54:23.000000000 +0300
-@@ -22,6 +22,7 @@
- 
-         bool hasMoreLines() const;
-         int  getStreamLength() const;
-+        std::streamoff getPeekStart() const { return 0; }
-         std::string nextLine(bool emptyLineWasDeleted = false);
-         std::string peekNextLine();
-         void peekReset();
-@@ -39,6 +40,7 @@
-         const wxChar*       m_CharPtr;
-         const wxChar*       m_SavedCharPtr;
-         int                 m_CurChar;
-+        int                 m_SavedCurChar;
-         int                 m_CurLine;
-         bool                m_FoundBookmark;
-         bool                m_FoundBreakpoint;
-diff -Naur codeblocks-17.12/src/plugins/astyle/astyleconfigdlg.cpp codeblocks-code-11266-trunk/src/plugins/astyle/astyleconfigdlg.cpp
---- codeblocks-17.12/src/plugins/astyle/astyleconfigdlg.cpp	2017-11-01 02:32:42.000000000 +0300
-+++ codeblocks-code-11266-trunk/src/plugins/astyle/astyleconfigdlg.cpp	2018-01-15 20:54:23.000000000 +0300
-@@ -2,9 +2,9 @@
-  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
-  * http://www.gnu.org/licenses/gpl-3.0.html
-  *
-- * $Revision: 10955 $
-- * $Id: astyleconfigdlg.cpp 10955 2016-12-29 08:55:24Z mortenmacfly $
-- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/astyleconfigdlg.cpp $
-+ * $Revision: 11266 $
-+ * $Id: astyleconfigdlg.cpp 11266 2018-01-15 17:54:23Z jenslody $
-+ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/astyleconfigdlg.cpp $
-  */
- 
- #include <sdk.h>
-@@ -34,7 +34,7 @@
-   EVT_RADIOBUTTON(XRCID("rbStroustrup"), AstyleConfigDlg::OnStyleChange)
-   EVT_RADIOBUTTON(XRCID("rbWhitesmith"), AstyleConfigDlg::OnStyleChange)
-   EVT_RADIOBUTTON(XRCID("rbVTK"),        AstyleConfigDlg::OnStyleChange)
--  EVT_RADIOBUTTON(XRCID("rbBanner"),     AstyleConfigDlg::OnStyleChange)
-+  EVT_RADIOBUTTON(XRCID("rbRatliff"),    AstyleConfigDlg::OnStyleChange)
-   EVT_RADIOBUTTON(XRCID("rbGNU"),        AstyleConfigDlg::OnStyleChange)
-   EVT_RADIOBUTTON(XRCID("rbLinux"),      AstyleConfigDlg::OnStyleChange)
-   EVT_RADIOBUTTON(XRCID("rbHorstmann"),  AstyleConfigDlg::OnStyleChange)
-@@ -158,7 +158,7 @@
-       XRCCTRL(*this, "rbVTK", wxRadioButton)->SetValue(true);
-       break;
- #undef AS_VTK
--#define AS_BANNER "\
-+#define AS_RATLIFF "\
- int Foo(bool isBar) {\n\
-     if (isBar) {\n\
-         bar();\n\
-@@ -167,11 +167,11 @@
-     else\n\
-         return 0;\n\
-     }"
--    case aspsBanner:
--      sample = _T(AS_BANNER);
--      XRCCTRL(*this, "rbBanner", wxRadioButton)->SetValue(true);
-+    case aspsRatliff:
-+      sample = _T(AS_RATLIFF);
-+      XRCCTRL(*this, "rbRatliff", wxRadioButton)->SetValue(true);
-       break;
--#undef AS_BANNER
-+#undef AS_RATLIFF
- #define AS_GNU "\
- int Foo(bool isBar)\n\
- {\n\
-@@ -307,8 +307,8 @@
-     SetStyle(aspsWhitesmith);
-   else if (event.GetId() == XRCID("rbVTK"))
-     SetStyle(aspsVTK);
--  else if (event.GetId() == XRCID("rbBanner"))
--    SetStyle(aspsBanner);
-+  else if (event.GetId() == XRCID("rbRatliff"))
-+    SetStyle(aspsRatliff);
-   else if (event.GetId() == XRCID("rbGNU"))
-     SetStyle(aspsGnu);
-   else if (event.GetId() == XRCID("rbLinux"))
-@@ -376,6 +376,7 @@
-   XRCCTRL(*this,   "chkAttachExternC",       wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_extern_c"),       false));
-   XRCCTRL(*this,   "chkAttachNamespaces",    wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_namespaces"),     false));
-   XRCCTRL(*this,   "chkAttachInlines",       wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_inlines"),        false));
-+  XRCCTRL(*this,   "chkAttachClosingWhiles", wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_closing_whiles"), false));
- 
-   XRCCTRL(*this,   "spnIndentation",         wxSpinCtrl)->SetValue(cfg->ReadInt(_T("/indentation"),            4));
-   XRCCTRL(*this,   "spnContinuation",        wxSpinCtrl)->SetValue(cfg->ReadInt(_T("/continuation"),           0));
-@@ -386,6 +387,7 @@
-   XRCCTRL(*this,   "chkIndentLabels",        wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_labels"),         false));
-   XRCCTRL(*this,   "chkIndentModifiers",     wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_modifiers"),      false));
-   XRCCTRL(*this,   "chkIndentNamespaces",    wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_namespaces"),     false));
-+  XRCCTRL(*this,   "chkIndentAfterParens",   wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_after_parens"),   false));
-   XRCCTRL(*this,   "chkIndentSwitches",      wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_switches"),       false));
-   XRCCTRL(*this,   "chkIndentPreprocBlock",  wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_preproc_block"),  false));
-   XRCCTRL(*this,   "chkIndentPreprocDefine", wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_preproc_define"), false));
-@@ -399,6 +401,10 @@
-   XRCCTRL(*this,   "chkAddBrackets",         wxCheckBox)->SetValue(cfg->ReadBool(_T("/add_brackets"),          false));
-   XRCCTRL(*this,   "chkAddOneLineBrackets",  wxCheckBox)->SetValue(cfg->ReadBool(_T("/add_one_line_brackets"), false));
-   XRCCTRL(*this,   "chkRemoveBrackets",      wxCheckBox)->SetValue(cfg->ReadBool(_T("/remove_brackets"),       false));
-+  XRCCTRL(*this,   "chkBreakReturnType",     wxCheckBox)->SetValue(cfg->ReadBool(_T("/break_return_type"),     false));
-+  XRCCTRL(*this,   "chkBreakReturnTypeDecl", wxCheckBox)->SetValue(cfg->ReadBool(_T("/break_return_type_decl"),false));
-+  XRCCTRL(*this,   "chkAttachReturnType",    wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_return_type"),    false));
-+  XRCCTRL(*this,   "chkAttachReturnTypeDecl",wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_return_type_decl"),false));
-   XRCCTRL(*this,   "chkKeepBlocks",          wxCheckBox)->SetValue(cfg->ReadBool(_T("/keep_blocks"),           false));
-   XRCCTRL(*this,   "chkKeepHeaders",         wxCheckBox)->SetValue(cfg->ReadBool(_T("/keep_headers"),          false));
-   XRCCTRL(*this,   "chkKeepStatements",      wxCheckBox)->SetValue(cfg->ReadBool(_T("/keep_statements"),       false));
-@@ -455,8 +461,8 @@
-     style = aspsWhitesmith;
-   else if (XRCCTRL(*this, "rbVTK",        wxRadioButton)->GetValue())
-     style = aspsVTK;
--  else if (XRCCTRL(*this, "rbBanner",     wxRadioButton)->GetValue())
--    style = aspsBanner;
-+  else if (XRCCTRL(*this, "rbRatliff",     wxRadioButton)->GetValue())
-+    style = aspsRatliff;
-   else if (XRCCTRL(*this, "rbGNU",        wxRadioButton)->GetValue())
-     style = aspsGnu;
-   else if (XRCCTRL(*this, "rbLinux",      wxRadioButton)->GetValue())
-@@ -480,6 +486,7 @@
-   cfg->Write(_T("/attach_extern_c"),          XRCCTRL(*this, "chkAttachExternC",       wxCheckBox)->GetValue());
-   cfg->Write(_T("/attach_namespaces"),        XRCCTRL(*this, "chkAttachNamespaces",    wxCheckBox)->GetValue());
-   cfg->Write(_T("/attach_inlines"),           XRCCTRL(*this, "chkAttachInlines",       wxCheckBox)->GetValue());
-+  cfg->Write(_T("/attach_closing_whiles"),    XRCCTRL(*this, "chkAttachClosingWhiles", wxCheckBox)->GetValue());
- 
-   cfg->Write(_T("/indentation"),              XRCCTRL(*this, "spnIndentation",         wxSpinCtrl)->GetValue());
-   cfg->Write(_T("/continuation"),             XRCCTRL(*this, "spnContinuation",        wxSpinCtrl)->GetValue());
-@@ -490,6 +497,7 @@
-   cfg->Write(_T("/indent_labels"),            XRCCTRL(*this, "chkIndentLabels",        wxCheckBox)->GetValue());
-   cfg->Write(_T("/indent_modifiers"),         XRCCTRL(*this, "chkIndentModifiers",     wxCheckBox)->GetValue());
-   cfg->Write(_T("/indent_namespaces"),        XRCCTRL(*this, "chkIndentNamespaces",    wxCheckBox)->GetValue());
-+  cfg->Write(_T("/indent_after_parens"),      XRCCTRL(*this, "chkIndentAfterParens",   wxCheckBox)->GetValue());
-   cfg->Write(_T("/indent_switches"),          XRCCTRL(*this, "chkIndentSwitches",      wxCheckBox)->GetValue());
-   cfg->Write(_T("/indent_preproc_block"),     XRCCTRL(*this, "chkIndentPreprocBlock",  wxCheckBox)->GetValue());
-   cfg->Write(_T("/indent_preproc_define"),    XRCCTRL(*this, "chkIndentPreprocDefine", wxCheckBox)->GetValue());
-@@ -503,6 +511,10 @@
-   cfg->Write(_T("/add_brackets"),             XRCCTRL(*this, "chkAddBrackets",         wxCheckBox)->GetValue());
-   cfg->Write(_T("/add_one_line_brackets"),    XRCCTRL(*this, "chkAddOneLineBrackets",  wxCheckBox)->GetValue());
-   cfg->Write(_T("/remove_brackets"),          XRCCTRL(*this, "chkRemoveBrackets",      wxCheckBox)->GetValue());
-+  cfg->Write(_T("/break_return_type_decl"),   XRCCTRL(*this, "chkBreakReturnTypeDecl", wxCheckBox)->GetValue());
-+  cfg->Write(_T("/break_return_type"),        XRCCTRL(*this, "chkBreakReturnType",     wxCheckBox)->GetValue());
-+  cfg->Write(_T("/attach_return_type"),       XRCCTRL(*this, "chkAttachReturnType",    wxCheckBox)->GetValue());
-+  cfg->Write(_T("/attach_return_type_decl"),  XRCCTRL(*this, "chkAttachReturnTypeDecl",wxCheckBox)->GetValue());
-   cfg->Write(_T("/keep_blocks"),              XRCCTRL(*this, "chkKeepBlocks",          wxCheckBox)->GetValue());
-   cfg->Write(_T("/keep_headers"),             XRCCTRL(*this, "chkKeepHeaders",         wxCheckBox)->GetValue());
-   cfg->Write(_T("/keep_statements"),          XRCCTRL(*this, "chkKeepStatements",      wxCheckBox)->GetValue());
-diff -Naur codeblocks-17.12/src/plugins/astyle/astyleplugin.cpp codeblocks-code-11266-trunk/src/plugins/astyle/astyleplugin.cpp
---- codeblocks-17.12/src/plugins/astyle/astyleplugin.cpp	2017-11-01 02:32:42.000000000 +0300
-+++ codeblocks-code-11266-trunk/src/plugins/astyle/astyleplugin.cpp	2017-10-09 00:31:56.000000000 +0300
-@@ -4,7 +4,7 @@
-  *
-  * $Revision: 11193 $
-  * $Id: astyleplugin.cpp 11193 2017-10-08 21:31:56Z fuscated $
-- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/astyleplugin.cpp $
-+ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/astyleplugin.cpp $
-  */
- 
- #include <sdk.h>
-diff -Naur codeblocks-17.12/src/plugins/astyle/astylepredefinedstyles.h codeblocks-code-11266-trunk/src/plugins/astyle/astylepredefinedstyles.h
---- codeblocks-17.12/src/plugins/astyle/astylepredefinedstyles.h	2017-11-01 02:32:42.000000000 +0300
-+++ codeblocks-code-11266-trunk/src/plugins/astyle/astylepredefinedstyles.h	2018-01-15 20:54:23.000000000 +0300
-@@ -14,7 +14,7 @@
-   aspsStroustrup,
-   aspsWhitesmith,
-   aspsVTK,
--  aspsBanner,
-+  aspsRatliff,
-   aspsGnu,
-   aspsLinux,
-   aspsHorstmann,
-diff -Naur codeblocks-17.12/src/plugins/astyle/dlgformattersettings.cpp codeblocks-code-11266-trunk/src/plugins/astyle/dlgformattersettings.cpp
---- codeblocks-17.12/src/plugins/astyle/dlgformattersettings.cpp	2017-11-01 02:32:42.000000000 +0300
-+++ codeblocks-code-11266-trunk/src/plugins/astyle/dlgformattersettings.cpp	2018-01-15 20:54:23.000000000 +0300
-@@ -2,9 +2,9 @@
-  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
-  * http://www.gnu.org/licenses/gpl-3.0.html
-  *
-- * $Revision: 10950 $
-- * $Id: dlgformattersettings.cpp 10950 2016-12-29 06:16:39Z mortenmacfly $
-- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/dlgformattersettings.cpp $
-+ * $Revision: 11266 $
-+ * $Id: dlgformattersettings.cpp 11266 2018-01-15 17:54:23Z jenslody $
-+ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/dlgformattersettings.cpp $
-  */
- 
- #include "dlgformattersettings.h"
-@@ -39,8 +39,8 @@
-     formatter.setFormattingStyle(astyle::STYLE_WHITESMITH);
-   else if (XRCCTRL(*m_dlg, "rbVTK", wxRadioButton)->GetValue())
-     formatter.setFormattingStyle(astyle::STYLE_VTK);
--  else if (XRCCTRL(*m_dlg, "rbBanner", wxRadioButton)->GetValue())
--    formatter.setFormattingStyle(astyle::STYLE_BANNER);
-+  else if (XRCCTRL(*m_dlg, "rbRatliff", wxRadioButton)->GetValue())
-+    formatter.setFormattingStyle(astyle::STYLE_RATLIFF);
-   else if (XRCCTRL(*m_dlg, "rbGNU", wxRadioButton)->GetValue())
-     formatter.setFormattingStyle(astyle::STYLE_GNU);
-   else if (XRCCTRL(*m_dlg, "rbLinux", wxRadioButton)->GetValue())
-@@ -58,10 +58,11 @@
-   else if (XRCCTRL(*m_dlg, "rbLisp", wxRadioButton)->GetValue())
-     formatter.setFormattingStyle(astyle::STYLE_LISP);
- 
--  formatter.setAttachClass(XRCCTRL(*m_dlg,     "chkAttachClasses",    wxCheckBox)->GetValue());
--  formatter.setAttachExternC(XRCCTRL(*m_dlg,   "chkAttachExternC",    wxCheckBox)->GetValue());
--  formatter.setAttachNamespace(XRCCTRL(*m_dlg, "chkAttachNamespaces", wxCheckBox)->GetValue());
--  formatter.setAttachInline(XRCCTRL(*m_dlg,    "chkAttachInlines",    wxCheckBox)->GetValue());
-+  formatter.setAttachClass(XRCCTRL(*m_dlg,        "chkAttachClasses",       wxCheckBox)->GetValue());
-+  formatter.setAttachExternC(XRCCTRL(*m_dlg,      "chkAttachExternC",       wxCheckBox)->GetValue());
-+  formatter.setAttachNamespace(XRCCTRL(*m_dlg,    "chkAttachNamespaces",    wxCheckBox)->GetValue());
-+  formatter.setAttachInline(XRCCTRL(*m_dlg,       "chkAttachInlines",       wxCheckBox)->GetValue());
-+  formatter.setAttachClosingWhile(XRCCTRL(*m_dlg, "chkAttachClosingWhiles", wxCheckBox)->GetValue());
- 
-   bool value = XRCCTRL(*m_dlg, "chkForceUseTabs", wxCheckBox)->GetValue();
-   int spaceNum = XRCCTRL(*m_dlg, "spnIndentation", wxSpinCtrl)->GetValue();
-@@ -79,6 +80,7 @@
-   formatter.setLabelIndent(XRCCTRL(*m_dlg,              "chkIndentLabels",        wxCheckBox)->GetValue());
-   formatter.setModifierIndent(XRCCTRL(*m_dlg,           "chkIndentModifiers",     wxCheckBox)->GetValue());
-   formatter.setNamespaceIndent(XRCCTRL(*m_dlg,          "chkIndentNamespaces",    wxCheckBox)->GetValue());
-+  formatter.setAfterParenIndent(XRCCTRL(*m_dlg,         "chkIndentAfterParens",   wxCheckBox)->GetValue());
-   formatter.setSwitchIndent(XRCCTRL(*m_dlg,             "chkIndentSwitches",      wxCheckBox)->GetValue());
-   formatter.setPreprocBlockIndent(XRCCTRL(*m_dlg,       "chkIndentPreprocBlock",  wxCheckBox)->GetValue());
-   formatter.setPreprocDefineIndent(XRCCTRL(*m_dlg,      "chkIndentPreprocDefine", wxCheckBox)->GetValue());
-@@ -88,11 +90,15 @@
-   formatter.setMinConditionalIndentOption(minConditionalEvent);
-   formatter.setMaxInStatementIndentLength( wxAtoi(XRCCTRL(*m_dlg, "txtMaxInStatementIndent", wxTextCtrl)->GetValue()) );
- 
--  formatter.setBreakClosingHeaderBracketsMode(XRCCTRL(*m_dlg, "chkBreakClosing", wxCheckBox)->GetValue());
-+  formatter.setBreakClosingHeaderBracesMode(XRCCTRL(*m_dlg, "chkBreakClosing",   wxCheckBox)->GetValue());
-   formatter.setBreakElseIfsMode(XRCCTRL(*m_dlg, "chkBreakElseIfs",               wxCheckBox)->GetValue());
--  formatter.setAddBracketsMode(XRCCTRL(*m_dlg, "chkAddBrackets",                 wxCheckBox)->GetValue());
--  formatter.setAddOneLineBracketsMode(XRCCTRL(*m_dlg, "chkAddOneLineBrackets",   wxCheckBox)->GetValue());
--  formatter.setRemoveBracketsMode(XRCCTRL(*m_dlg, "chkRemoveBrackets",           wxCheckBox)->GetValue());
-+  formatter.setAddBracesMode(XRCCTRL(*m_dlg, "chkAddBrackets",                   wxCheckBox)->GetValue());
-+  formatter.setAddOneLineBracesMode(XRCCTRL(*m_dlg, "chkAddOneLineBrackets",     wxCheckBox)->GetValue());
-+  formatter.setRemoveBracesMode(XRCCTRL(*m_dlg, "chkRemoveBrackets",             wxCheckBox)->GetValue());
-+  formatter.setBreakReturnType(XRCCTRL(*m_dlg, "chkBreakReturnType",             wxCheckBox)->GetValue());
-+  formatter.setBreakReturnTypeDecl(XRCCTRL(*m_dlg, "chkBreakReturnTypeDecl",     wxCheckBox)->GetValue());
-+  formatter.setAttachReturnType(XRCCTRL(*m_dlg, "chkAttachReturnType",           wxCheckBox)->GetValue());
-+  formatter.setAttachReturnTypeDecl(XRCCTRL(*m_dlg, "chkAttachReturnTypeDecl",   wxCheckBox)->GetValue());
-   formatter.setBreakOneLineBlocksMode(!XRCCTRL(*m_dlg, "chkKeepBlocks",          wxCheckBox)->GetValue());
-   formatter.setBreakOneLineHeadersMode(!XRCCTRL(*m_dlg, "chkKeepHeaders",        wxCheckBox)->GetValue());
-   formatter.setBreakOneLineStatementsMode(!XRCCTRL(*m_dlg, "chkKeepStatements",  wxCheckBox)->GetValue());
-diff -Naur codeblocks-17.12/src/plugins/astyle/formattersettings.cpp codeblocks-code-11266-trunk/src/plugins/astyle/formattersettings.cpp
---- codeblocks-17.12/src/plugins/astyle/formattersettings.cpp	2017-11-01 02:32:42.000000000 +0300
-+++ codeblocks-code-11266-trunk/src/plugins/astyle/formattersettings.cpp	2018-01-15 20:54:23.000000000 +0300
-@@ -2,9 +2,9 @@
-  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
-  * http://www.gnu.org/licenses/gpl-3.0.html
-  *
-- * $Revision: 10950 $
-- * $Id: formattersettings.cpp 10950 2016-12-29 06:16:39Z mortenmacfly $
-- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/formattersettings.cpp $
-+ * $Revision: 11266 $
-+ * $Id: formattersettings.cpp 11266 2018-01-15 17:54:23Z jenslody $
-+ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/formattersettings.cpp $
-  */
- 
- #include <sdk.h>
-@@ -54,8 +54,8 @@
-       formatter.setFormattingStyle(astyle::STYLE_VTK);
-       break;
- 
--    case aspsBanner: // Banner
--      formatter.setFormattingStyle(astyle::STYLE_BANNER);
-+    case aspsRatliff: // Ratliff
-+      formatter.setFormattingStyle(astyle::STYLE_RATLIFF);
-       break;
- 
-     case aspsGnu: // GNU
-@@ -123,7 +123,7 @@
-   formatter.setMinConditionalIndentOption(cfg->ReadInt(_T("/min_conditional_indent"), 2));
-   formatter.setMaxInStatementIndentLength(cfg->ReadInt(_T("/max_instatement_indent"), 40));
- 
--  formatter.setBreakClosingHeaderBracketsMode(cfg->ReadBool(_T("/break_closing")));
-+  formatter.setBreakClosingHeaderBracesMode(cfg->ReadBool(_T("/break_closing")));
-   formatter.setBreakElseIfsMode(cfg->ReadBool(_T("/break_elseifs")));
-   formatter.setAddBracketsMode(cfg->ReadBool(_T("/add_brackets")));
-   formatter.setAddOneLineBracketsMode(cfg->ReadBool(_T("/add_one_line_brackets")));
-diff -Naur codeblocks-17.12/src/plugins/astyle/resources/configuration.xrc codeblocks-code-11266-trunk/src/plugins/astyle/resources/configuration.xrc
---- codeblocks-17.12/src/plugins/astyle/resources/configuration.xrc	2017-11-01 02:32:42.000000000 +0300
-+++ codeblocks-code-11266-trunk/src/plugins/astyle/resources/configuration.xrc	2018-01-15 20:54:23.000000000 +0300
-@@ -61,9 +61,9 @@
- 											<border>5</border>
- 										</object>
- 										<object class="sizeritem">
--											<object class="wxRadioButton" name="rbBanner">
--												<label>Banner</label>
--												<tooltip>Banner style uses attached, indented brackets. Switch blocks and class blocks are indented to prevent a &apos;hanging indent&apos; with following case statements and C++ class modifiers (public, private, protected).</tooltip>
-+											<object class="wxRadioButton" name="rbRatliff">
-+												<label>Ratliff</label>
-+												<tooltip>Ratliff style uses attached, indented brackets. Switch blocks and class blocks are indented to prevent a &apos;hanging indent&apos; with following case statements and C++ class modifiers (public, private, protected).</tooltip>
- 											</object>
- 											<flag>wxTOP|wxLEFT|wxRIGHT|wxALIGN_LEFT</flag>
- 											<border>5</border>
-@@ -212,6 +212,13 @@
- 											<flag>wxTOP|wxALIGN_LEFT</flag>
- 											<border>5</border>
- 										</object>
-+										<object class="sizeritem">
-+											<object class="wxCheckBox" name="chkAttachClosingWhiles">
-+												<label>Attach closing &quot;while&quot;</label>
-+											</object>
-+											<flag>wxTOP|wxALIGN_LEFT</flag>
-+											<border>5</border>
-+										</object>
- 									</object>
- 									<flag>wxEXPAND</flag>
- 									<border>5</border>
-@@ -320,6 +327,13 @@
- 											<border>5</border>
- 										</object>
- 										<object class="sizeritem">
-+											<object class="wxCheckBox" name="chkIndentAfterParens">
-+												<label>Indent after parens</label>
-+											</object>
-+											<flag>wxTOP|wxALIGN_LEFT</flag>
-+											<border>5</border>
-+										</object>
-+										<object class="sizeritem">
- 											<object class="wxCheckBox" name="chkIndentSwitches">
- 												<label>Indent switches (keyword case:)</label>
- 											</object>
-@@ -427,21 +441,49 @@
- 										</object>
- 										<object class="sizeritem">
- 											<object class="wxCheckBox" name="chkAddBrackets">
--												<label>Add brackets to unbracketed one line conditional statements</label>
-+												<label>Add braces to unbraced one line conditional statements</label>
- 											</object>
- 											<flag>wxTOP|wxALIGN_LEFT</flag>
- 											<border>5</border>
- 										</object>
- 										<object class="sizeritem">
- 											<object class="wxCheckBox" name="chkAddOneLineBrackets">
--												<label>Add one line brackets to unbracketed one line conditional statements</label>
-+												<label>Add one line braces to unbraced one line conditional statements</label>
- 											</object>
- 											<flag>wxTOP|wxALIGN_LEFT</flag>
- 											<border>5</border>
- 										</object>
- 										<object class="sizeritem">
- 											<object class="wxCheckBox" name="chkRemoveBrackets">
--												<label>Remove brackets from conditional statements (single statement on a single line)</label>
-+												<label>Remove braces from conditional statements (single statement on a single line)</label>
-+											</object>
-+											<flag>wxTOP|wxALIGN_LEFT</flag>
-+											<border>5</border>
-+										</object>
-+										<object class="sizeritem">
-+											<object class="wxCheckBox" name="chkBreakReturnType">
-+												<label>Break the return type from the function name in function definitions</label>
-+											</object>
-+											<flag>wxTOP|wxALIGN_LEFT</flag>
-+											<border>5</border>
-+										</object>
-+										<object class="sizeritem">
-+											<object class="wxCheckBox" name="chkBreakReturnTypeDecl">
-+												<label>Break the return type from the function name in function declarations or signatures</label>
-+											</object>
-+											<flag>wxTOP|wxALIGN_LEFT</flag>
-+											<border>5</border>
-+										</object>
-+										<object class="sizeritem">
-+											<object class="wxCheckBox" name="chkAttachReturnType">
-+												<label>Attach the return type to the function name in function definitions</label>
-+											</object>
-+											<flag>wxTOP|wxALIGN_LEFT</flag>
-+											<border>5</border>
-+										</object>
-+										<object class="sizeritem">
-+											<object class="wxCheckBox" name="chkAttachReturnTypeDecl">
-+												<label>Attach the return type to the function name in function declarations or signatures</label>
- 											</object>
- 											<flag>wxTOP|wxALIGN_LEFT</flag>
- 											<border>5</border>


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/codeblocks/files/, dev-util/codeblocks/
@ 2018-07-14 19:33 Mart Raudsepp
  0 siblings, 0 replies; 7+ messages in thread
From: Mart Raudsepp @ 2018-07-14 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     27c7e3e956953056c4da2cac4521c40062687445
Author:     band-a-prend <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sat May 26 21:08:45 2018 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sat Jul 14 19:32:12 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27c7e3e9

dev-util/codeblocks: unbundle dev-util/astyle lib

Unbundle the dev-util/astyle library in favor of system installed
by adding it as build dependency ( >=dev-util/astyle-3.0.1-r1:0= ):

1. patching (update) the Codeblocks Astyle plugin to be compatible with dev-util/astyle-3.1:
"codeblocks-17.12_update_astyle_plugin_to_v3.1.patch" that is taken from upstream:

https://sourceforge.net/p/codeblocks/code/11266/

  * updated astyle plugin to v3.1
  * removed obsolete astyle options
  * added new astyle options
  Authored by: jenslody 2018-01-15

(using conditional patching depends on if '>=dev-util/astyle-3.1' is installed in system);

2. use sub-sloting of dev-util/astyle to force rebuild Codeblocks on system update
if sub-slot of dev-util/astyle is changed;

3. remove KEYWORD "arm" to avoid repoman QA warning about "dependency.bad" and
"dependency.badindev" due to dev-util/astyle dependency doesn't have this KEYWORD.

Closes: https://bugs.gentoo.org/383037
Closes: https://bugs.gentoo.org/656758

 dev-util/codeblocks/codeblocks-17.12-r1.ebuild     |   8 +-
 dev-util/codeblocks/codeblocks-17.12-r301.ebuild   |   8 +-
 ...blocks-17.12_update_astyle_plugin_to_v3.1.patch | 414 +++++++++++++++++++++
 3 files changed, 426 insertions(+), 4 deletions(-)

diff --git a/dev-util/codeblocks/codeblocks-17.12-r1.ebuild b/dev-util/codeblocks/codeblocks-17.12-r1.ebuild
index daeb448b5c2..0c02036d954 100644
--- a/dev-util/codeblocks/codeblocks-17.12-r1.ebuild
+++ b/dev-util/codeblocks/codeblocks-17.12-r1.ebuild
@@ -11,7 +11,7 @@ DESCRIPTION="The open source, cross platform, free C, C++ and Fortran IDE"
 HOMEPAGE="http://www.codeblocks.org/"
 LICENSE="GPL-3"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~x86 ~x86-fbsd"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
 SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.tar.xz https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz"
 
 # USE="fortran" enables FortranProject plugin (v1.5)
@@ -31,15 +31,19 @@ RDEPEND="app-arch/zip
 
 DEPEND="${RDEPEND}
 	>=dev-libs/tinyxml-2.6.2-r3
+	>=dev-util/astyle-3.0.1-r1:0=
 	virtual/pkgconfig"
 
 PATCHES=(
 	"${FILESDIR}"/codeblocks-17.12-nodebug.diff
 	"${WORKDIR}"/patches/
-)
+	)
 
 src_prepare() {
 	default
+	if has_version ">=dev-util/astyle-3.1" ; then
+		epatch "${FILESDIR}"/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch
+	fi
 	eautoreconf
 }
 

diff --git a/dev-util/codeblocks/codeblocks-17.12-r301.ebuild b/dev-util/codeblocks/codeblocks-17.12-r301.ebuild
index 164c9d11fd4..82d63b0809f 100644
--- a/dev-util/codeblocks/codeblocks-17.12-r301.ebuild
+++ b/dev-util/codeblocks/codeblocks-17.12-r301.ebuild
@@ -11,7 +11,7 @@ DESCRIPTION="The open source, cross platform, free C, C++ and Fortran IDE"
 HOMEPAGE="http://www.codeblocks.org/"
 LICENSE="GPL-3"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~x86 ~x86-fbsd"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
 SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.tar.xz https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz"
 
 # USE="fortran" enables FortranProject plugin (v1.5)
@@ -31,15 +31,19 @@ RDEPEND="app-arch/zip
 
 DEPEND="${RDEPEND}
 	>=dev-libs/tinyxml-2.6.2-r3
+	>=dev-util/astyle-3.0.1-r1:0=
 	virtual/pkgconfig"
 
 PATCHES=(
 	"${FILESDIR}"/codeblocks-17.12-nodebug.diff
 	"${WORKDIR}"/patches/
-)
+	)
 
 src_prepare() {
 	default
+	if has_version ">=dev-util/astyle-3.1" ; then
+		epatch "${FILESDIR}"/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch
+	fi
 	eautoreconf
 }
 

diff --git a/dev-util/codeblocks/files/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch b/dev-util/codeblocks/files/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch
new file mode 100644
index 00000000000..c70cf083a44
--- /dev/null
+++ b/dev-util/codeblocks/files/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch
@@ -0,0 +1,414 @@
+# Patch from: https://sourceforge.net/p/codeblocks/code/11266/
+# * updated astyle plugin to v3.1
+# * removed obsolete astyle options
+# * added new astyle options
+# Authored by: jenslody 2018-01-15
+diff -Naur codeblocks-17.12/src/plugins/astyle/asstreamiterator.cpp codeblocks-code-11266-trunk/src/plugins/astyle/asstreamiterator.cpp
+--- codeblocks-17.12/src/plugins/astyle/asstreamiterator.cpp	2017-11-01 02:32:42.000000000 +0300
++++ codeblocks-code-11266-trunk/src/plugins/astyle/asstreamiterator.cpp	2018-01-15 20:54:23.000000000 +0300
+@@ -2,9 +2,9 @@
+  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+  * http://www.gnu.org/licenses/gpl-3.0.html
+  *
+- * $Revision: 9995 $
+- * $Id: asstreamiterator.cpp 9995 2014-10-16 09:01:46Z mortenmacfly $
+- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/asstreamiterator.cpp $
++ * $Revision: 11266 $
++ * $Id: asstreamiterator.cpp 11266 2018-01-15 17:54:23Z jenslody $
++ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/asstreamiterator.cpp $
+  */
+ 
+ #include "asstreamiterator.h"
+@@ -53,8 +53,10 @@
+ 
+ std::string ASStreamIterator::peekNextLine()
+ {
+-    if (!m_SavedCharPtr)
++    if (!m_SavedCharPtr){
+         m_SavedCharPtr = m_CharPtr;
++        m_SavedCurChar = m_CurChar;
++    }
+ 
+     return readLine();
+ }
+@@ -62,6 +64,7 @@
+ void ASStreamIterator::peekReset()
+ {
+     m_CharPtr = m_SavedCharPtr;
++    m_CurChar = m_SavedCurChar;
+     m_SavedCharPtr = 0;
+ }
+ 
+diff -Naur codeblocks-17.12/src/plugins/astyle/asstreamiterator.h codeblocks-code-11266-trunk/src/plugins/astyle/asstreamiterator.h
+--- codeblocks-17.12/src/plugins/astyle/asstreamiterator.h	2017-11-01 02:32:42.000000000 +0300
++++ codeblocks-code-11266-trunk/src/plugins/astyle/asstreamiterator.h	2018-01-15 20:54:23.000000000 +0300
+@@ -22,6 +22,7 @@
+ 
+         bool hasMoreLines() const;
+         int  getStreamLength() const;
++        std::streamoff getPeekStart() const { return 0; }
+         std::string nextLine(bool emptyLineWasDeleted = false);
+         std::string peekNextLine();
+         void peekReset();
+@@ -39,6 +40,7 @@
+         const wxChar*       m_CharPtr;
+         const wxChar*       m_SavedCharPtr;
+         int                 m_CurChar;
++        int                 m_SavedCurChar;
+         int                 m_CurLine;
+         bool                m_FoundBookmark;
+         bool                m_FoundBreakpoint;
+diff -Naur codeblocks-17.12/src/plugins/astyle/astyleconfigdlg.cpp codeblocks-code-11266-trunk/src/plugins/astyle/astyleconfigdlg.cpp
+--- codeblocks-17.12/src/plugins/astyle/astyleconfigdlg.cpp	2017-11-01 02:32:42.000000000 +0300
++++ codeblocks-code-11266-trunk/src/plugins/astyle/astyleconfigdlg.cpp	2018-01-15 20:54:23.000000000 +0300
+@@ -2,9 +2,9 @@
+  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+  * http://www.gnu.org/licenses/gpl-3.0.html
+  *
+- * $Revision: 10955 $
+- * $Id: astyleconfigdlg.cpp 10955 2016-12-29 08:55:24Z mortenmacfly $
+- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/astyleconfigdlg.cpp $
++ * $Revision: 11266 $
++ * $Id: astyleconfigdlg.cpp 11266 2018-01-15 17:54:23Z jenslody $
++ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/astyleconfigdlg.cpp $
+  */
+ 
+ #include <sdk.h>
+@@ -34,7 +34,7 @@
+   EVT_RADIOBUTTON(XRCID("rbStroustrup"), AstyleConfigDlg::OnStyleChange)
+   EVT_RADIOBUTTON(XRCID("rbWhitesmith"), AstyleConfigDlg::OnStyleChange)
+   EVT_RADIOBUTTON(XRCID("rbVTK"),        AstyleConfigDlg::OnStyleChange)
+-  EVT_RADIOBUTTON(XRCID("rbBanner"),     AstyleConfigDlg::OnStyleChange)
++  EVT_RADIOBUTTON(XRCID("rbRatliff"),    AstyleConfigDlg::OnStyleChange)
+   EVT_RADIOBUTTON(XRCID("rbGNU"),        AstyleConfigDlg::OnStyleChange)
+   EVT_RADIOBUTTON(XRCID("rbLinux"),      AstyleConfigDlg::OnStyleChange)
+   EVT_RADIOBUTTON(XRCID("rbHorstmann"),  AstyleConfigDlg::OnStyleChange)
+@@ -158,7 +158,7 @@
+       XRCCTRL(*this, "rbVTK", wxRadioButton)->SetValue(true);
+       break;
+ #undef AS_VTK
+-#define AS_BANNER "\
++#define AS_RATLIFF "\
+ int Foo(bool isBar) {\n\
+     if (isBar) {\n\
+         bar();\n\
+@@ -167,11 +167,11 @@
+     else\n\
+         return 0;\n\
+     }"
+-    case aspsBanner:
+-      sample = _T(AS_BANNER);
+-      XRCCTRL(*this, "rbBanner", wxRadioButton)->SetValue(true);
++    case aspsRatliff:
++      sample = _T(AS_RATLIFF);
++      XRCCTRL(*this, "rbRatliff", wxRadioButton)->SetValue(true);
+       break;
+-#undef AS_BANNER
++#undef AS_RATLIFF
+ #define AS_GNU "\
+ int Foo(bool isBar)\n\
+ {\n\
+@@ -307,8 +307,8 @@
+     SetStyle(aspsWhitesmith);
+   else if (event.GetId() == XRCID("rbVTK"))
+     SetStyle(aspsVTK);
+-  else if (event.GetId() == XRCID("rbBanner"))
+-    SetStyle(aspsBanner);
++  else if (event.GetId() == XRCID("rbRatliff"))
++    SetStyle(aspsRatliff);
+   else if (event.GetId() == XRCID("rbGNU"))
+     SetStyle(aspsGnu);
+   else if (event.GetId() == XRCID("rbLinux"))
+@@ -376,6 +376,7 @@
+   XRCCTRL(*this,   "chkAttachExternC",       wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_extern_c"),       false));
+   XRCCTRL(*this,   "chkAttachNamespaces",    wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_namespaces"),     false));
+   XRCCTRL(*this,   "chkAttachInlines",       wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_inlines"),        false));
++  XRCCTRL(*this,   "chkAttachClosingWhiles", wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_closing_whiles"), false));
+ 
+   XRCCTRL(*this,   "spnIndentation",         wxSpinCtrl)->SetValue(cfg->ReadInt(_T("/indentation"),            4));
+   XRCCTRL(*this,   "spnContinuation",        wxSpinCtrl)->SetValue(cfg->ReadInt(_T("/continuation"),           0));
+@@ -386,6 +387,7 @@
+   XRCCTRL(*this,   "chkIndentLabels",        wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_labels"),         false));
+   XRCCTRL(*this,   "chkIndentModifiers",     wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_modifiers"),      false));
+   XRCCTRL(*this,   "chkIndentNamespaces",    wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_namespaces"),     false));
++  XRCCTRL(*this,   "chkIndentAfterParens",   wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_after_parens"),   false));
+   XRCCTRL(*this,   "chkIndentSwitches",      wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_switches"),       false));
+   XRCCTRL(*this,   "chkIndentPreprocBlock",  wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_preproc_block"),  false));
+   XRCCTRL(*this,   "chkIndentPreprocDefine", wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_preproc_define"), false));
+@@ -399,6 +401,10 @@
+   XRCCTRL(*this,   "chkAddBrackets",         wxCheckBox)->SetValue(cfg->ReadBool(_T("/add_brackets"),          false));
+   XRCCTRL(*this,   "chkAddOneLineBrackets",  wxCheckBox)->SetValue(cfg->ReadBool(_T("/add_one_line_brackets"), false));
+   XRCCTRL(*this,   "chkRemoveBrackets",      wxCheckBox)->SetValue(cfg->ReadBool(_T("/remove_brackets"),       false));
++  XRCCTRL(*this,   "chkBreakReturnType",     wxCheckBox)->SetValue(cfg->ReadBool(_T("/break_return_type"),     false));
++  XRCCTRL(*this,   "chkBreakReturnTypeDecl", wxCheckBox)->SetValue(cfg->ReadBool(_T("/break_return_type_decl"),false));
++  XRCCTRL(*this,   "chkAttachReturnType",    wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_return_type"),    false));
++  XRCCTRL(*this,   "chkAttachReturnTypeDecl",wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_return_type_decl"),false));
+   XRCCTRL(*this,   "chkKeepBlocks",          wxCheckBox)->SetValue(cfg->ReadBool(_T("/keep_blocks"),           false));
+   XRCCTRL(*this,   "chkKeepHeaders",         wxCheckBox)->SetValue(cfg->ReadBool(_T("/keep_headers"),          false));
+   XRCCTRL(*this,   "chkKeepStatements",      wxCheckBox)->SetValue(cfg->ReadBool(_T("/keep_statements"),       false));
+@@ -455,8 +461,8 @@
+     style = aspsWhitesmith;
+   else if (XRCCTRL(*this, "rbVTK",        wxRadioButton)->GetValue())
+     style = aspsVTK;
+-  else if (XRCCTRL(*this, "rbBanner",     wxRadioButton)->GetValue())
+-    style = aspsBanner;
++  else if (XRCCTRL(*this, "rbRatliff",     wxRadioButton)->GetValue())
++    style = aspsRatliff;
+   else if (XRCCTRL(*this, "rbGNU",        wxRadioButton)->GetValue())
+     style = aspsGnu;
+   else if (XRCCTRL(*this, "rbLinux",      wxRadioButton)->GetValue())
+@@ -480,6 +486,7 @@
+   cfg->Write(_T("/attach_extern_c"),          XRCCTRL(*this, "chkAttachExternC",       wxCheckBox)->GetValue());
+   cfg->Write(_T("/attach_namespaces"),        XRCCTRL(*this, "chkAttachNamespaces",    wxCheckBox)->GetValue());
+   cfg->Write(_T("/attach_inlines"),           XRCCTRL(*this, "chkAttachInlines",       wxCheckBox)->GetValue());
++  cfg->Write(_T("/attach_closing_whiles"),    XRCCTRL(*this, "chkAttachClosingWhiles", wxCheckBox)->GetValue());
+ 
+   cfg->Write(_T("/indentation"),              XRCCTRL(*this, "spnIndentation",         wxSpinCtrl)->GetValue());
+   cfg->Write(_T("/continuation"),             XRCCTRL(*this, "spnContinuation",        wxSpinCtrl)->GetValue());
+@@ -490,6 +497,7 @@
+   cfg->Write(_T("/indent_labels"),            XRCCTRL(*this, "chkIndentLabels",        wxCheckBox)->GetValue());
+   cfg->Write(_T("/indent_modifiers"),         XRCCTRL(*this, "chkIndentModifiers",     wxCheckBox)->GetValue());
+   cfg->Write(_T("/indent_namespaces"),        XRCCTRL(*this, "chkIndentNamespaces",    wxCheckBox)->GetValue());
++  cfg->Write(_T("/indent_after_parens"),      XRCCTRL(*this, "chkIndentAfterParens",   wxCheckBox)->GetValue());
+   cfg->Write(_T("/indent_switches"),          XRCCTRL(*this, "chkIndentSwitches",      wxCheckBox)->GetValue());
+   cfg->Write(_T("/indent_preproc_block"),     XRCCTRL(*this, "chkIndentPreprocBlock",  wxCheckBox)->GetValue());
+   cfg->Write(_T("/indent_preproc_define"),    XRCCTRL(*this, "chkIndentPreprocDefine", wxCheckBox)->GetValue());
+@@ -503,6 +511,10 @@
+   cfg->Write(_T("/add_brackets"),             XRCCTRL(*this, "chkAddBrackets",         wxCheckBox)->GetValue());
+   cfg->Write(_T("/add_one_line_brackets"),    XRCCTRL(*this, "chkAddOneLineBrackets",  wxCheckBox)->GetValue());
+   cfg->Write(_T("/remove_brackets"),          XRCCTRL(*this, "chkRemoveBrackets",      wxCheckBox)->GetValue());
++  cfg->Write(_T("/break_return_type_decl"),   XRCCTRL(*this, "chkBreakReturnTypeDecl", wxCheckBox)->GetValue());
++  cfg->Write(_T("/break_return_type"),        XRCCTRL(*this, "chkBreakReturnType",     wxCheckBox)->GetValue());
++  cfg->Write(_T("/attach_return_type"),       XRCCTRL(*this, "chkAttachReturnType",    wxCheckBox)->GetValue());
++  cfg->Write(_T("/attach_return_type_decl"),  XRCCTRL(*this, "chkAttachReturnTypeDecl",wxCheckBox)->GetValue());
+   cfg->Write(_T("/keep_blocks"),              XRCCTRL(*this, "chkKeepBlocks",          wxCheckBox)->GetValue());
+   cfg->Write(_T("/keep_headers"),             XRCCTRL(*this, "chkKeepHeaders",         wxCheckBox)->GetValue());
+   cfg->Write(_T("/keep_statements"),          XRCCTRL(*this, "chkKeepStatements",      wxCheckBox)->GetValue());
+diff -Naur codeblocks-17.12/src/plugins/astyle/astyleplugin.cpp codeblocks-code-11266-trunk/src/plugins/astyle/astyleplugin.cpp
+--- codeblocks-17.12/src/plugins/astyle/astyleplugin.cpp	2017-11-01 02:32:42.000000000 +0300
++++ codeblocks-code-11266-trunk/src/plugins/astyle/astyleplugin.cpp	2017-10-09 00:31:56.000000000 +0300
+@@ -4,7 +4,7 @@
+  *
+  * $Revision: 11193 $
+  * $Id: astyleplugin.cpp 11193 2017-10-08 21:31:56Z fuscated $
+- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/astyleplugin.cpp $
++ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/astyleplugin.cpp $
+  */
+ 
+ #include <sdk.h>
+diff -Naur codeblocks-17.12/src/plugins/astyle/astylepredefinedstyles.h codeblocks-code-11266-trunk/src/plugins/astyle/astylepredefinedstyles.h
+--- codeblocks-17.12/src/plugins/astyle/astylepredefinedstyles.h	2017-11-01 02:32:42.000000000 +0300
++++ codeblocks-code-11266-trunk/src/plugins/astyle/astylepredefinedstyles.h	2018-01-15 20:54:23.000000000 +0300
+@@ -14,7 +14,7 @@
+   aspsStroustrup,
+   aspsWhitesmith,
+   aspsVTK,
+-  aspsBanner,
++  aspsRatliff,
+   aspsGnu,
+   aspsLinux,
+   aspsHorstmann,
+diff -Naur codeblocks-17.12/src/plugins/astyle/dlgformattersettings.cpp codeblocks-code-11266-trunk/src/plugins/astyle/dlgformattersettings.cpp
+--- codeblocks-17.12/src/plugins/astyle/dlgformattersettings.cpp	2017-11-01 02:32:42.000000000 +0300
++++ codeblocks-code-11266-trunk/src/plugins/astyle/dlgformattersettings.cpp	2018-01-15 20:54:23.000000000 +0300
+@@ -2,9 +2,9 @@
+  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+  * http://www.gnu.org/licenses/gpl-3.0.html
+  *
+- * $Revision: 10950 $
+- * $Id: dlgformattersettings.cpp 10950 2016-12-29 06:16:39Z mortenmacfly $
+- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/dlgformattersettings.cpp $
++ * $Revision: 11266 $
++ * $Id: dlgformattersettings.cpp 11266 2018-01-15 17:54:23Z jenslody $
++ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/dlgformattersettings.cpp $
+  */
+ 
+ #include "dlgformattersettings.h"
+@@ -39,8 +39,8 @@
+     formatter.setFormattingStyle(astyle::STYLE_WHITESMITH);
+   else if (XRCCTRL(*m_dlg, "rbVTK", wxRadioButton)->GetValue())
+     formatter.setFormattingStyle(astyle::STYLE_VTK);
+-  else if (XRCCTRL(*m_dlg, "rbBanner", wxRadioButton)->GetValue())
+-    formatter.setFormattingStyle(astyle::STYLE_BANNER);
++  else if (XRCCTRL(*m_dlg, "rbRatliff", wxRadioButton)->GetValue())
++    formatter.setFormattingStyle(astyle::STYLE_RATLIFF);
+   else if (XRCCTRL(*m_dlg, "rbGNU", wxRadioButton)->GetValue())
+     formatter.setFormattingStyle(astyle::STYLE_GNU);
+   else if (XRCCTRL(*m_dlg, "rbLinux", wxRadioButton)->GetValue())
+@@ -58,10 +58,11 @@
+   else if (XRCCTRL(*m_dlg, "rbLisp", wxRadioButton)->GetValue())
+     formatter.setFormattingStyle(astyle::STYLE_LISP);
+ 
+-  formatter.setAttachClass(XRCCTRL(*m_dlg,     "chkAttachClasses",    wxCheckBox)->GetValue());
+-  formatter.setAttachExternC(XRCCTRL(*m_dlg,   "chkAttachExternC",    wxCheckBox)->GetValue());
+-  formatter.setAttachNamespace(XRCCTRL(*m_dlg, "chkAttachNamespaces", wxCheckBox)->GetValue());
+-  formatter.setAttachInline(XRCCTRL(*m_dlg,    "chkAttachInlines",    wxCheckBox)->GetValue());
++  formatter.setAttachClass(XRCCTRL(*m_dlg,        "chkAttachClasses",       wxCheckBox)->GetValue());
++  formatter.setAttachExternC(XRCCTRL(*m_dlg,      "chkAttachExternC",       wxCheckBox)->GetValue());
++  formatter.setAttachNamespace(XRCCTRL(*m_dlg,    "chkAttachNamespaces",    wxCheckBox)->GetValue());
++  formatter.setAttachInline(XRCCTRL(*m_dlg,       "chkAttachInlines",       wxCheckBox)->GetValue());
++  formatter.setAttachClosingWhile(XRCCTRL(*m_dlg, "chkAttachClosingWhiles", wxCheckBox)->GetValue());
+ 
+   bool value = XRCCTRL(*m_dlg, "chkForceUseTabs", wxCheckBox)->GetValue();
+   int spaceNum = XRCCTRL(*m_dlg, "spnIndentation", wxSpinCtrl)->GetValue();
+@@ -79,6 +80,7 @@
+   formatter.setLabelIndent(XRCCTRL(*m_dlg,              "chkIndentLabels",        wxCheckBox)->GetValue());
+   formatter.setModifierIndent(XRCCTRL(*m_dlg,           "chkIndentModifiers",     wxCheckBox)->GetValue());
+   formatter.setNamespaceIndent(XRCCTRL(*m_dlg,          "chkIndentNamespaces",    wxCheckBox)->GetValue());
++  formatter.setAfterParenIndent(XRCCTRL(*m_dlg,         "chkIndentAfterParens",   wxCheckBox)->GetValue());
+   formatter.setSwitchIndent(XRCCTRL(*m_dlg,             "chkIndentSwitches",      wxCheckBox)->GetValue());
+   formatter.setPreprocBlockIndent(XRCCTRL(*m_dlg,       "chkIndentPreprocBlock",  wxCheckBox)->GetValue());
+   formatter.setPreprocDefineIndent(XRCCTRL(*m_dlg,      "chkIndentPreprocDefine", wxCheckBox)->GetValue());
+@@ -88,11 +90,15 @@
+   formatter.setMinConditionalIndentOption(minConditionalEvent);
+   formatter.setMaxInStatementIndentLength( wxAtoi(XRCCTRL(*m_dlg, "txtMaxInStatementIndent", wxTextCtrl)->GetValue()) );
+ 
+-  formatter.setBreakClosingHeaderBracketsMode(XRCCTRL(*m_dlg, "chkBreakClosing", wxCheckBox)->GetValue());
++  formatter.setBreakClosingHeaderBracesMode(XRCCTRL(*m_dlg, "chkBreakClosing",   wxCheckBox)->GetValue());
+   formatter.setBreakElseIfsMode(XRCCTRL(*m_dlg, "chkBreakElseIfs",               wxCheckBox)->GetValue());
+-  formatter.setAddBracketsMode(XRCCTRL(*m_dlg, "chkAddBrackets",                 wxCheckBox)->GetValue());
+-  formatter.setAddOneLineBracketsMode(XRCCTRL(*m_dlg, "chkAddOneLineBrackets",   wxCheckBox)->GetValue());
+-  formatter.setRemoveBracketsMode(XRCCTRL(*m_dlg, "chkRemoveBrackets",           wxCheckBox)->GetValue());
++  formatter.setAddBracesMode(XRCCTRL(*m_dlg, "chkAddBrackets",                   wxCheckBox)->GetValue());
++  formatter.setAddOneLineBracesMode(XRCCTRL(*m_dlg, "chkAddOneLineBrackets",     wxCheckBox)->GetValue());
++  formatter.setRemoveBracesMode(XRCCTRL(*m_dlg, "chkRemoveBrackets",             wxCheckBox)->GetValue());
++  formatter.setBreakReturnType(XRCCTRL(*m_dlg, "chkBreakReturnType",             wxCheckBox)->GetValue());
++  formatter.setBreakReturnTypeDecl(XRCCTRL(*m_dlg, "chkBreakReturnTypeDecl",     wxCheckBox)->GetValue());
++  formatter.setAttachReturnType(XRCCTRL(*m_dlg, "chkAttachReturnType",           wxCheckBox)->GetValue());
++  formatter.setAttachReturnTypeDecl(XRCCTRL(*m_dlg, "chkAttachReturnTypeDecl",   wxCheckBox)->GetValue());
+   formatter.setBreakOneLineBlocksMode(!XRCCTRL(*m_dlg, "chkKeepBlocks",          wxCheckBox)->GetValue());
+   formatter.setBreakOneLineHeadersMode(!XRCCTRL(*m_dlg, "chkKeepHeaders",        wxCheckBox)->GetValue());
+   formatter.setBreakOneLineStatementsMode(!XRCCTRL(*m_dlg, "chkKeepStatements",  wxCheckBox)->GetValue());
+diff -Naur codeblocks-17.12/src/plugins/astyle/formattersettings.cpp codeblocks-code-11266-trunk/src/plugins/astyle/formattersettings.cpp
+--- codeblocks-17.12/src/plugins/astyle/formattersettings.cpp	2017-11-01 02:32:42.000000000 +0300
++++ codeblocks-code-11266-trunk/src/plugins/astyle/formattersettings.cpp	2018-01-15 20:54:23.000000000 +0300
+@@ -2,9 +2,9 @@
+  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+  * http://www.gnu.org/licenses/gpl-3.0.html
+  *
+- * $Revision: 10950 $
+- * $Id: formattersettings.cpp 10950 2016-12-29 06:16:39Z mortenmacfly $
+- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/formattersettings.cpp $
++ * $Revision: 11266 $
++ * $Id: formattersettings.cpp 11266 2018-01-15 17:54:23Z jenslody $
++ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/formattersettings.cpp $
+  */
+ 
+ #include <sdk.h>
+@@ -54,8 +54,8 @@
+       formatter.setFormattingStyle(astyle::STYLE_VTK);
+       break;
+ 
+-    case aspsBanner: // Banner
+-      formatter.setFormattingStyle(astyle::STYLE_BANNER);
++    case aspsRatliff: // Ratliff
++      formatter.setFormattingStyle(astyle::STYLE_RATLIFF);
+       break;
+ 
+     case aspsGnu: // GNU
+@@ -123,7 +123,7 @@
+   formatter.setMinConditionalIndentOption(cfg->ReadInt(_T("/min_conditional_indent"), 2));
+   formatter.setMaxInStatementIndentLength(cfg->ReadInt(_T("/max_instatement_indent"), 40));
+ 
+-  formatter.setBreakClosingHeaderBracketsMode(cfg->ReadBool(_T("/break_closing")));
++  formatter.setBreakClosingHeaderBracesMode(cfg->ReadBool(_T("/break_closing")));
+   formatter.setBreakElseIfsMode(cfg->ReadBool(_T("/break_elseifs")));
+   formatter.setAddBracketsMode(cfg->ReadBool(_T("/add_brackets")));
+   formatter.setAddOneLineBracketsMode(cfg->ReadBool(_T("/add_one_line_brackets")));
+diff -Naur codeblocks-17.12/src/plugins/astyle/resources/configuration.xrc codeblocks-code-11266-trunk/src/plugins/astyle/resources/configuration.xrc
+--- codeblocks-17.12/src/plugins/astyle/resources/configuration.xrc	2017-11-01 02:32:42.000000000 +0300
++++ codeblocks-code-11266-trunk/src/plugins/astyle/resources/configuration.xrc	2018-01-15 20:54:23.000000000 +0300
+@@ -61,9 +61,9 @@
+ 											<border>5</border>
+ 										</object>
+ 										<object class="sizeritem">
+-											<object class="wxRadioButton" name="rbBanner">
+-												<label>Banner</label>
+-												<tooltip>Banner style uses attached, indented brackets. Switch blocks and class blocks are indented to prevent a &apos;hanging indent&apos; with following case statements and C++ class modifiers (public, private, protected).</tooltip>
++											<object class="wxRadioButton" name="rbRatliff">
++												<label>Ratliff</label>
++												<tooltip>Ratliff style uses attached, indented brackets. Switch blocks and class blocks are indented to prevent a &apos;hanging indent&apos; with following case statements and C++ class modifiers (public, private, protected).</tooltip>
+ 											</object>
+ 											<flag>wxTOP|wxLEFT|wxRIGHT|wxALIGN_LEFT</flag>
+ 											<border>5</border>
+@@ -212,6 +212,13 @@
+ 											<flag>wxTOP|wxALIGN_LEFT</flag>
+ 											<border>5</border>
+ 										</object>
++										<object class="sizeritem">
++											<object class="wxCheckBox" name="chkAttachClosingWhiles">
++												<label>Attach closing &quot;while&quot;</label>
++											</object>
++											<flag>wxTOP|wxALIGN_LEFT</flag>
++											<border>5</border>
++										</object>
+ 									</object>
+ 									<flag>wxEXPAND</flag>
+ 									<border>5</border>
+@@ -320,6 +327,13 @@
+ 											<border>5</border>
+ 										</object>
+ 										<object class="sizeritem">
++											<object class="wxCheckBox" name="chkIndentAfterParens">
++												<label>Indent after parens</label>
++											</object>
++											<flag>wxTOP|wxALIGN_LEFT</flag>
++											<border>5</border>
++										</object>
++										<object class="sizeritem">
+ 											<object class="wxCheckBox" name="chkIndentSwitches">
+ 												<label>Indent switches (keyword case:)</label>
+ 											</object>
+@@ -427,21 +441,49 @@
+ 										</object>
+ 										<object class="sizeritem">
+ 											<object class="wxCheckBox" name="chkAddBrackets">
+-												<label>Add brackets to unbracketed one line conditional statements</label>
++												<label>Add braces to unbraced one line conditional statements</label>
+ 											</object>
+ 											<flag>wxTOP|wxALIGN_LEFT</flag>
+ 											<border>5</border>
+ 										</object>
+ 										<object class="sizeritem">
+ 											<object class="wxCheckBox" name="chkAddOneLineBrackets">
+-												<label>Add one line brackets to unbracketed one line conditional statements</label>
++												<label>Add one line braces to unbraced one line conditional statements</label>
+ 											</object>
+ 											<flag>wxTOP|wxALIGN_LEFT</flag>
+ 											<border>5</border>
+ 										</object>
+ 										<object class="sizeritem">
+ 											<object class="wxCheckBox" name="chkRemoveBrackets">
+-												<label>Remove brackets from conditional statements (single statement on a single line)</label>
++												<label>Remove braces from conditional statements (single statement on a single line)</label>
++											</object>
++											<flag>wxTOP|wxALIGN_LEFT</flag>
++											<border>5</border>
++										</object>
++										<object class="sizeritem">
++											<object class="wxCheckBox" name="chkBreakReturnType">
++												<label>Break the return type from the function name in function definitions</label>
++											</object>
++											<flag>wxTOP|wxALIGN_LEFT</flag>
++											<border>5</border>
++										</object>
++										<object class="sizeritem">
++											<object class="wxCheckBox" name="chkBreakReturnTypeDecl">
++												<label>Break the return type from the function name in function declarations or signatures</label>
++											</object>
++											<flag>wxTOP|wxALIGN_LEFT</flag>
++											<border>5</border>
++										</object>
++										<object class="sizeritem">
++											<object class="wxCheckBox" name="chkAttachReturnType">
++												<label>Attach the return type to the function name in function definitions</label>
++											</object>
++											<flag>wxTOP|wxALIGN_LEFT</flag>
++											<border>5</border>
++										</object>
++										<object class="sizeritem">
++											<object class="wxCheckBox" name="chkAttachReturnTypeDecl">
++												<label>Attach the return type to the function name in function declarations or signatures</label>
+ 											</object>
+ 											<flag>wxTOP|wxALIGN_LEFT</flag>
+ 											<border>5</border>


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/codeblocks/files/, dev-util/codeblocks/
@ 2020-03-22 19:21 Mart Raudsepp
  0 siblings, 0 replies; 7+ messages in thread
From: Mart Raudsepp @ 2020-03-22 19:21 UTC (permalink / raw
  To: gentoo-commits

commit:     98cd643eb9453b7d80588428d97311d8caf2659a
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sun Mar 15 17:58:44 2020 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Mar 22 19:19:00 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98cd643e

dev-util/codeblocks-17.12-r303: fix crash on paste; fix appdata-deprecated

- Fix crash on copy-paste from another applcation using upstream patch
https://sourceforge.net/p/codeblocks/code/11320/
from ticket
https://sourceforge.net/p/codeblocks/tickets/629/.

- Fix HOMEPAGE: from http://www to https://

- Fix installation into /usr/share/appdata that is deprecated

Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/14969
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 dev-util/codeblocks/codeblocks-17.12-r303.ebuild   | 86 ++++++++++++++++++++++
 .../codeblocks-17.12-fix-crash-on-copypaste.patch  | 20 +++++
 2 files changed, 106 insertions(+)

diff --git a/dev-util/codeblocks/codeblocks-17.12-r303.ebuild b/dev-util/codeblocks/codeblocks-17.12-r303.ebuild
new file mode 100644
index 00000000000..3a4c4727590
--- /dev/null
+++ b/dev-util/codeblocks/codeblocks-17.12-r303.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+WX_GTK_VER="3.0-gtk3"
+
+inherit autotools wxwidgets xdg-utils
+
+DESCRIPTION="The open source, cross platform, free C, C++ and Fortran IDE"
+HOMEPAGE="https://codeblocks.org/"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.tar.xz
+https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz
+https://dev.gentoo.org/~leio/distfiles/${P}_update_astyle_plugin_to_v3.1.patch.xz"
+
+# USE="fortran" enables FortranProject plugin (v1.5)
+# that is delivered with Code::Blocks 17.12 source code.
+# https://sourceforge.net/projects/fortranproject
+# http://cbfortran.sourceforge.net
+
+IUSE="contrib debug fortran pch"
+
+BDEPEND="virtual/pkgconfig"
+
+RDEPEND="app-arch/zip
+	>=dev-libs/tinyxml-2.6.2-r3
+	>=dev-util/astyle-3.0.1-r1:0=
+	x11-libs/wxGTK:${WX_GTK_VER}[X]
+	contrib? (
+		app-admin/gamin
+		app-text/hunspell
+		dev-libs/boost:=
+	)"
+
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-fix-crash-on-copypaste.patch
+	"${FILESDIR}"/${P}-nodebug.diff
+	"${WORKDIR}"/patches/
+	)
+
+src_prepare() {
+	default
+	if has_version ">=dev-util/astyle-3.1" ; then
+		eapply "${WORKDIR}"/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch
+	fi
+	sed -i "s:appdatadir = \$(datarootdir)/appdata:appdatadir = \$(datarootdir)/metainfo:" Makefile.am || die # bug 709450
+	sed -i "s:appdatadir = \$(datarootdir)/appdata:appdatadir = \$(datarootdir)/metainfo:" src/plugins/contrib/appdata/Makefile.am || die # bug 709450
+	eautoreconf
+}
+
+src_configure() {
+	setup-wxwidgets
+
+	# USE="contrib -fortran" setup:
+	use fortran || CONF_WITH_LST=$(use_with contrib contrib-plugins all,-FortranProject)
+	# USE="contrib fortran" setup:
+	use fortran && CONF_WITH_LST=$(use_with contrib contrib-plugins all)
+	# USE="-contrib fortran" setup:
+	use contrib || CONF_WITH_LST=$(use_with fortran contrib-plugins FortranProject)
+
+	econf \
+		--disable-static \
+		$(use_enable debug) \
+		$(use_enable pch) \
+		${CONF_WITH_LST}
+}
+
+pkg_postinst() {
+	elog "The Symbols Browser is disabled due to it causing crashes."
+	elog "For more information see https://sourceforge.net/p/codeblocks/tickets/225/"
+
+	xdg_desktop_database_update
+	xdg_icon_cache_update
+	xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+	xdg_desktop_database_update
+	xdg_icon_cache_update
+	xdg_mimeinfo_database_update
+}

diff --git a/dev-util/codeblocks/files/codeblocks-17.12-fix-crash-on-copypaste.patch b/dev-util/codeblocks/files/codeblocks-17.12-fix-crash-on-copypaste.patch
new file mode 100644
index 00000000000..9918c58d8e8
--- /dev/null
+++ b/dev-util/codeblocks/files/codeblocks-17.12-fix-crash-on-copypaste.patch
@@ -0,0 +1,20 @@
+# Fix crashing on paste of copied text from other applications
+# https://sourceforge.net/p/codeblocks/tickets/629/
+diff -Nuar a/main.cpp b/main.cpp
+--- a/src/src/main.cpp	2017-11-01 02:32:38.000000000 +0300
++++ b/src/src/main.cpp	2020-03-13 21:59:25.000000000 +0300
+@@ -4321,7 +4321,13 @@
+     }
+ 
+     if (Manager::Get()->GetEditorManager() && event.GetEditor() == Manager::Get()->GetEditorManager()->GetActiveEditor())
+-        DoUpdateStatusBar();
++    {
++        #if wxCHECK_VERSION(3, 0, 0)
++            CallAfter(&MainFrame::DoUpdateStatusBar);
++        #else
++            DoUpdateStatusBar();
++        #endif // wxCHECK_VERSION(3, 0, 0)
++    }
+ 
+     event.Skip();
+ }


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/codeblocks/files/, dev-util/codeblocks/
@ 2020-10-14 18:35 Sergei Trofimovich
  0 siblings, 0 replies; 7+ messages in thread
From: Sergei Trofimovich @ 2020-10-14 18:35 UTC (permalink / raw
  To: gentoo-commits

commit:     56d8bafba4d7c3431ebcbd05492f0b16b5ce8001
Author:     band-a-prend <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Wed Oct 14 15:29:49 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Oct 14 18:35:08 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56d8bafb

dev-util/codeblocks: fix gcc-11 compatibility

The GCC 11 now enforces that comparison objects be invocable as const.

Current patch to fix gcc-11 compatibility is proposed by
Sergei Trofimovich <slyfox <AT> gentoo.org>
and fix codeblocks "openfileslist" pligin compilation error.

Patch was sent to upstream :
https://sourceforge.net/p/codeblocks/tickets/1022/
so live-ebuild currently doesn't apply it.

Closes: https://bugs.gentoo.org/732818

Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/17928
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-util/codeblocks/codeblocks-17.12-r304.ebuild   | 83 ++++++++++++++++++++++
 dev-util/codeblocks/codeblocks-20.03-r2.ebuild     | 77 ++++++++++++++++++++
 .../codeblocks-20.03_gcc11_compatibility.patch     | 12 ++++
 3 files changed, 172 insertions(+)

diff --git a/dev-util/codeblocks/codeblocks-17.12-r304.ebuild b/dev-util/codeblocks/codeblocks-17.12-r304.ebuild
new file mode 100644
index 00000000000..88841742c92
--- /dev/null
+++ b/dev-util/codeblocks/codeblocks-17.12-r304.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+WX_GTK_VER="3.0-gtk3"
+
+inherit autotools wxwidgets xdg
+
+DESCRIPTION="The open source, cross platform, free C, C++ and Fortran IDE"
+HOMEPAGE="https://codeblocks.org/"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.tar.xz
+https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz
+https://dev.gentoo.org/~leio/distfiles/${P}_update_astyle_plugin_to_v3.1.patch.xz"
+
+# USE="fortran" enables FortranProject plugin (v1.5)
+# that is delivered with Code::Blocks 17.12 source code.
+# https://sourceforge.net/projects/fortranproject
+# https://cbfortran.sourceforge.io
+
+IUSE="contrib debug fortran pch"
+
+BDEPEND="virtual/pkgconfig"
+
+RDEPEND="app-arch/zip
+	>=dev-libs/tinyxml-2.6.2-r3
+	>=dev-util/astyle-3.0.1-r1:0=
+	x11-libs/wxGTK:${WX_GTK_VER}[X]
+	contrib? (
+		app-admin/gamin
+		app-text/hunspell
+		dev-libs/boost:=
+	)"
+
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-fix-crash-on-copypaste.patch
+	"${FILESDIR}"/${P}-nodebug.diff
+	"${FILESDIR}"/${PN}-20.03_gcc11_compatibility.patch
+	"${WORKDIR}"/patches/
+	)
+
+src_prepare() {
+	default
+	if has_version ">=dev-util/astyle-3.1" ; then
+		eapply "${WORKDIR}"/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch
+	fi
+	sed -i "s:appdatadir = \$(datarootdir)/appdata:appdatadir = \$(datarootdir)/metainfo:" Makefile.am || die # bug 709450
+	sed -i "s:appdatadir = \$(datarootdir)/appdata:appdatadir = \$(datarootdir)/metainfo:" src/plugins/contrib/appdata/Makefile.am || die # bug 709450
+	eautoreconf
+}
+
+src_configure() {
+	setup-wxwidgets
+
+	# USE="contrib -fortran" setup:
+	use fortran || CONF_WITH_LST=$(use_with contrib contrib-plugins all,-FortranProject)
+	# USE="contrib fortran" setup:
+	use fortran && CONF_WITH_LST=$(use_with contrib contrib-plugins all)
+	# USE="-contrib fortran" setup:
+	use contrib || CONF_WITH_LST=$(use_with fortran contrib-plugins FortranProject)
+
+	econf \
+		--disable-static \
+		$(use_enable debug) \
+		$(use_enable pch) \
+		${CONF_WITH_LST}
+}
+
+pkg_postinst() {
+	elog "The Symbols Browser is disabled due to it causing crashes."
+	elog "For more information see https://sourceforge.net/p/codeblocks/tickets/225/"
+
+	xdg_pkg_postinst
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+}

diff --git a/dev-util/codeblocks/codeblocks-20.03-r2.ebuild b/dev-util/codeblocks/codeblocks-20.03-r2.ebuild
new file mode 100644
index 00000000000..16fbd94b772
--- /dev/null
+++ b/dev-util/codeblocks/codeblocks-20.03-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+WX_GTK_VER="3.0-gtk3"
+
+inherit autotools wxwidgets xdg
+
+DESCRIPTION="The open source, cross platform, free C, C++ and Fortran IDE"
+HOMEPAGE="https://codeblocks.org/"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz
+https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz
+https://dev.gentoo.org/~leio/distfiles/${P}-fortran-update-v1.7.tar.xz"
+
+# USE="fortran" enables FortranProject plugin (updated to v1.7 2020-06-07 [r298])
+# that is delivered with Code::Blocks 20.03 source code.
+# https://sourceforge.net/projects/fortranproject
+# https://cbfortran.sourceforge.io
+
+IUSE="contrib debug fortran pch"
+
+BDEPEND="virtual/pkgconfig"
+
+RDEPEND="app-arch/zip
+	>=dev-libs/tinyxml-2.6.2-r3
+	>=dev-util/astyle-3.1-r2:0/3.1
+	x11-libs/wxGTK:${WX_GTK_VER}[X]
+	contrib? (
+		app-admin/gamin
+		app-text/hunspell
+		dev-libs/boost:=
+	)"
+
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-env.patch
+	"${FILESDIR}"/${P}_gcc11_compatibility.patch
+	"${WORKDIR}"/patches/
+	)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	setup-wxwidgets
+
+	# USE="contrib -fortran" setup:
+	use fortran || CONF_WITH_LST=$(use_with contrib contrib-plugins all,-FortranProject)
+	# USE="contrib fortran" setup:
+	use fortran && CONF_WITH_LST=$(use_with contrib contrib-plugins all)
+	# USE="-contrib fortran" setup:
+	use contrib || CONF_WITH_LST=$(use_with fortran contrib-plugins FortranProject)
+
+	econf \
+		--disable-static \
+		$(use_enable debug) \
+		$(use_enable pch) \
+		${CONF_WITH_LST}
+}
+
+pkg_postinst() {
+	elog "The Symbols Browser is disabled due to it causing crashes."
+	elog "For more information see https://sourceforge.net/p/codeblocks/tickets/225/"
+
+	xdg_pkg_postinst
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+}

diff --git a/dev-util/codeblocks/files/codeblocks-20.03_gcc11_compatibility.patch b/dev-util/codeblocks/files/codeblocks-20.03_gcc11_compatibility.patch
new file mode 100644
index 00000000000..46c8643e9c9
--- /dev/null
+++ b/dev-util/codeblocks/files/codeblocks-20.03_gcc11_compatibility.patch
@@ -0,0 +1,12 @@
+diff -Naur a/src/plugins/openfileslist/openfileslistplugin.h b/src/plugins/openfileslist/openfileslistplugin.h
+--- a/src/plugins/openfileslist/openfileslistplugin.h	2020-10-13 20:35:57.000000000 +0300
++++ b/src/plugins/openfileslist/openfileslistplugin.h	2020-10-13 20:37:37.000000000 +0300
+@@ -23,7 +23,7 @@
+     // 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<ProjectFile*, compareLess> OpenFilesSet;
+     ProjectFile* activeFile;


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/codeblocks/files/, dev-util/codeblocks/
@ 2022-05-13 20:04 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2022-05-13 20:04 UTC (permalink / raw
  To: gentoo-commits

commit:     174a1c6156dc5d6502bd944900b745f7f80959d1
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sun May  8 22:38:59 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 13 20:03:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=174a1c61

dev-util/codeblocks: update 9999.ebuild

The USE-flag "pch" isn't droped this time due to
https://sourceforge.net/p/codeblocks/tickets/1266/

Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/25393
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/codeblocks/codeblocks-9999.ebuild                    | 11 +++++------
 ...blocks-17.12-nodebug.diff => codeblocks-9999-nodebug.diff} |  4 ++--
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/dev-util/codeblocks/codeblocks-9999.ebuild b/dev-util/codeblocks/codeblocks-9999.ebuild
index 580a1b03b545..3ce6e1a69d71 100644
--- a/dev-util/codeblocks/codeblocks-9999.ebuild
+++ b/dev-util/codeblocks/codeblocks-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 WX_GTK_VER="3.0-gtk3"
 
@@ -15,6 +15,7 @@ KEYWORDS=""
 SRC_URI=""
 ESVN_REPO_URI="svn://svn.code.sf.net/p/${PN}/code/trunk"
 ESVN_FETCH_CMD="svn checkout --ignore-externals"
+ESVN_UPDATE_CMD="svn update --ignore-externals"
 
 IUSE="contrib debug pch"
 
@@ -32,7 +33,7 @@ RDEPEND="app-arch/zip
 
 DEPEND="${RDEPEND}"
 
-PATCHES=( "${FILESDIR}"/codeblocks-17.12-nodebug.diff )
+PATCHES=( "${FILESDIR}/${P}-nodebug.diff" )
 
 src_prepare() {
 	default
@@ -49,15 +50,13 @@ src_configure() {
 
 	econf \
 		--disable-static \
+		$(use_with contrib boost-libdir "${ESYSROOT}/usr/$(get_libdir)") \
 		$(use_enable debug) \
 		$(use_enable pch) \
 		$(use_with contrib contrib-plugins all)
 }
 
 pkg_postinst() {
-	elog "The Symbols Browser is disabled due to it causing crashes."
-	elog "For more information see https://sourceforge.net/p/codeblocks/tickets/225/"
-
 	xdg_pkg_postinst
 }
 

diff --git a/dev-util/codeblocks/files/codeblocks-17.12-nodebug.diff b/dev-util/codeblocks/files/codeblocks-9999-nodebug.diff
similarity index 80%
rename from dev-util/codeblocks/files/codeblocks-17.12-nodebug.diff
rename to dev-util/codeblocks/files/codeblocks-9999-nodebug.diff
index 7cbb678dda6a..1187f53539fc 100644
--- a/dev-util/codeblocks/files/codeblocks-17.12-nodebug.diff
+++ b/dev-util/codeblocks/files/codeblocks-9999-nodebug.diff
@@ -1,7 +1,7 @@
 # Remove adding of "-g" to CFLAGS and CXXFLAGS if "./configure --enable-debug"
 diff -Naur old/m4/acinclude.m4 new/m4/acinclude.m4
---- old/m4/acinclude.m4	2017-11-01 02:32:37.000000000 +0300
-+++ new/m4/acinclude.m4	2018-05-04 11:08:33.000000000 +0300
+--- old/m4/acinclude.m4
++++ new/m4/acinclude.m4
 @@ -91,8 +91,6 @@
  AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], [turn on debugging (default is OFF)])],,
                         enable_debug=$debug_default)


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/codeblocks/files/, dev-util/codeblocks/
@ 2024-03-09 20:54 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2024-03-09 20:54 UTC (permalink / raw
  To: gentoo-commits

commit:     1942cc9d811e65d8488108b1ef0948058c53f213
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sat Mar  9 18:46:09 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar  9 20:53:24 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1942cc9d

dev-util/codeblocks: 20.03-r7, fix DoxyBlocks plugin startup segfault

Closes: https://bugs.gentoo.org/925955

Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/codeblocks/codeblocks-20.03-r7.ebuild     | 97 ++++++++++++++++++++++
 ...cks-20.03_fix_DoxyBlocks_startup_segfault.patch | 61 ++++++++++++++
 2 files changed, 158 insertions(+)

diff --git a/dev-util/codeblocks/codeblocks-20.03-r7.ebuild b/dev-util/codeblocks/codeblocks-20.03-r7.ebuild
new file mode 100644
index 000000000000..a3c08cf9ffa1
--- /dev/null
+++ b/dev-util/codeblocks/codeblocks-20.03-r7.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+WX_GTK_VER="3.0-gtk3"
+
+inherit autotools flag-o-matic wxwidgets xdg
+
+DESCRIPTION="The open source, cross platform, free C, C++ and Fortran IDE"
+HOMEPAGE="https://codeblocks.org/"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz
+	https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz
+	https://dev.gentoo.org/~leio/distfiles/${P}-fortran-update-v1.7.tar.xz
+	https://dev.gentoo.org/~leio/distfiles/${P}-fortran-update-v1.8.tar.xz
+	https://dev.gentoo.org/~leio/distfiles/${P}-codecompletion-symbolbrowser-update.tar.xz
+"
+
+# USE="fortran" enables FortranProject plugin (updated to v1.8 2021-05-29 [r230])
+# that is delivered with Code::Blocks 20.03 source code.
+# https://sourceforge.net/projects/fortranproject
+# https://cbfortran.sourceforge.io
+
+IUSE="contrib debug fortran"
+
+BDEPEND="virtual/pkgconfig"
+
+RDEPEND="app-arch/zip
+	dev-libs/glib:2
+	>=dev-libs/tinyxml-2.6.2-r3
+	>=dev-util/astyle-3.1-r2:0/3.1
+	x11-libs/gtk+:3
+	x11-libs/wxGTK:${WX_GTK_VER}[X]
+	contrib? (
+		app-admin/gamin
+		app-arch/bzip2
+		app-text/hunspell:=
+		dev-libs/boost:=
+		dev-libs/libgamin
+		media-libs/fontconfig
+		sys-libs/zlib
+	)"
+
+DEPEND="${RDEPEND}
+	x11-base/xorg-proto"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-env.patch
+	"${WORKDIR}"/patches/
+	"${FILESDIR}"/${P}_fix_DoxyBlocks_startup_segfault.patch
+	)
+
+src_prepare() {
+	default
+	# Force to use bundled Squirrel-3.1 (patched version is used by upstream) due to it's API was changed
+	sed -i '/PKG_CHECK_MODULES(\[SQUIRREL\]/c\HAVE_SQUIRREL=no' configure.ac || die # Bug 884601
+	eautoreconf
+}
+
+src_configure() {
+	# Bug 858338
+	append-flags -fno-strict-aliasing
+
+	setup-wxwidgets
+
+	# USE="contrib -fortran" setup:
+	use fortran || CONF_WITH_LST=$(use_with contrib contrib-plugins all,-FortranProject)
+	# USE="contrib fortran" setup:
+	use fortran && CONF_WITH_LST=$(use_with contrib contrib-plugins all)
+	# USE="-contrib fortran" setup:
+	use contrib || CONF_WITH_LST=$(use_with fortran contrib-plugins FortranProject)
+
+	local myeconfargs=(
+		--disable-pch
+		$(use_with contrib boost-libdir "${ESYSROOT}/usr/$(get_libdir)")
+		$(use_enable debug)
+		${CONF_WITH_LST}
+	)
+
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	find "${ED}" -type f -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+}

diff --git a/dev-util/codeblocks/files/codeblocks-20.03_fix_DoxyBlocks_startup_segfault.patch b/dev-util/codeblocks/files/codeblocks-20.03_fix_DoxyBlocks_startup_segfault.patch
new file mode 100644
index 000000000000..d641dcb75f83
--- /dev/null
+++ b/dev-util/codeblocks/files/codeblocks-20.03_fix_DoxyBlocks_startup_segfault.patch
@@ -0,0 +1,61 @@
+Upstream patch: https://sourceforge.net/p/codeblocks/code/12074/
+Upstream issue: https://sourceforge.net/p/codeblocks/tickets/839/
+Gentoo issue: https://bugs.gentoo.org/925955
+
+--- a/src/plugins/contrib/DoxyBlocks/DoxyBlocks.cpp
++++ b/src/plugins/contrib/DoxyBlocks/DoxyBlocks.cpp
+@@ -101,8 +101,8 @@
+ 
+ // constructor
+ DoxyBlocks::DoxyBlocks() :
+-    m_pToolbar(0l),
+-    m_DoxyBlocksLog(0l),
++    m_pToolbar(nullptr),
++    m_DoxyBlocksLog(nullptr),
+     m_LogPageIndex(0),
+     m_bAutoVersioning(false)
+ {
+@@ -234,8 +234,10 @@
+  */
+ void DoxyBlocks::OnUpdateUI(wxUpdateUIEvent& WXUNUSED(event))
+ {
+-    if(Manager::Get()->GetProjectManager()->GetProjects()->GetCount() == 0){
+-        m_pToolbar->Enable(false);
++    if (Manager::Get()->GetProjectManager()->GetProjects()->GetCount() == 0)
++    {
++        if (m_pToolbar)
++            m_pToolbar->Enable(false);
+         wxMenuBar *menuBar =  Manager::Get()->GetAppFrame()->GetMenuBar();
+         menuBar->FindItem(ID_MENU_DOXYWIZARD)->Enable(false);
+         menuBar->FindItem(ID_MENU_EXTRACTPROJECT)->Enable(false);
+@@ -264,14 +266,15 @@
+             Manager::Get()->ProcessEvent(evt);
+         }
+     }
+-    m_DoxyBlocksLog = 0;
+-}
+-
+-cbConfigurationPanel *DoxyBlocks::GetConfigurationPanel(wxWindow *parent)
++    m_DoxyBlocksLog = nullptr;
++}
++
++cbConfigurationPanel* DoxyBlocks::GetConfigurationPanel(wxWindow *parent)
+ {
+     //create and display the configuration dialog for your plugin
+-    if(!IsAttached()){
+-        return 0;
++    if (!IsAttached())
++    {
++        return nullptr;
+     }
+ 
+     // Get the version string before instantiating the panel so that it is recorded before
+@@ -346,7 +349,7 @@
+ 
+ cbConfigurationPanel* DoxyBlocks::GetProjectConfigurationPanel(wxWindow* /*parent*/, cbProject* /*project*/)
+ {
+-    return 0;
++    return nullptr;
+ }
+ 
+ void DoxyBlocks::OnConfigure(wxCommandEvent & WXUNUSED(event))


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-09 20:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-14 18:35 [gentoo-commits] repo/gentoo:master commit in: dev-util/codeblocks/files/, dev-util/codeblocks/ Sergei Trofimovich
  -- strict thread matches above, loose matches on Subject: below --
2024-03-09 20:54 Sam James
2022-05-13 20:04 Sam James
2020-03-22 19:21 Mart Raudsepp
2018-07-14 19:33 Mart Raudsepp
2018-07-14 19:33 Mart Raudsepp
2018-05-28 22:05 Mart Raudsepp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox