From 44eedc5c44416a97b3f5ca03d596ec3c9fb29380 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 9 Oct 2004 02:49:33 +0000 Subject: facelift step number two --- package/netkittelnet/netkittelnet.mk | 3 +- package/netkittelnet/netkittelnet.patch | 171 ++++++++++++++++++++++++++++++++ 2 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 package/netkittelnet/netkittelnet.patch (limited to 'package/netkittelnet') diff --git a/package/netkittelnet/netkittelnet.mk b/package/netkittelnet/netkittelnet.mk index 401b885ca..9243b4c6f 100644 --- a/package/netkittelnet/netkittelnet.mk +++ b/package/netkittelnet/netkittelnet.mk @@ -9,7 +9,6 @@ NETKITTELNET_DIR:=$(BUILD_DIR)/netkit-telnet-0.17 NETKITTELNET_CAT:=zcat NETKITTELNET_BINARY:=telnetd/telnetd NETKITTELNET_TARGET_BINARY:=usr/sbin/telnetd -NETKITTELNET_PATCH:=$(SOURCE_DIR)/netkittelnet.patch $(DL_DIR)/$(NETKITTELNET_SOURCE): $(WGET) -P $(DL_DIR) $(NETKITTELNET_SITE)/$(NETKITTELNET_SOURCE) @@ -23,7 +22,7 @@ $(NETKITTELNET_DIR)/.unpacked: $(DL_DIR)/$(NETKITTELNET_SOURCE) # Disable termcap support $(SED) "s~\(.*termcap\.h.*\)~/* \1 */~;" $(NETKITTELNET_DIR)/telnetd/telnetd.c # don't try to run cross compiled binaries while configuring things - cat $(NETKITTELNET_PATCH) | patch -p1 -d $(NETKITTELNET_DIR) + toolchain/patch-kernel.sh $(NETKITTELNET_DIR) package/netkittelnet/ netkittelnet\*.patch touch $(NETKITTELNET_DIR)/.unpacked $(NETKITTELNET_DIR)/.configured: $(NETKITTELNET_DIR)/.unpacked diff --git a/package/netkittelnet/netkittelnet.patch b/package/netkittelnet/netkittelnet.patch new file mode 100644 index 000000000..c894c2abd --- /dev/null +++ b/package/netkittelnet/netkittelnet.patch @@ -0,0 +1,171 @@ +--- netkit-telnet-0.17/configure Thu Apr 11 10:40:58 2002 ++++ FIXEDnetkittelnet/configure Thu Apr 11 10:39:59 2002 +@@ -78,7 +78,6 @@ + for TRY in egcs gcc g++ CC c++ cc; do + ( + $TRY __conftest.c -o __conftest || exit 1; +- ./__conftest || exit 1; + ) >/dev/null 2>&1 || continue; + CC=$TRY + break; +@@ -94,7 +93,6 @@ + echo -n 'Checking if C compiler works... ' + if ( + $CC __conftest.c -o __conftest || exit 1 +- ./__conftest || exit 1 + ) >/dev/null 2>&1; then + echo 'yes' + else +@@ -125,7 +123,6 @@ + for TRY in egcs gcc g++ CC c++ cc; do + ( + $TRY __conftest.cc -o __conftest || exit 1; +- ./__conftest || exit 1; + ) >/dev/null 2>&1 || continue; + CXX=$TRY + break; +@@ -141,7 +138,6 @@ + echo -n 'Checking if C++ compiler works... ' + if ( + $CXX __conftest.cc -o __conftest || exit 1 +- ./__conftest || exit 1 + ) >/dev/null 2>&1; then + echo 'yes' + else +@@ -278,13 +274,11 @@ + EOF + if ( + $CXX $CXXFLAGS __conftest.cc -o __conftest || exit 1 +- ./__conftest || exit 1 + ) >/dev/null 2>&1; then + echo 'yes' + else + if ( + $CXX $CXXFLAGS -D__USE_BSD_SIGNAL __conftest.cc -o __conftest || exit 1 +- ./__conftest || exit 1 + ) >/dev/null 2>&1; then + echo '-D__USE_BSD_SIGNAL' + CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL" +@@ -292,6 +286,7 @@ + else + echo 'no' + echo 'This package needs BSD signal semantics to run.' ++ echo "$CXX $CXXFLAGS -D__USE_BSD_SIGNAL __conftest.cc -o __conftest failed" + rm -f __conftest* + exit + fi +@@ -330,31 +325,6 @@ + echo 'no' + fi + fi +- +-if [ x$NCURSES != x ]; then +- LIBTERMCAP=-lncurses +-else +- echo -n 'Checking for traditional termcap... ' +-cat <__conftest.cc +-#include +-#include +-int main(void) { +- tgetent(NULL, NULL); return 0; +-} +- +-EOF +- if ( +- $CXX $CXXFLAGS __conftest.cc -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* + + ################################################## +@@ -468,7 +438,6 @@ + else + if ( + $CXX $CXXFLAGS -D_GNU_SOURCE __conftest.cc -o __conftest || exit 1 +- ./__conftest || exit 1 + ) >/dev/null 2>&1; then + echo '-D_GNU_SOURCE' + CFLAGS="$CFLAGS -D_GNU_SOURCE" +@@ -501,20 +470,17 @@ + EOF + if ( + $CXX $CXXFLAGS __conftest.cc $LIBBSD -o __conftest || exit 1 +- ./__conftest || exit 1 + ) >/dev/null 2>&1; then + echo 'ok' + else + if ( + $CXX $CXXFLAGS __conftest.cc -lsnprintf $LIBBSD -o __conftest || exit 1 +- ./__conftest || exit 1 + ) >/dev/null 2>&1; then + echo '-lsnprintf' + LIBS="$LIBS -lsnprintf" + else + if ( + $CXX $CXXFLAGS __conftest.cc -ldb $LIBBSD -o __conftest || exit 1 +- ./__conftest || exit 1 + ) >/dev/null 2>&1; then + echo '-ldb' + LIBS="$LIBS -ldb" +diff -urN netkit-telnet-0.17/telnetd/state.c netkit-telnet-0.17-dm/telnetd/state.c +--- netkit-telnet-0.17/telnetd/state.c 1999-12-12 11:41:44.000000000 -0800 ++++ netkit-telnet-0.17-dm/telnetd/state.c 2003-07-23 19:20:38.000000000 -0700 +@@ -43,10 +43,10 @@ + + static int envvarok(char *varp); + +-static unsigned char doopt[] = { IAC, DO, '%', 'c', 0 }; +-static unsigned char dont[] = { IAC, DONT, '%', 'c', 0 }; +-unsigned char will[] = { IAC, WILL, '%', 'c', 0 }; +-unsigned char wont[] = { IAC, WONT, '%', 'c', 0 }; ++//static unsigned char doopt[] = { IAC, DO, '%', 'c', 0 }; ++//static unsigned char dont[] = { IAC, DONT, '%', 'c', 0 }; ++//unsigned char will[] = { IAC, WILL, '%', 'c', 0 }; ++//unsigned char wont[] = { IAC, WONT, '%', 'c', 0 }; + + /* + * Buffer for sub-options, and macros +@@ -422,7 +422,7 @@ + set_his_want_state_will(option); + do_dont_resp[option]++; + } +- netoprintf((char *)doopt, option); ++ netoprintf( "%c%c%c", IAC, DO, option ); + + DIAG(TD_OPTIONS, printoption("td: send do", option)); + } +@@ -632,7 +632,7 @@ + set_his_want_state_wont(option); + do_dont_resp[option]++; + } +- netoprintf((char *) dont, option); ++ netoprintf ( "%c%c%c", IAC, DONT, option ); + + DIAG(TD_OPTIONS, printoption("td: send dont", option)); + } +@@ -769,7 +769,7 @@ + set_my_want_state_will(option); + will_wont_resp[option]++; + } +- netoprintf((char *) will, option); ++ netoprintf( "%c%c%c", IAC, WILL, option); + + DIAG(TD_OPTIONS, printoption("td: send will", option)); + } +@@ -917,7 +917,7 @@ + set_my_want_state_wont(option); + will_wont_resp[option]++; + } +- netoprintf((char *)wont, option); ++ netoprintf( "%c%c%c", IAC, WONT, option); + + DIAG(TD_OPTIONS, printoption("td: send wont", option)); + } -- cgit v1.2.3