summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2023-06-22 19:03:57 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2023-06-22 19:07:35 +0200
commited8c0f1f3b9abc60c4e4e808a580500c8237b0dc (patch)
tree5cb09358a2ae930d25fdf9dae26a984fc8512f09 /dev-util/kdevelop/files
parentwww-plugins/chrome-binary-plugins: automated update (115.0.5790.40_beta) (diff)
downloadgentoo-ed8c0f1f3b9abc60c4e4e808a580500c8237b0dc.tar.gz
gentoo-ed8c0f1f3b9abc60c4e4e808a580500c8237b0dc.tar.bz2
gentoo-ed8c0f1f3b9abc60c4e4e808a580500c8237b0dc.zip
dev-util/kdevelop: Fix build with dev-util/astyle-3.4
Closes: https://bugs.gentoo.org/908977 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-util/kdevelop/files')
-rw-r--r--dev-util/kdevelop/files/kdevelop-23.04.2-astyle-3.4.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/dev-util/kdevelop/files/kdevelop-23.04.2-astyle-3.4.patch b/dev-util/kdevelop/files/kdevelop-23.04.2-astyle-3.4.patch
new file mode 100644
index 000000000000..e5a73298aa19
--- /dev/null
+++ b/dev-util/kdevelop/files/kdevelop-23.04.2-astyle-3.4.patch
@@ -0,0 +1,62 @@
+From 8ca40a6454f053a262926794b96024bd02e0cdc5 Mon Sep 17 00:00:00 2001
+From: Milian Wolff <mail@milianw.de>
+Date: Wed, 31 May 2023 09:31:02 +0200
+Subject: [PATCH] Fix compile with newer astyle
+
+astyle::streamoff was always just an alias for std::streamoff,
+see also the upstream commit [1] that removed the
+`using namespace std` in the `astyle` namespace which breaks this
+code of our here now.
+
+[1]: https://gitlab.com/saalen/astyle/-/commit/0add646b21ee329b231ef7c5ab6963a94fb8935b
+---
+ plugins/astyle/astyle_stringiterator.cpp | 4 ++--
+ plugins/astyle/astyle_stringiterator.h | 5 +++--
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/plugins/astyle/astyle_stringiterator.cpp b/plugins/astyle/astyle_stringiterator.cpp
+index 02f8fb4264..a611869581 100644
+--- a/plugins/astyle/astyle_stringiterator.cpp
++++ b/plugins/astyle/astyle_stringiterator.cpp
+@@ -22,7 +22,7 @@ AStyleStringIterator::~AStyleStringIterator()
+ {
+ }
+
+-astyle::streamoff AStyleStringIterator::tellg()
++std::streamoff AStyleStringIterator::tellg()
+ {
+ return m_is.pos();
+ }
+@@ -59,7 +59,7 @@ void AStyleStringIterator::peekReset()
+ m_peekStart = -1; // invalid
+ }
+
+-astyle::streamoff AStyleStringIterator::getPeekStart() const
++std::streamoff AStyleStringIterator::getPeekStart() const
+ {
+ // NOTE: we're not entirely sure if this is the correct implementation.
+ // we're trying to work-around https://bugs.kde.org/show_bug.cgi?id=399048
+diff --git a/plugins/astyle/astyle_stringiterator.h b/plugins/astyle/astyle_stringiterator.h
+index f63a59c611..713800c0f3 100644
+--- a/plugins/astyle/astyle_stringiterator.h
++++ b/plugins/astyle/astyle_stringiterator.h
+@@ -21,13 +21,14 @@ public:
+ explicit AStyleStringIterator(const QString &string);
+ ~AStyleStringIterator() override;
+
+- astyle::streamoff tellg() override;
++ std::streamoff tellg() override;
+ int getStreamLength() const override;
+ bool hasMoreLines() const override;
+ std::string nextLine(bool emptyLineWasDeleted = false) override;
+ std::string peekNextLine() override;
+ void peekReset() override;
+- astyle::streamoff getPeekStart() const override;
++ std::streamoff getPeekStart() const override;
++
+ private:
+ QString m_content;
+ QTextStream m_is;
+--
+GitLab
+