From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-plugins/wmweather+/files/, x11-plugins/wmweather+/
Date: Sat, 3 Dec 2022 06:06:22 +0000 (UTC) [thread overview]
Message-ID: <1670047569.f60d848d7c83cb2de9dc75e2819691cf40e2c2c4.sam@gentoo> (raw)
commit: f60d848d7c83cb2de9dc75e2819691cf40e2c2c4
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 3 05:23:33 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 3 06:06:09 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f60d848d
x11-plugins/wmweather+: fix build w/ clang 16
Closes: https://bugs.gentoo.org/870958
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/wmweather+-2.18-configure-clang16.patch | 67 ++++++++++++++++++++++
...ther+-2.18.ebuild => wmweather+-2.18-r1.ebuild} | 5 +-
2 files changed, 71 insertions(+), 1 deletion(-)
diff --git a/x11-plugins/wmweather+/files/wmweather+-2.18-configure-clang16.patch b/x11-plugins/wmweather+/files/wmweather+-2.18-configure-clang16.patch
new file mode 100644
index 000000000000..68a4d3f33190
--- /dev/null
+++ b/x11-plugins/wmweather+/files/wmweather+-2.18-configure-clang16.patch
@@ -0,0 +1,67 @@
+https://sourceforge.net/p/wmweatherplus/bugs/21/
+https://bugs.gentoo.org/870958
+
+Port the configure script to C99 by avoiding calls to the undeclared
+exit function. Future compilers are likely to reject implicit
+function declarations by default; this C features was removed from the
+language in 1999.
+
+--- a/m4/snprintf.m4
++++ b/m4/snprintf.m4
+@@ -24,7 +24,7 @@ int snprintf(char *str, size_t size, const char *format, ...);
+ #endif
+ ]],
+ [[char foo[]="ABC"; snprintf(foo, 2, "%d", 12);
+-exit((foo[0]=='1' && foo[1]=='\0' && foo[2]=='C')?0:1);]])],
++return (foo[0]=='1' && foo[1]=='\0' && foo[2]=='C')?0:1;]])],
+ [x_cv_func_snprintf_size=yes],
+ [x_cv_func_snprintf_size=no],
+ [x_cv_func_snprintf_size=no])])
+@@ -52,7 +52,7 @@ AC_CACHE_CHECK([if snprintf return value is sane], x_cv_func_snprintf_retval,
+ int snprintf(char *str, size_t size, const char *format, ...);
+ #endif
+ ]],
+-[[char foo[10]; exit((snprintf(foo, 1, "%d", 9876)==4)?0:1);]])],
++[[char foo[10]; return (snprintf(foo, 1, "%d", 9876)==4)?0:1;]])],
+ [x_cv_func_snprintf_retval=yes],
+ [x_cv_func_snprintf_retval=no],
+ [x_cv_func_snprintf_retval=no])])
+@@ -79,7 +79,7 @@ AC_CACHE_CHECK([if snprintf(NULL, 0, ...) works], x_cv_func_snprintf_null_ok,
+ int snprintf(char *str, size_t size, const char *format, ...);
+ #endif
+ ]],
+-[int r=snprintf(NULL, 0, "%d", 100); exit((r==3 || r==-1)?0:1);])],
++[int r=snprintf(NULL, 0, "%d", 100); return (r==3 || r==-1)?0:1;])],
+ [x_cv_func_snprintf_null_ok=yes],
+ [x_cv_func_snprintf_null_ok=no],
+ [x_cv_func_snprintf_null_ok=no])])
+--- a/m4/vsnprintf.m4
++++ b/m4/vsnprintf.m4
+@@ -37,7 +37,7 @@ int doit(char *str, size_t size, const char *format, ...){
+ }
+ ]],
+ [[char foo[]="ABC"; doit(foo, 2, "%d", 12);
+-exit((foo[0]=='1' && foo[1]=='\0' && foo[2]=='C')?0:1);]])],
++return (foo[0]=='1' && foo[1]=='\0' && foo[2]=='C')?0:1;]])],
+ [x_cv_func_vsnprintf_size=yes],
+ [x_cv_func_vsnprintf_size=no],
+ [x_cv_func_vsnprintf_size=no])])
+@@ -74,7 +74,7 @@ int doit(char *str, size_t size, const char *format, ...){
+ return r;
+ }
+ ]],
+-[[char foo[10]; exit((doit(foo, 1, "%d", 9876)==4)?0:1);]])],
++[[char foo[10]; return (doit(foo, 1, "%d", 9876)==4)?0:1;]])],
+ [x_cv_func_vsnprintf_retval=yes],
+ [x_cv_func_vsnprintf_retval=no],
+ [x_cv_func_vsnprintf_retval=no])])
+@@ -110,7 +110,7 @@ int doit(char *str, size_t size, const char *format, ...){
+ return r;
+ }
+ ]],
+-[int r=doit(NULL, 0, "%d", 100); exit((r==3 || r==-1)?0:1);])],
++[int r=doit(NULL, 0, "%d", 100); return (r==3 || r==-1)?0:1;])],
+ [x_cv_func_vsnprintf_null_ok=yes],
+ [x_cv_func_vsnprintf_null_ok=no],
+ [x_cv_func_vsnprintf_null_ok=no])])
+
diff --git a/x11-plugins/wmweather+/wmweather+-2.18.ebuild b/x11-plugins/wmweather+/wmweather+-2.18-r1.ebuild
similarity index 87%
rename from x11-plugins/wmweather+/wmweather+-2.18.ebuild
rename to x11-plugins/wmweather+/wmweather+-2.18-r1.ebuild
index 3ff866178306..0c62154e0166 100644
--- a/x11-plugins/wmweather+/wmweather+-2.18.ebuild
+++ b/x11-plugins/wmweather+/wmweather+-2.18-r1.ebuild
@@ -21,7 +21,10 @@ DEPEND="dev-libs/libpcre
x11-wm/windowmaker"
RDEPEND="${DEPEND}"
-PATCHES=( "${FILESDIR}"/${P}-ar.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-ar.patch
+ "${FILESDIR}"/${P}-configure-clang16.patch
+)
src_prepare() {
default
next reply other threads:[~2022-12-03 6:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-03 6:06 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-09-16 17:42 [gentoo-commits] repo/gentoo:master commit in: x11-plugins/wmweather+/files/, x11-plugins/wmweather+/ Andreas Sturmlechner
2021-01-02 23:32 Bernard Cafarelli
2020-02-24 21:47 Bernard Cafarelli
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=1670047569.f60d848d7c83cb2de9dc75e2819691cf40e2c2c4.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