From 013635213f8032704e1ec9ae01e9303e63a2efbb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 10 Mar 2024 00:44:50 +0000 Subject: gentoo auto-resync : 10:03:2024 - 00:44:50 --- dev-util/codeblocks/Manifest | 3 + dev-util/codeblocks/codeblocks-20.03-r7.ebuild | 98 ++++++++++++++++++++++ ..._buffer_over-read_with_absolute_reference.patch | 24 ++++++ ...cks-20.03_fix_DoxyBlocks_startup_segfault.patch | 61 ++++++++++++++ 4 files changed, 186 insertions(+) create mode 100644 dev-util/codeblocks/codeblocks-20.03-r7.ebuild create mode 100644 dev-util/codeblocks/files/codeblocks-20.03_Scintilla_fix_buffer_over-read_with_absolute_reference.patch create mode 100644 dev-util/codeblocks/files/codeblocks-20.03_fix_DoxyBlocks_startup_segfault.patch (limited to 'dev-util/codeblocks') diff --git a/dev-util/codeblocks/Manifest b/dev-util/codeblocks/Manifest index 8fe97ab177fb..3613e980cb5e 100644 --- a/dev-util/codeblocks/Manifest +++ b/dev-util/codeblocks/Manifest @@ -1,4 +1,6 @@ AUX codeblocks-20.03-env.patch 1365 BLAKE2B 550b86319823c8453000d0a3a5e1c9a0845bbf08464d04b0055c98d72a055e966e0a30606e3496a00da829686129faf263f4f5edb36843dd5f1d882a4b87a2ce SHA512 c20b11f463517386b95ae1a2f1acc5fe75e15f1976ac004934d8b7a6441f40d5d58ba86292ff6713c0b71a6abe9c1d99554f8928b6aedc9c6452f0aa80ea894d +AUX codeblocks-20.03_Scintilla_fix_buffer_over-read_with_absolute_reference.patch 902 BLAKE2B 57dd173c91ac7d9c2a5a6c5aeb480e7f48ce7ead98333ab4bdfb51be18c65471bb5cdd8dfe5f20bf098e383bda21aaffc2b7a4a9e08b04423fa04000e1f8df69 SHA512 ef99d2adf255c76a0bde4545fefd6058964f94eb51a5459c52fefd233502b2669270b065a87e543a00e71e4c630cf58ecec33e1f190d8d9e1a2ed87cacafb473 +AUX codeblocks-20.03_fix_DoxyBlocks_startup_segfault.patch 1886 BLAKE2B dcf643fcc53f18b3e7635ccad22b98f69974c081b1af6cdc22901bd7b5ce76920f02084c2b1caa386aa018a5002c42fb1947b76c329ba1acd3559d24c6d61ce8 SHA512 c3d8e30cdfc091d881d268f384e74d45c1402a0b52a1e09814e950791c0d8bb8c0a23c34241419aba039926f275117cffd9a079b126bdec1a4ad82511fb88d7d AUX codeblocks-9999-nodebug.diff 539 BLAKE2B e205eb643be1e0a9103c77b632c10c36fd86a65866460583dbc8b4324fc5893f726b09b19ebdaea2cd38710148ec0815d8dd1d2055461421874256b5e8502e8f SHA512 f63c1d81b119d6278804b48240651e09d7d0595cf44fce6ae8a9bc4a4bbdddea7a9f4a7d7d000fb9c98aeec2c680d07bd9eb4694238fc10f5d38c8a807f8d9b2 DIST codeblocks-20.03-codecompletion-symbolbrowser-update.tar.xz 52572 BLAKE2B 4752a84f5471f68f2c1044df6c6c3c25dd61f03e916bfcff1d091fe66aec8911cd02c7d824431dd307267d00af209cfd0b614528fe091a2d3c4bccbc688e83ef SHA512 acd79ffeed03023ac5e33fd685942f5593d0f7bc488b1d53e6c502618b980d565b1f2bc479da4de869ad2e839e263ddbff2a8847ef39b822aab69b87d5cd01a8 DIST codeblocks-20.03-fortran-update-v1.7.tar.xz 12092 BLAKE2B df59ca9e00765f39f64d889ed22af61db8c2bb5f217dbda64d325327be8ef1ce318bc0b2538dd19ee911d84fccb6693f6e287f4d084e8243b34777f464ba5e61 SHA512 aec8062bbf0cd524b683ba9f2f6befec0bfb9f9b1f8ea61ffb679cf449f4ece20502f4fda101ab559151616fc7d7826e308a6468634502930f09ea3a8590c359 @@ -6,5 +8,6 @@ DIST codeblocks-20.03-fortran-update-v1.8.tar.xz 43672 BLAKE2B c30f64a7211debd72 DIST codeblocks-20.03-fortran.tar.xz 15828 BLAKE2B 3ad1be0ecdc61759edcbb12065a0d8065e5c4571bfdd99bcf6ad8cbda82f64def8ad7121770fe780c1837d06d58edb0209d2ab3b966ecd133c5d46f79c0cbb4e SHA512 06a9a87e560914ae49895843321c26581409e9213265d20476c9c4a8ad2dd9ff63cffdb416e7494bd74ce4a11578f11ef387dd851b1394a50baade8491caaa17 DIST codeblocks-20.03.tar.xz 11799264 BLAKE2B cdaca38e26e0f1bf12e774cf737e0b6647f070d07f0ca5bec97926528a3511ecb8b3306fb6af473729384a5fe22d4870db8ca988895d619a1e7e2a1d9de2a41f SHA512 f97c1a02d31f0be4dc08b1f19b57bd0d3cba375ab5f33ab91b2a2df7817018f5b3e3063ed07199a3970644f1caa7c7e511db2034c73264f5f4963046d65b0097 EBUILD codeblocks-20.03-r6.ebuild 2370 BLAKE2B de21d70f1941a2a52d25e1691d0e928fe13befb36a21bc6fcf82e2b69af5b464fac8d68d7c097142a9ddc1a33c997c013ee443d93bc72096fda1ed94b7a18ea9 SHA512 bf2ede993662ef9ac21233e1ad4069d060c7c9e4713cb324ecf3487b6ff587358e3e97f31bafbf7e0a470e3069ea16271c8e940faa9642ac2e21697b45ab7abb +EBUILD codeblocks-20.03-r7.ebuild 2511 BLAKE2B 94327e0c3e7ac4656a72a21ba07fb1adccbebec2c47e059e8fbd41be8fc818898d3442253323fd5b4a89d512c495118b0e43b35847cfddb48bc6baef2b7a39bc SHA512 1c1cf82042d7f67e907c4fbc562d496e261704b46a0514757bd3b602790cf743434f41165e3b8fa3a0f134d13f3fcad5898e2baf585d6c04b61eb9b6da2c587c EBUILD codeblocks-9999.ebuild 1718 BLAKE2B 703b796827eee3a1f297396fc4c69698dfacba6c09576a1ff140d43d0704674eaa9842a1ce71528d141e53757a10a63ae6bc40792e83b19fb89a8bca81748b6a SHA512 630e267331b1a9f63c9759d19bc7c739d2bc1490e75d7a6e0547e582d9ed02231da1fdd1f8ce3771a2059cfcfdbe7021a2f90c7af5b4235adaa076840579427d MISC metadata.xml 845 BLAKE2B f7b882b01dd425c6eb56c164a95e7e635ba59591ec1839a9b925496e4c40bf03497ec4134eb38b47f9eb54b765773890896ba243b5936cf7bc3b71f7e7ce41d4 SHA512 ae0650c5218f8e18422926bb11daa9cc89804221b9958963da484464668e99f6049ef099fc6a63f3a0800fa15238ecf0607da0a495c42d5029a94ed15ef4c985 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..96c7e10e1ae8 --- /dev/null +++ b/dev-util/codeblocks/codeblocks-20.03-r7.ebuild @@ -0,0 +1,98 @@ +# 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 + "${FILESDIR}"/${P}_Scintilla_fix_buffer_over-read_with_absolute_reference.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_Scintilla_fix_buffer_over-read_with_absolute_reference.patch b/dev-util/codeblocks/files/codeblocks-20.03_Scintilla_fix_buffer_over-read_with_absolute_reference.patch new file mode 100644 index 000000000000..7ef01faf9cd2 --- /dev/null +++ b/dev-util/codeblocks/files/codeblocks-20.03_Scintilla_fix_buffer_over-read_with_absolute_reference.patch @@ -0,0 +1,24 @@ +Upstream patch: https://sourceforge.net/u/vic5/scintilla/ci/6d0ce3c92a1371372bd601cd572a078d5e4041a4/ +Upstream issue: https://sourceforge.net/p/scintilla/bugs/2019/ +Codeblocks forum discussion: https://forums.codeblocks.org/index.php?topic=24505.0 + +lexers/LexMMIXAL.cxxDiffSwitch to side-by-side view +--- a/src/sdk/wxscintilla/src/scintilla/lexers/LexMMIXAL.cxx ++++ b/src/sdk/wxscintilla/src/scintilla/lexers/LexMMIXAL.cxx +@@ -99,12 +99,11 @@ + } + } else if (sc.state == SCE_MMIXAL_REF) { // REF + if (!IsAWordChar(sc.ch) ) { +- char s[100]; +- sc.GetCurrent(s, sizeof(s)); ++ char s0[100]; ++ sc.GetCurrent(s0, sizeof(s0)); ++ const char *s = s0; + if (*s == ':') { // ignore base prefix for match +- for (size_t i = 0; i != sizeof(s); ++i) { +- *(s+i) = *(s+i+1); +- } ++ ++s; + } + if (special_register.InList(s)) { + sc.ChangeState(SCE_MMIXAL_REGISTER); 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)) -- cgit v1.2.3