summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/abook/files/abook-0.6.1-use-PKG_CHECK_MODULES-for-ncurses.patch')
-rw-r--r--app-misc/abook/files/abook-0.6.1-use-PKG_CHECK_MODULES-for-ncurses.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/app-misc/abook/files/abook-0.6.1-use-PKG_CHECK_MODULES-for-ncurses.patch b/app-misc/abook/files/abook-0.6.1-use-PKG_CHECK_MODULES-for-ncurses.patch
new file mode 100644
index 000000000000..8d7a6cddd7cb
--- /dev/null
+++ b/app-misc/abook/files/abook-0.6.1-use-PKG_CHECK_MODULES-for-ncurses.patch
@@ -0,0 +1,68 @@
+From 243d3c265289171f59de68f5da4de086afb58215 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 31 Jul 2021 03:21:28 +0100
+Subject: [PATCH] Use PKG_CHECK_MODULES for ncurses
+
+We don't _always_ have split tinfo, e.g. Prefix.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ Makefile.am | 4 ++--
+ configure.ac | 26 +-------------------------
+ 2 files changed, 3 insertions(+), 27 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 8faaa11..18c6892 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -22,8 +22,8 @@ abook_SOURCES = abook.c abook_rl.c database.c edit.c \
+ EXTRA_DIST = config.rpath ANNOUNCE BUGS FAQ abook.1 abookrc.5 sample.abookrc \
+ abook.spec contrib doc/HOWTO.translating_abook RELEASE_NOTES
+
+-abook_LDADD = @LIBINTL@
+-
++abook_CFLAGS = $(ncurses_CFLAGS)
++abook_LDADD = @LIBINTL@ $(ncurses_LIBS)
+
+ install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5
+diff --git a/configure.ac b/configure.ac
+index 5a9ae3b..73a7af0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -74,31 +74,7 @@ dnl -------------------
+ dnl (n)curses detection
+ dnl -------------------
+
+-abook_cv_curses=/usr
+-AC_ARG_WITH(curses, [ --with-curses=DIR Where ncurses is installed ],
+- [if test $withval != yes; then
+- abook_cv_curses=$withval
+- fi
+- if test x$abook_cv_curses != x/usr; then
+- LDFLAGS="-L${abook_cv_curses}/lib $LDFLAGS"
+- CPPFLAGS="$CPPFLAGS -I${abook_cv_curses}/include"
+- fi])
+-
+-AC_CHECK_LIB(ncursesw, initscr,
+- [LIBS="$LIBS -lncursesw"
+- if test x$abook_cv_curses = x/usr -a -d /usr/include/ncursesw; then
+- CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
+- fi
+- AC_CHECK_HEADERS(ncurses.h)],[
+- ac_widec_possible=no
+- AC_CHECK_LIB(ncurses, initscr,
+- [LIBS="$LIBS -lncurses"
+- if test x$abook_cv_curses = x/usr -a -d /usr/include/ncurses; then
+- CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"
+- fi
+- AC_CHECK_HEADERS(ncurses.h)],
+- [CF_CURSES_LIBS])
+- ])
++PKG_CHECK_MODULES(ncurses, [ncursesw ncurses])
+
+ dnl --------------------------
+ dnl end of (n)curses detection
+--
+2.32.0
+