[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Building ncurses-5.7 on Mac OS X: workaround and installation bug fix
From: |
Nelson H. F. Beebe |
Subject: |
Building ncurses-5.7 on Mac OS X: workaround and installation bug fix |
Date: |
Fri, 3 Apr 2009 15:59:26 -0600 (MDT) |
I recently built ncurses-5.7 on Mac OS X 10.5 PowerPC
% sw_vers
ProductName: Mac OS X
ProductVersion: 10.5.6
BuildVersion: 9G55
% uname -a
Darwin XXXX.math.utah.edu 9.6.0 Darwin Kernel Version 9.6.0:
Mon Nov 24 17:39:01 PST 2008; root:xnu-1228.9.59~1/RELEASE_PPC
Power Macintosh powerpc PowerMac3,6 Darwin
The build required manual patches of Makefiles after the configure
run, with changes like this:
105 XXXX:ncurses-5.7 % foreach f (./c++/Makefile ./ncurses/Makefile
./progs/Makefile ./test/Makefile)
foreach? echo ========= $f
foreach? diff $f.~1~ $f
foreach? end
========= ./c++/Makefile
114a115
> TEST_ARGS = -L../lib -lform -lmenu -lpanel -lncurses -dynamic
========= ./ncurses/Makefile
157a158
> TEST_ARGS = -L../lib -lform -lmenu -lpanel -lncurses -dynamic
========= ./progs/Makefile
112a113
> LIBS_TIC = -L../lib -lncurses -L../lib -lncurses -dynamic
115a117
> LIBS_TINFO = -L../lib -lncurses -dynamic
========= ./test/Makefile
91a92
> TEST_ARGS = -L../lib -lform -lmenu -lpanel -lncurses -dynamic
106a108
> LIBS_TINFO = -L../lib -lncurses -dynamic $(TEST_LIBS) $(MATH_LIB)
This system refuses to link with -static and -dynamic in the command
line; my patches removed the -static option.
Subsequently, we found that the "clear" command was failing on some
systems with this message:
'xterm-color': unknown terminal type.
Further problem and experimentation found the problem:
A search of the ncurses source code found this comment in
ncurses/curses.priv.h:
/*
* The filesystem database normally uses a single-letter for the lower level
* of directories. Use a hexadecimal code for filesystems which do not
* preserve mixed-case names.
*/
#if MIXEDCASE_FILENAMES
#define LEAF_FMT "%c"
#else
#define LEAF_FMT "%02x"
#endif
I therefore ran this command in the installed terminfo directory:
awk 'BEGIN{for (k = 97; k <= 122; ++k) printf("ln -s %c %02x\n", k,
k)}' | sh
That executed the series of commands
ln -s a 61
ln -s b 62
...
ln -s y 79
ln -s z 7a
Now the "clear" command can find its terminfo entry.
These links need to be created by "make install" on Mac OS X systems
that have case-insensitive filesystems. It would presumably be
innocuous to create them on all platforms.
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: address@hidden -
- 155 S 1400 E RM 233 address@hidden address@hidden -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
- Building ncurses-5.7 on Mac OS X: workaround and installation bug fix,
Nelson H. F. Beebe <=