Bug#898472: hunspell: needlessly linked with ncurses
Control: tags -1 + patch
On 2018-05-12 09:44 +0200, Sven Joachim wrote:
> The hunspell binary is linked with both ncursesw and ncurses, and the
> latter is redundant as can be seen in the dpkg-shlibdeps warning:
>
> ,----
> | dpkg-shlibdeps: warning: package could avoid a useless dependency if
> debian/hunspell/usr/bin/hunspell was not linked against
> libncurses.so.5 (it uses none of the library's symbols)
> `----
>
> AFAICS this stems from the fact that the readline check in configure.ac
> assumes it is necessary to link with -lncurses. I'll try to work out a
> patch once I have the bug number.
Attached is a patch to link with -ltinfo instead of -lncurses. In
principle even this would not be necessary (it is only required for
static linking), but linking with -ltinfo does not do harm since tinfo
gets pulled in via -lncursesw anyway.
Cheers,
Sven
Description: Prefer tinfo over ncurses in the readline check
This avoids having linked hunspell with both ncursesw and ncurses
unnecessarily.
Author: Sven Joachim <svenjoac@gmx.de>
Bug-Debian: https://bugs.debian.org/898472
---
--- hunspell-1.6.2.orig/configure.ac
+++ hunspell-1.6.2/configure.ac
@@ -78,8 +78,9 @@ AC_ARG_WITH(
)
rl=n
AS_IF([test "x$with_readline" != xno],
- [AC_CHECK_LIB(curses,tparm,TERMLIB=-lncurses,
- AC_CHECK_LIB(termcap,tgetent,TERMLIB=-ltermcap))
+ [AC_CHECK_LIB(tinfo,tgetent,TERMLIB=-ltinfo,
+ AC_CHECK_LIB(curses,tparm,TERMLIB=-lncurses,
+ AC_CHECK_LIB(termcap,tgetent,TERMLIB=-ltermcap)))
LDSAVE=$LDFLAGS
LDFLAGS="$LDFLAGS $TERMLIB"
AC_CHECK_LIB(readline,readline,
Reply to: