public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/codeblocks/files/, dev-util/codeblocks/
Date: Sat,  9 Mar 2024 20:54:01 +0000 (UTC)	[thread overview]
Message-ID: <1710017604.1942cc9d811e65d8488108b1ef0948058c53f213.sam@gentoo> (raw)

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))


             reply	other threads:[~2024-03-09 20:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-09 20:54 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-05-13 20:04 [gentoo-commits] repo/gentoo:master commit in: dev-util/codeblocks/files/, dev-util/codeblocks/ Sam James
2020-10-14 18:35 Sergei Trofimovich
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1710017604.1942cc9d811e65d8488108b1ef0948058c53f213.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox