summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/gcal/files')
-rw-r--r--app-misc/gcal/files/gcal-4.1-configure-clang16.patch31
-rw-r--r--app-misc/gcal/files/gcal-4.1-fix-ncurses.patch38
-rw-r--r--app-misc/gcal/files/gcal-4.1-fortify.patch21
3 files changed, 90 insertions, 0 deletions
diff --git a/app-misc/gcal/files/gcal-4.1-configure-clang16.patch b/app-misc/gcal/files/gcal-4.1-configure-clang16.patch
new file mode 100644
index 000000000000..077a1f5e5105
--- /dev/null
+++ b/app-misc/gcal/files/gcal-4.1-configure-clang16.patch
@@ -0,0 +1,31 @@
+https://src.fedoraproject.org/rpms/barcode/c/80372a75c7ee2a448913350f19f9e3f7c8495b8c?branch=rawhide
+
+Include <term.h> during the terminal library check for function
+prototypes. Otherwise this configure check always fails if the
+compiler does not accept implicit function declarations.
+
+Submitted upstream:
+
+ <https://lists.gnu.org/archive/html/bug-gcal/2022-12/msg00000.html>
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -319,7 +319,7 @@ if test "$gcal_cv_use_term" = yes; then
+ AC_MSG_CHECKING(for working terminal libraries)
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TTYLIBS"
+- AC_TRY_LINK(,
++ AC_TRY_LINK([#include <term.h>],
+ [tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);],
+ [gcal_ttylibs_ok=yes])
+ if test "$gcal_ttylibs_ok" = yes; then
+@@ -334,7 +334,7 @@ if test "$gcal_cv_use_term" = yes; then
+ [TTYLIBS="-ltermcap"])
+ AC_MSG_CHECKING(for working terminal libraries again)
+ LIBS="$LIBS $TTYLIBS"
+- AC_TRY_LINK(,
++ AC_TRY_LINK([#include <term.h>],
+ [tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);],
+ [gcal_ttylibs_ok=yes])
+ if test "$gcal_ttylibs_ok" = yes; then
+
diff --git a/app-misc/gcal/files/gcal-4.1-fix-ncurses.patch b/app-misc/gcal/files/gcal-4.1-fix-ncurses.patch
new file mode 100644
index 000000000000..f429a0121d39
--- /dev/null
+++ b/app-misc/gcal/files/gcal-4.1-fix-ncurses.patch
@@ -0,0 +1,38 @@
+Without this, it'd silently (well, with a small warning in configure) fall back
+to no fancy tty stuff.
+--- a/configure.ac
++++ b/configure.ac
+@@ -319,6 +319,13 @@ if test "$gcal_cv_use_term" = yes; then
+ AC_MSG_CHECKING(for working terminal libraries)
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TTYLIBS"
++
++ PKG_CHECK_MODULES([NCURSES], [ncurses], [
++ TTYLIBS=$NCURSES_LIBS
++ CPPFLAGS="$NCURSES_CFLAGS $CPPFLAGS"
++ AC_DEFINE([HAVE_TTYLIBS], [1], [Link -lncurses or -ltermcap or -ltermlib to executable.])
++ AC_MSG_RESULT(using $TTYLIBS)
++ ], [
+ AC_TRY_LINK([#include <term.h>],
+ [tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);],
+ [gcal_ttylibs_ok=yes])
+@@ -385,7 +392,7 @@ if test "$gcal_cv_use_term" = yes; then
+ AC_MSG_WARN(note: $PACKAGE-$VERSION would work more flexible if libncurses.a)
+ AC_MSG_WARN(libtermcap.a or libtermlib.a are installed.)
+ AC_MSG_RESULT()
+- fi
++ fi])
+ fi
+
+ dnl
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -22,7 +22,7 @@ MISC_LIBS = @LIBM@ @LIBS@
+ LIBS = $(MISC_LIBS)
+
+ AM_CFLAGS = -I$(top_srcdir)/lib -I$(srcdir) -I.. $(CPPFLAGS)
+-LDADD = ../lib/libgnu.a $(LIBINTL)
++LDADD = ../lib/libgnu.a $(LIBINTL) $(TTYLIBS) $(NCURSES_LIBS)
+
+ SRCS = \
+ file-io.c \
diff --git a/app-misc/gcal/files/gcal-4.1-fortify.patch b/app-misc/gcal/files/gcal-4.1-fortify.patch
new file mode 100644
index 000000000000..bc3b3a693af9
--- /dev/null
+++ b/app-misc/gcal/files/gcal-4.1-fortify.patch
@@ -0,0 +1,21 @@
+https://bugs.gentoo.org/925560
+https://git.savannah.gnu.org/cgit/gcal.git/commit/?id=a9d49b3e6535ebf2b5a0b4051e95bb5dc0c27fdb
+
+From a9d49b3e6535ebf2b5a0b4051e95bb5dc0c27fdb Mon Sep 17 00:00:00 2001
+From: Oleg Derevenetz <oleg-derevenetz@yandex.ru>
+Date: Sun, 29 Nov 2020 17:42:07 +0100
+Subject: src/utils.c: fix segfault
+
+--- a/src/utils.c
++++ b/src/utils.c
+@@ -1354,7 +1354,7 @@ month_name (month)
+
+
+ len = (int) strlen (s) - 1;
+- mayname = (char *) my_malloc (len,
++ mayname = (char *) my_malloc (len + 2,
+ ERR_NO_MEMORY_AVAILABLE,
+ __FILE__, ((long) __LINE__) - 2L,
+ "mayname", 0);
+--
+cgit v1.1