netkit-ftp (0.17-27) 052_no_termcap_linking.diff

Summary

 configure    |  114 +++++++++++++++++++++++++++++------------------------------
 ftp/Makefile |    2 -
 2 files changed, 58 insertions(+), 58 deletions(-)

    
download this patch

Patch contents

Description: Remove explicit termcap linking.
 Present day libreadline includes all needed
 linking with libtinfo, so no explicit linking
 either with libncurses or libtermcap is needed.
Author: Mats Erik Andersson <debian@gisladisker.se>
Forwarded: no
Last-Update: 2012-03-26

diff -Naurp netkit-ftp-0.17.debian/configure netkit-ftp-0.17/configure
--- netkit-ftp-0.17.debian/configure
+++ netkit-ftp-0.17/configure
@@ -187,61 +187,61 @@ rm -f __conftest*
 
 ##################################################
 
-echo -n 'Checking for ncurses... '
-cat <<EOF >__conftest.c
-#include <stdio.h>
-#include <curses.h>
-#ifndef KEY_DOWN
-syntax error. /* not ncurses */
-#endif
-int main() {
-    endwin();
-    return 0;
-}
-
-EOF
-if (
-      $CC $CFLAGS  __conftest.c -lncurses -o __conftest || exit 1
-   ) >/dev/null 2>&1; then
-    echo 'yes'
-    NCURSES=1
-else
-    if (
-          $CC $CFLAGS -I/usr/include/ncurses __conftest.c -lncurses -o __conftest || exit 1
-       ) >/dev/null 2>&1; then
-        echo '-I/usr/include/ncurses'
-        CFLAGS="$CFLAGS -I/usr/include/ncurses"
-        NCURSES=1
-    else
-        echo 'no'
-    fi
-fi
-
-if [ x$NCURSES != x ]; then
-    LIBTERMCAP=-lncurses
-else
-    echo -n 'Checking for traditional termcap... '
-cat <<EOF >__conftest.c
-#include <stdio.h>
-#include <termcap.h>
-int main() {
-    tgetent(NULL, NULL); return 0;
-}
-
-EOF
-    if (
-          $CC $CFLAGS  __conftest.c -ltermcap -o __conftest || exit 1
-       ) >/dev/null 2>&1; then
-        echo '-ltermcap'
-        LIBTERMCAP=-ltermcap
-    else
-        echo 'not found'
-        echo 'This package needs termcap to run.'
-        rm -f __conftest*
-        exit
-    fi
-fi
-rm -f __conftest*
+#echo -n 'Checking for ncurses... '
+#cat <<EOF >__conftest.c
+##include <stdio.h>
+##include <curses.h>
+##ifndef KEY_DOWN
+#syntax error. /* not ncurses */
+##endif
+#int main() {
+#    endwin();
+#    return 0;
+#}
+#
+#EOF
+#if (
+#      $CC $CFLAGS  __conftest.c -lncurses -o __conftest || exit 1
+#   ) >/dev/null 2>&1; then
+#    echo 'yes'
+#    NCURSES=1
+#else
+#    if (
+#          $CC $CFLAGS -I/usr/include/ncurses __conftest.c -lncurses -o __conftest || exit 1
+#       ) >/dev/null 2>&1; then
+#        echo '-I/usr/include/ncurses'
+#        CFLAGS="$CFLAGS -I/usr/include/ncurses"
+#        NCURSES=1
+#    else
+#        echo 'no'
+#    fi
+#fi
+#
+#if [ x$NCURSES != x ]; then
+#    LIBTERMCAP=-lncurses
+#else
+#    echo -n 'Checking for traditional termcap... '
+#cat <<EOF >__conftest.c
+##include <stdio.h>
+##include <termcap.h>
+#int main() {
+#    tgetent(NULL, NULL); return 0;
+#}
+#
+#EOF
+#    if (
+#          $CC $CFLAGS  __conftest.c -ltermcap -o __conftest || exit 1
+#       ) >/dev/null 2>&1; then
+#        echo '-ltermcap'
+#        LIBTERMCAP=-ltermcap
+#    else
+#        echo 'not found'
+#        echo 'This package needs termcap to run.'
+#        rm -f __conftest*
+#        exit
+#    fi
+#fi
+#rm -f __conftest*
 
 ##################################################
 
@@ -278,7 +278,7 @@ int main() { readline("foo"); return 0;
 
 EOF
 if (
-      $CC $CFLAGS  __conftest.c -lreadline $LIBTERMCAP -o __conftest || exit 1
+      $CC $CFLAGS  __conftest.c -lreadline -o __conftest || exit 1
    ) >/dev/null 2>&1; then
         echo 'yes'
         USE_READLINE=1
@@ -436,7 +436,7 @@ echo 'Generating MCONFIG...'
     echo "LDFLAGS=$LDFLAGS" | sed 's/= */=/'
     echo "LIBS=$LIBS" | sed 's/= */=/'
 
-    echo "LIBTERMCAP=$LIBTERMCAP"
+    #echo "LIBTERMCAP=$LIBTERMCAP"
     echo "USE_GLIBC=$USE_GLIBC"
     echo "USE_READLINE=$USE_READLINE"
 ) > MCONFIG
diff -Naurp netkit-ftp-0.17.debian/ftp/Makefile netkit-ftp-0.17/ftp/Makefile
--- netkit-ftp-0.17.debian/ftp/Makefile	2012-03-26 11:50:15.000000000 +0200
+++ netkit-ftp-0.17/ftp/Makefile	2012-03-26 11:53:02.000000000 +0200
@@ -5,7 +5,7 @@ include ../MRULES
 
 ifeq ($(USE_READLINE),1)
 CFLAGS += -D__USE_READLINE__
-LIBS += -lreadline $(LIBTERMCAP)
+LIBS += -lreadline
 endif
 
 ftp: cmds.o cmdtab.o domacro.o ftp.o main.o ruserpass.o