qingy-1.0.0-tinfo.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Use ncurses.pc to get Libs: instead of using AC_CHECK_LIB because ncurses can be configured
  2. to have separate termcap library called libtinfo; and we need both -ltinfo and -lncurses for
  3. linking since symbols are used from both
  4. http://bugs.gentoo.org/459650
  5. --- configure.in
  6. +++ configure.in
  7. @@ -125,12 +125,7 @@
  8. # End compile emacs stuff
  9. # Check for ncurses
  10. - HEADERS="curses.h term.h"
  11. - NCURSESLIB=""
  12. - AC_CHECK_HEADERS([$HEADERS],,[AC_MSG_ERROR([$HEADERS_ERROR_MESSAGE])],)
  13. - AC_CHECK_LIB(ncurses, setupterm, [NCURSESLIB="-lncurses"],[AC_MSG_ERROR([$LIBRARIES_ERROR_MESSAGE])] , )
  14. - AC_CHECK_LIB(ncurses, tputs, [NCURSESLIB="-lncurses"],[AC_MSG_ERROR([$LIBRARIES_ERROR_MESSAGE])] , )
  15. - AC_SUBST(NCURSESLIB)
  16. + PKG_CHECK_MODULES(NCURSES, ncurses, [], [AC_MSG_ERROR([$LIBRARIES_ERROR_MESSAGE])])
  17. # End check for ncurses
  18. # Check for PAM support
  19. --- src/libraries/Makefile.am
  20. +++ src/libraries/Makefile.am
  21. @@ -4,7 +4,7 @@
  22. INCLUDES = -I../.. -I../
  23. BUILT_SOURCES = parse_settings.h
  24. -AM_CFLAGS = -DSETTINGS_DIR=\"$(sysconfdir)/qingy\" -DSBINDIR=\"$(sbindir)/\"
  25. +AM_CFLAGS = -DSETTINGS_DIR=\"$(sysconfdir)/qingy\" -DSBINDIR=\"$(sbindir)/\" $(NCURSES_CFLAGS)
  26. if !WANT_STATIC
  27. pkglib_LTLIBRARIES = libqingy.la
  28. @@ -35,7 +35,7 @@
  29. EXTRA_libqingy_la_SOURCES = \
  30. crypto_openssl.c crypto_libgcrypt.c crypto.h
  31. -libqingy_la_LIBADD = @PASSWDLIB@ @CRYPTOLIB@ @NCURSESLIB@ @XLIBS@
  32. +libqingy_la_LIBADD = @PASSWDLIB@ @CRYPTOLIB@ @XLIBS@ $(NCURSES_LIBS)
  33. libqingy_la_LDFLAGS = -release @VERSION@
  34. libqingy_static_la_SOURCES = $(libqingy_la_SOURCES)