From 4c116e109f68b9922a611054088f29b9716dbe5d Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Tue, 26 Apr 2022 02:53:37 +0000 Subject: [PATCH] added community/codeblocks --- ...-Protect-asm-int3-if-defined-LOGGING.patch | 23 +++++++++ community/codeblocks/PKGBUILD | 48 +++++++++++++++++++ community/codeblocks/codeblocks-gcc11.patch | 13 +++++ 3 files changed, 84 insertions(+) create mode 100644 community/codeblocks/0003-Protect-asm-int3-if-defined-LOGGING.patch create mode 100644 community/codeblocks/PKGBUILD create mode 100644 community/codeblocks/codeblocks-gcc11.patch diff --git a/community/codeblocks/0003-Protect-asm-int3-if-defined-LOGGING.patch b/community/codeblocks/0003-Protect-asm-int3-if-defined-LOGGING.patch new file mode 100644 index 000000000..2d9b70467 --- /dev/null +++ b/community/codeblocks/0003-Protect-asm-int3-if-defined-LOGGING.patch @@ -0,0 +1,23 @@ +From: =?utf-8?q?David_Pr=C3=A9vot?= +Date: Thu, 2 Apr 2020 16:51:48 -1000 +Subject: Protect asm("int3") if defined(LOGGING) + +This hopefully fixes FTBFS on non Intel arch. +--- + src/plugins/contrib/dragscroll/dragscrollcfg.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/plugins/contrib/dragscroll/dragscrollcfg.h b/src/plugins/contrib/dragscroll/dragscrollcfg.h +index 7fc28be..fbff8a8 100644 +--- a/src/plugins/contrib/dragscroll/dragscrollcfg.h ++++ b/src/plugins/contrib/dragscroll/dragscrollcfg.h +@@ -35,7 +35,9 @@ class cbDragScrollCfg: public cbConfigurationPanel + wxString GetBitmapBaseName() const; + void OnApply(); + void OnCancel(){} ++#if defined(LOGGING) + virtual void InitDialog(){ asm("int3");} /*trap*/ ++#endif + + // pointer to owner of the configuration diaglog needed to + // complete the OnApply/OnCancel EndModal() logic diff --git a/community/codeblocks/PKGBUILD b/community/codeblocks/PKGBUILD new file mode 100644 index 000000000..ad8df4e0f --- /dev/null +++ b/community/codeblocks/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Balló György +# Contributor: Alexander F Rødseth +# Contributor: Bartłomiej Piotrowski +# Contributor: Robert Hollencamp +# Contributor: Daniel J Griffiths +# Contributor: Stefan Husmann +# Contributor: Roman Mikhayloff + +# ALARM: Kevin Mihelich +# - patch from debian to fix ARM FTBFS + +pkgname=codeblocks +pkgver=20.03 +pkgrel=2 +pkgdesc='Cross-platform C/C++ IDE' +arch=('x86_64') +url='http://codeblocks.org/' +license=('GPL3') +depends=('boost-libs' 'wxgtk3' 'hunspell') +makedepends=('boost' 'imagemagick' 'zip') +source=("https://downloads.sourceforge.net/codeblocks/$pkgname-$pkgver.tar.xz" + codeblocks-gcc11.patch + 0003-Protect-asm-int3-if-defined-LOGGING.patch) +sha256sums=('15eeb3e28aea054e1f38b0c7f4671b4d4d1116fd05f63c07aa95a91db89eaac5' + '10b2b08440adc447d1d23eb122fa37beff1f26b9d7588b83f8435721586f4ed1' + '6911f64558eaf10526d4940db228c2941f86b5075b2ef8d05027a36ebed1ddf4') + +prepare() { + cd $pkgname-$pkgver + convert src/mime/codeblocks.png +set date:create +set date:modify -background none -extent 64x64 src/mime/codeblocks.png + sed -i 's|$(datadir)/pixmaps|$(datadir)/icons/hicolor/64x64/apps|' src/mime/Makefile.{am,in} + sed -i 's|$(datarootdir)/appdata|$(datarootdir)/metainfo|' Makefile.{am,in} src/plugins/contrib/appdata/Makefile.{am,in} + + patch -p1 < ../codeblocks-gcc11.patch # Fix build with GCC 11 (Fedora) + patch -p1 < ../0003-Protect-asm-int3-if-defined-LOGGING.patch # Fix builds on ARM (Debian) +} + +build() { + cd $pkgname-$pkgver + ./configure --prefix=/usr --with-contrib-plugins=all,-FileManager --with-wx-config=/usr/bin/wx-config-gtk3 + sed -i 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + make +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install +} diff --git a/community/codeblocks/codeblocks-gcc11.patch b/community/codeblocks/codeblocks-gcc11.patch new file mode 100644 index 000000000..760a8e1ec --- /dev/null +++ b/community/codeblocks/codeblocks-gcc11.patch @@ -0,0 +1,13 @@ +diff --git a/src/plugins/openfileslist/openfileslistplugin.h b/src/plugins/openfileslist/openfileslistplugin.h +index 7fd7a95..87b08ee 100644 +--- a/src/plugins/openfileslist/openfileslistplugin.h ++++ b/src/plugins/openfileslist/openfileslistplugin.h +@@ -23,7 +23,7 @@ struct TargetFilesData + // Functor for the std::set predicate to sort the opened editor files according to their tab order + struct compareLess + { +- bool operator()(const ProjectFile* lhs, const ProjectFile* rhs) { return lhs->editorTabPos < rhs->editorTabPos; } ++ bool operator()(const ProjectFile* lhs, const ProjectFile* rhs) const { return lhs->editorTabPos < rhs->editorTabPos; } + }; + typedef std::set OpenFilesSet; + ProjectFile* activeFile;