summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-12-03 05:23:33 +0000
committerSam James <sam@gentoo.org>2022-12-03 06:06:09 +0000
commitf60d848d7c83cb2de9dc75e2819691cf40e2c2c4 (patch)
tree5274df44bdf2fcdeb669f8e6c7a2865298b34a00 /x11-plugins
parentapp-misc/pwsafe: fix configure w/ clang 16 (diff)
downloadgentoo-f60d848d7c83cb2de9dc75e2819691cf40e2c2c4.tar.gz
gentoo-f60d848d7c83cb2de9dc75e2819691cf40e2c2c4.tar.bz2
gentoo-f60d848d7c83cb2de9dc75e2819691cf40e2c2c4.zip
x11-plugins/wmweather+: fix build w/ clang 16
Closes: https://bugs.gentoo.org/870958 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'x11-plugins')
-rw-r--r--x11-plugins/wmweather+/files/wmweather+-2.18-configure-clang16.patch67
-rw-r--r--x11-plugins/wmweather+/wmweather+-2.18-r1.ebuild (renamed from x11-plugins/wmweather+/wmweather+-2.18.ebuild)5
2 files changed, 71 insertions, 1 deletions
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
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