summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-04 04:27:06 +0000
committerSam James <sam@gentoo.org>2023-01-04 04:32:01 +0000
commita8ca9a0a204936a5a2b0479067d36787660985a4 (patch)
tree5462119baefa855ae3149762cadb0cccc00e6c45 /app-misc/gcal
parentapp-misc/gcal: drop 3.6.3 (diff)
downloadgentoo-a8ca9a0a204936a5a2b0479067d36787660985a4.tar.gz
gentoo-a8ca9a0a204936a5a2b0479067d36787660985a4.tar.bz2
gentoo-a8ca9a0a204936a5a2b0479067d36787660985a4.zip
app-misc/gcal: fix configure w/ clang 16
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-misc/gcal')
-rw-r--r--app-misc/gcal/files/gcal-4.1-configure-clang16.patch31
-rw-r--r--app-misc/gcal/gcal-4.1-r1.ebuild (renamed from app-misc/gcal/gcal-4.1.ebuild)20
2 files changed, 47 insertions, 4 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/gcal-4.1.ebuild b/app-misc/gcal/gcal-4.1-r1.ebuild
index ee18f98e3850..39a20a9fc729 100644
--- a/app-misc/gcal/gcal-4.1.ebuild
+++ b/app-misc/gcal/gcal-4.1-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit flag-o-matic toolchain-funcs
+inherit autotools flag-o-matic toolchain-funcs
DESCRIPTION="The GNU Calendar - a replacement for cal"
HOMEPAGE="https://www.gnu.org/software/gcal/"
@@ -24,12 +24,24 @@ BDEPEND="
DOCS=( BUGS LIMITATIONS NEWS README THANKS TODO )
-PATCHES=( "${FILESDIR}/${P}-glibc228.patch" )
+PATCHES=(
+ "${FILESDIR}/${P}-glibc228.patch"
+ "${FILESDIR}/${PN}-4.1-configure-clang16.patch"
+)
+
+src_prepare() {
+ default
+
+ # Drop once ${PN}-4.1-configure-clang16.patch merged
+ eautoreconf
+}
src_configure() {
tc-export CC
append-cppflags -D_GNU_SOURCE
+
use unicode && append-libs -lunistring
+
econf \
--disable-rpath \
$(use_enable nls) \