From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-wm/blackbox/files/, x11-wm/blackbox/
Date: Sun, 12 Jun 2022 19:51:07 +0000 (UTC) [thread overview]
Message-ID: <1655063461.c9a0fbedd1906e5ef876e7c90cab82cc63d07221.sam@gentoo> (raw)
commit: c9a0fbedd1906e5ef876e7c90cab82cc63d07221
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 12 19:50:58 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 12 19:51:01 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9a0fbed
x11-wm/blackbox: fix build with GCC 12
Closes: https://bugs.gentoo.org/851603
Signed-off-by: Sam James <sam <AT> gentoo.org>
x11-wm/blackbox/blackbox-0.77.ebuild | 4 +++
.../blackbox/files/blackbox-0.77-gcc12-time.patch | 35 ++++++++++++++++++++++
2 files changed, 39 insertions(+)
diff --git a/x11-wm/blackbox/blackbox-0.77.ebuild b/x11-wm/blackbox/blackbox-0.77.ebuild
index 815969ba46db..32b54c5b3e31 100644
--- a/x11-wm/blackbox/blackbox-0.77.ebuild
+++ b/x11-wm/blackbox/blackbox-0.77.ebuild
@@ -26,6 +26,10 @@ BDEPEND=">=sys-devel/autoconf-2.71
S="${WORKDIR}"/blackboxwm-${PV}
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.77-gcc12-time.patch
+)
+
src_prepare() {
sed -e '/AC_DISABLE_SHARED/d' -i configure.ac || die
default
diff --git a/x11-wm/blackbox/files/blackbox-0.77-gcc12-time.patch b/x11-wm/blackbox/files/blackbox-0.77-gcc12-time.patch
new file mode 100644
index 000000000000..196e3878253d
--- /dev/null
+++ b/x11-wm/blackbox/files/blackbox-0.77-gcc12-time.patch
@@ -0,0 +1,35 @@
+https://github.com/bbidulock/blackboxwm/pull/42
+
+From d3481ee7b7d104ef53ead4d35b9a9254c64bb87a Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 12 Jun 2022 20:49:09 +0100
+Subject: [PATCH] Fix build with GCC 12 (missing <time.h> include)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes build failure with GCC 12:
+```
+Toolbar.cc: In member function ‘void Toolbar::reconfigure()’:
+Toolbar.cc:260:17: error: ‘time’ was not declared in this scope; did you mean ‘Time’?
+ 260 | time_t ttmp = time(NULL);
+ | ^~~~
+ | Time
+Toolbar.cc:265:21: error: ‘localtime’ was not declared in this scope; did you mean ‘clock_timer’?
+ 265 | struct tm *tt = localtime(&ttmp);
+ | ^~~~~~~~~
+ | clock_timer
+```
+
+Bug: https://bugs.gentoo.org/851603
+--- a/src/Toolbar.cc
++++ b/src/Toolbar.cc
+@@ -38,6 +38,7 @@
+ #include <X11/Xutil.h>
+ #include <sys/time.h>
+ #include <assert.h>
++#include <time.h>
+
+
+ long nextTimeout(int resolution)
+
reply other threads:[~2022-06-12 19:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1655063461.c9a0fbedd1906e5ef876e7c90cab82cc63d07221.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