Control: tags -1 + patch

On 2015-11-04 20:02 +0100, Sven Joachim wrote:

> Source: slrn
> Version: 1.0.2-3
>
> Your package currently FTBFS in unstable.  From my pbuilder log:
>
> ,----
> | gcc /build/slrn-1.0.2/src/objs/chkslang.o -Wl,-z,relro -o
> | /build/slrn-1.0.2/src/objs/chkslang -lslang -luu -lcanlock
> | -L/usr/lib/i386-linux-gnu/lib -lgnutls -lgnutls-openssl -ltermcap
> | /usr/bin/ld: cannot find -ltermcap
> `----
>
> This is an unexpected fallout from the fix for bug #745479[1], I did not
> really consider it possible that packages use the ncurses5-config script
> without a build dependency on libncurses5-dev.  Anyway, here's the
> analysis:
>
> The configure script tries to run "ncurses5-config --terminfo", and if
> this does not succeed, uses a hardcoded list of terminfo directories
> which unfortunately does not include the directories /etc/terminfo and
> /lib/terminfo which we ship in ncurses-base.  Failing to find a terminfo
> directory, it then concludes that the system must be using termcap and
> adds "-ltermcap" to the linker line which fails.
>
> I will work around that by shipping an /usr/share/terminfo directory in
> ncurses-base, but slrn might still FTBFS on the buildds until they
> upgrade their base system.
>
> Properly fixing this bug requires patching the buggy
> AC_DEFUN([JD_TERMCAP] in autoconf/aclocal.m4, or just removing the call
> to it from autoconf/configure.ac (I think this test is completely
> unnecessary, but haven't checked thoroughly yet).

Another possibility is to patch src/Makefile.in and remove @TERMCAP@ from
there (the buggy test replaces it with "-ltermcap"), see the attached
patch.

While working on slrn, I noticed two additional minor problems:

- debian/README.source is a leftover from the dpatch days and can safely
  be deleted.

- debian/source/options is missing a final newline and should actually
  read "extend-diff-ignore = ^configure$".  I had edited
  autoconf/configure.ac, and "dpkg-source --commit" told me that there
  were no local changes to record.

Thanks for consideration,

Sven


diff -Nru slrn-1.0.2/debian/patches/do-not-link-with-termcap.patch slrn-1.0.2/debian/patches/do-not-link-with-termcap.patch
--- slrn-1.0.2/debian/patches/do-not-link-with-termcap.patch	1970-01-01 01:00:00.000000000 +0100
+++ slrn-1.0.2/debian/patches/do-not-link-with-termcap.patch	2015-11-05 09:55:15.000000000 +0100
@@ -0,0 +1,25 @@
+Description: <short summary of the patch>
+ The configure script tries to run "ncurses5-config --terminfo", and if
+ this does not succeed, uses a hardcoded list of terminfo directories
+ which unfortunately does not include the directories /etc/terminfo and
+ /lib/terminfo which we ship in ncurses-base.  Failing to find a terminfo
+ directory, it then concludes that the system must be using termcap and
+ adds "-ltermcap" to the linker line which fails.
+ .
+ This patch fixes the problem by not linking with -ltermcap.
+Author: Sven Joachim <[email protected]>
+Bug-Debian: https://bugs.debian.org/804084
+
+---
+
+--- slrn-1.0.2.orig/src/Makefile.in
++++ slrn-1.0.2/src/Makefile.in
+@@ -25,7 +25,7 @@ ICONV_LIB       = @LIBICONV@ @LIBINTL@
+ #-----------------------------------------------------------------------------
+ # System Libraries
+ #-----------------------------------------------------------------------------
+-SYSLIBS = @X_EXTRA_LIBS@ @TERMCAP@
++SYSLIBS = @X_EXTRA_LIBS@
+ 
+ #-----------------------------------------------------------------------------
+ RPATH		= @RPATH@
diff -Nru slrn-1.0.2/debian/patches/series slrn-1.0.2/debian/patches/series
--- slrn-1.0.2/debian/patches/series	2015-09-07 17:46:06.000000000 +0200
+++ slrn-1.0.2/debian/patches/series	2015-11-05 09:52:54.000000000 +0100
@@ -1,2 +1,3 @@
 update-paths.patch
 reproducible-build.patch
+do-not-link-with-termcap.patch

Reply via email to