Subject: tcsh and Linux and ncurses
To: maintainer for pkgsrc's tcsh <kim@tac.nyc.ny.us>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 08/26/2004 18:20:54
I need to build tcsh under Linux (using pkgsrc).

It fails for me with:

gcc -o tcsh -L/usr/gcc3/lib/gcc-lib/i386-pc-linux/3.3.3
-Wl,-R/usr/gcc3/lib/gcc-lib/i386-pc-linux/3.3.3 -L/usr/gcc3/lib
-Wl,-R/usr/gcc3/lib -L/usr/lib -Wl,-R/usr/lib -g -s -I/usr/include -I. -I.
sh.o sh.dir.o sh.dol.o sh.err.o sh.exec.o  sh.char.o sh.exp.o sh.file.o
sh.func.o  sh.glob.o sh.hist.o sh.init.o sh.lex.o  sh.misc.o sh.parse.o
sh.print.o sh.proc.o  sh.sem.o sh.set.o sh.time.o glob.o  mi.termios.o
ma.setp.o vms.termcap.o tw.help.o tw.init.o tw.parse.o tw.spell.o
tw.comp.o tw.color.o ed.chared.o ed.refresh.o ed.screen.o ed.init.o
ed.inputl.o ed.defns.o ed.xmap.o ed.term.o tc.alloc.o tc.bind.o tc.const.o
tc.defs.o  tc.disc.o tc.func.o tc.os.o tc.printf.o  tc.prompt.o tc.sched.o
tc.sig.o tc.str.o  tc.vers.o tc.who.o -lcrypt
ed.screen.o(.text+0x1925): In function `EchoTC':
/scratch/pkgsrc/shells/tcsh/work.puget/tcsh-6.13.00/ed.screen.c:693:
undefined reference to `tgetstr'
ed.screen.o(.text+0x1948):/scratch/pkgsrc/shells/tcsh/work.puget/tcsh-6.13.00/ed.screen.c:695:
undefined reference to `tgetflag'


Well I need ncurses. The configure doesn't even check for ncurses
(starting with letter "n"). I added:

.include "../../devel/ncurses/buildlink3.mk"

And patch-ab:

$NetBSD$

--- configure.orig	2003-06-18 12:32:43.000000000 -0700
+++ configure
@@ -2876,7 +2876,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 if test "$ac_cv_search_tgetent" = no; then
-  for ac_lib in termlib curses termcap; do
+  for ac_lib in termlib curses ncurses termcap; do
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
     cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"


But then the build would fail like:

===> Checking for vulnerabilities in tcsh-6.13.00
===> Building for tcsh-6.13.00
C
et
../tcsh.et.m:4: invalid character: message ignored
../tcsh.et.m:6: invalid character: message ignored
../tcsh.et.m:9: invalid character: message ignored
../tcsh.et.m:10: invalid character: message ignored
...
../tcsh.et.m:723: invalid character: message ignored
*** Error code 1

Stop.
make: stopped in /scratch/pkgsrc/shells/tcsh/work.puget/tcsh-6.13.00/nls



Any suggestions?


 Jeremy C. Reed

p.s. Does anyone care if I add to pkgsrc a variable called TERM_TYPE that
can be set to curses or termcap or ncurses? It can default to "termcap"
and so the packages that don't have a ncurses dependency could just
default to same behaviour as now.