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: app-admin/lnav/files/, app-admin/lnav/
Date: Thu, 21 Apr 2022 18:49:45 +0000 (UTC)	[thread overview]
Message-ID: <1650566973.79715b2a19c283d1577f33322cc19f17d4b49861.sam@gentoo> (raw)

commit:     79715b2a19c283d1577f33322cc19f17d4b49861
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 21 18:32:50 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 18:49:33 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79715b2a

app-admin/lnav: fix build with GCC 12

Closes: https://bugs.gentoo.org/839909
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-admin/lnav/files/lnav-0.10.1-gcc12.patch | 37 ++++++++++++++++++++++++++++
 app-admin/lnav/lnav-0.10.1.ebuild            |  3 ++-
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/app-admin/lnav/files/lnav-0.10.1-gcc12.patch b/app-admin/lnav/files/lnav-0.10.1-gcc12.patch
new file mode 100644
index 000000000000..6ed4a73cebb2
--- /dev/null
+++ b/app-admin/lnav/files/lnav-0.10.1-gcc12.patch
@@ -0,0 +1,37 @@
+https://bugs.gentoo.org/839909
+https://github.com/tstack/lnav/pull/961
+
+From b8a31ae9b4bcd5690a2b3d2fbd6373caffbc4a57 Mon Sep 17 00:00:00 2001
+From: Peter Schiffer <3899107+pschiffe@users.noreply.github.com>
+Date: Mon, 21 Feb 2022 21:09:30 +0100
+Subject: [PATCH] Add `#include <iterator>` to `string_util.cc`
+
+Lnav fails to build on the next Fedora version due to the following error:
+```
+make[3]: Entering directory '/builddir/build/BUILD/lnav-0.10.1/src/base'
+g++ -std=c++14 -DHAVE_CONFIG_H -I. -I../../src   -Wall -I../../src/ -I../../src/third-party -I../../src/fmtlib     -I../../src/third-party/doctest-root  -I/usr/local/include -D_ISOC99_SOURCE -D__STDC_LIMIT_MACROS -D_GNU_SOURCE  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c -o string_util.o string_util.cc
+make[3]: Leaving directory '/builddir/build/BUILD/lnav-0.10.1/src/base'
+string_util.cc: In function 'std::string repeat(const std::string&, size_t)':
+string_util.cc:199:22: error: 'ostream_iterator' is not a member of 'std'
+  199 |     std::fill_n(std::ostream_iterator<std::string>(os), num, input);
+      |                      ^~~~~~~~~~~~~~~~
+string_util.cc:38:1: note: 'std::ostream_iterator' is defined in header '<iterator>'; did you forget to '#include <iterator>'?
+   37 | #include "string_util.hh"
+  +++ |+#include <iterator>
+   38 |
+```
+
+Reason is probably the updated GNU toolchain, more info:
+https://fedoraproject.org/wiki/Changes/GNUToolchainF36
+
+This patch fixes the issue.
+--- a/src/base/string_util.cc
++++ b/src/base/string_util.cc
+@@ -29,6 +29,7 @@
+
+ #include "config.h"
+
++#include <iterator>
+ #include <regex>
+ #include <sstream>
+

diff --git a/app-admin/lnav/lnav-0.10.1.ebuild b/app-admin/lnav/lnav-0.10.1.ebuild
index 1bad5c8f41d2..efa86cff1cf6 100644
--- a/app-admin/lnav/lnav-0.10.1.ebuild
+++ b/app-admin/lnav/lnav-0.10.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -31,6 +31,7 @@ DOCS=( AUTHORS NEWS README )
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-0.10.0-disable-tests.patch
+	"${FILESDIR}"/${PN}-0.10.1-gcc12.patch
 )
 
 src_prepare() {


             reply	other threads:[~2022-04-21 18:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 18:49 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-24  7:12 [gentoo-commits] repo/gentoo:master commit in: app-admin/lnav/files/, app-admin/lnav/ Sam James
2022-12-14  0:22 Sam James
2022-09-09  3:46 Sam James
2022-09-09  3:46 Sam James
2021-10-02  4:27 Sam James
2021-07-13 21:49 Sam James
2020-12-27  5:45 Sam James
2019-09-28  3:42 Tim Harder

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=1650566973.79715b2a19c283d1577f33322cc19f17d4b49861.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