summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-05-06 09:32:09 +0100
committerSam James <sam@gentoo.org>2024-05-06 09:32:22 +0100
commitf202e754d285ee905cac3f7f1b1948a5430ab029 (patch)
treeae861bbced43391ee2e8b7e3868d43a0e879c5a2 /media-libs
parentsci-libs/onnx: add 1.16.0 (diff)
downloadgentoo-f202e754d285ee905cac3f7f1b1948a5430ab029.tar.gz
gentoo-f202e754d285ee905cac3f7f1b1948a5430ab029.tar.bz2
gentoo-f202e754d285ee905cac3f7f1b1948a5430ab029.zip
media-libs/flickcurl: fix modern C issues
Closes: https://bugs.gentoo.org/899812 Closes: https://bugs.gentoo.org/927191 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/flickcurl/files/flickcurl-1.26-c99-configure.patch23
-rw-r--r--media-libs/flickcurl/files/flickcurl-1.26-c99.patch261
-rw-r--r--media-libs/flickcurl/flickcurl-1.26-r1.ebuild (renamed from media-libs/flickcurl/flickcurl-1.26.ebuild)11
3 files changed, 293 insertions, 2 deletions
diff --git a/media-libs/flickcurl/files/flickcurl-1.26-c99-configure.patch b/media-libs/flickcurl/files/flickcurl-1.26-c99-configure.patch
new file mode 100644
index 000000000000..40fc7ff7b141
--- /dev/null
+++ b/media-libs/flickcurl/files/flickcurl-1.26-c99-configure.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/899812
+https://github.com/dajobe/flickcurl/pull/43
+
+From 940019e2635f1bc21b712fadbf4f73ca45a26379 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Fri, 13 Jan 2023 09:33:08 +0100
+Subject: [PATCH] configure: Include <stdio.h> in vsnprintf check
+
+Avoid implicit declaration of vsnprintf for improved C99
+compatibility. Otherwise the configure script will fail
+to detect vsnprintf support with future compilers which
+do not support implicit function declarations.
+--- a/configure.ac
++++ b/configure.ac
+@@ -133,6 +133,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_GETOPT_H
+ if test $ac_cv_func_vsnprintf = yes; then
+ AC_MSG_CHECKING(vsnprintf has C99 compatible return value)
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdarg.h>
++#include <stdio.h>
+ int is_c99(char *s, ...) {
+ char buffer[32];
+ va_list args;
+
diff --git a/media-libs/flickcurl/files/flickcurl-1.26-c99.patch b/media-libs/flickcurl/files/flickcurl-1.26-c99.patch
new file mode 100644
index 000000000000..ef2d48ca7ea0
--- /dev/null
+++ b/media-libs/flickcurl/files/flickcurl-1.26-c99.patch
@@ -0,0 +1,261 @@
+https://github.com/dajobe/flickcurl/pull/44
+
+From 96f263150cf025bdcf969fc9884cc90a466f54fb Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 6 May 2024 09:28:24 +0100
+Subject: [PATCH] Fix -Wimplicit-function-declaration
+
+GCC 14 and Clang 16 make this fatal by default.
+
+Bug: https://bugs.gentoo.org/927191
+--- a/src/activity.c
++++ b/src/activity.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/args.c
++++ b/src/args.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/blog.c
++++ b/src/blog.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/category.c
++++ b/src/category.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/collection.c
++++ b/src/collection.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/comments.c
++++ b/src/comments.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/contacts.c
++++ b/src/contacts.c
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/context.c
++++ b/src/context.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/exif.c
++++ b/src/exif.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/gallery.c
++++ b/src/gallery.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/group.c
++++ b/src/group.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/legacy-auth.c
++++ b/src/legacy-auth.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/members.c
++++ b/src/members.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/method.c
++++ b/src/method.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/note.c
++++ b/src/note.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/oauth.c
++++ b/src/oauth.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/perms.c
++++ b/src/perms.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/photo.c
++++ b/src/photo.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+ #include <ctype.h>
+
+ #ifdef HAVE_CONFIG_H
+--- a/src/photoset.c
++++ b/src/photoset.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/sha1.c
++++ b/src/sha1.c
+@@ -92,6 +92,7 @@ A million repetitions of "a"
+ #include <string.h>
+ #include <stdarg.h>
+ #include <stdint.h>
++#include <stdlib.h>
+
+ #include <flickcurl.h>
+ #include <flickcurl_internal.h>
+--- a/src/size.c
++++ b/src/size.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/stat.c
++++ b/src/stat.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/tags.c
++++ b/src/tags.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/ticket.c
++++ b/src/ticket.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+--- a/src/user_upload_status.c
++++ b/src/user_upload_status.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+
diff --git a/media-libs/flickcurl/flickcurl-1.26.ebuild b/media-libs/flickcurl/flickcurl-1.26-r1.ebuild
index 12c6109fe72b..d9b5b56ddfec 100644
--- a/media-libs/flickcurl/flickcurl-1.26.ebuild
+++ b/media-libs/flickcurl/flickcurl-1.26-r1.ebuild
@@ -17,11 +17,18 @@ IUSE="raptor"
RDEPEND="
>=net-misc/curl-7.10.0
>=dev-libs/libxml2-2.6.8:2
- raptor? ( media-libs/raptor:2 )"
+ raptor? ( media-libs/raptor:2 )
+"
DEPEND="${RDEPEND}"
BDEPEND="
dev-build/gtk-doc-am
- virtual/pkgconfig"
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.26-c99-configure.patch
+ "${FILESDIR}"/${PN}-1.26-c99.patch
+)
src_prepare() {
default