pkgsrc/devel/ncurses/Makefile

67 lines
1.8 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.43 2003/02/15 00:36:40 salo Exp $
1997-10-27 05:28:54 +01:00
DISTNAME= ncurses-${NC_VERS}
Update to 5.3: Interface changes: * change type for bool used in headers to NCURSES_BOOL, which usually is the same as the compiler's definition for bool. * add all but two functions for X/Open curses wide-character support. These are only available if the library is configured using the --enable-widec option. Missing functions are * pecho_wchar() * slk_wset() * add environment variable $NCURSES_ASSUMED_COLORS to modify the assume_default_colors() extension. New features and improvements: * Improved support for termcap applications: * add logic to dump_entry.c to remove function-key definitions that do not fit into the 1023-byte limit for generated termcaps. This makes hds200 fit. * modify tgetent() to check if exit_attribute_mode resets the alternate character set, and if so, attempt to adjust the copy of the termcap "me" string which it will return to eliminate that part. In particular, 'screen' would lose track of line-drawing characters. * add check/fix to comp_parse.c to suppress warning about missing acsc string. This happens in configurations where raw termcap information is processed; tic already does this and other checks. * add tic -A option to suppress capabilities which are commented out when translating to termcap. * modify logic in lib_baudrate.c for ospeed, for FreeBSD to make it work properly for termcap applications (patch by Andrey A Chernov). * add a call to _nc_keypad() in keypad() to accommodate applications such as nvi, which use curses for output but not for input (fixes Debian #131263, cf: 20011215). * correct logic for COLORFGBG environment variable: if rxvt is compiled with xpm support, the variable has three fields, making it slightly incompatible with itself. In either case, the background color is the last field. Major bug fixes: * rewrote limit-checks in wscrl() and associated _nc_scroll_window(), to ensure that if the parameter of wscrl() is larger than the size of the scrolling region, then the scrolling region will be cleared. * modify tset to restore original I/O modes if an error is encountered. Also modify to use buffered stderr consistently rather than mixing with write(). * move calls to def_shell_mode() and def_prog_mode() before loop with callbacks in lib_set_term.c, since the c++ demo otherwise initialized the tty modes before saving them. * modified wresize() to ensure that a failed realloc will not corrupt the window structure, and to make subwindows fit within the resized window. * altered resizeterm() to avoid having it fail when a child window cannot be resized because it would be larger than its parent. * correct/improve logic to produce an exit status for errors in tput, which did not exit with an error when told to put a string not in the current terminfo entry. * modify behavior of can_clear_with() so that if an application is running in a non-bce terminals with default colors enabled, it returns true, allowing the user to select/paste text without picking up extraneous trailing blanks. * add a check in relative_move() to guard against buffer overflow in the overwrite logic. * add some limit/pointer checks to -S option of tputs. * modify mvcur() to avoid emitting newline characters when nonl() mode is set. Normally this is not a problem since the actual terminal mode is set to suppress nl/crlf translations, however it is useful to allow the caller to manipulate the terminal mode to avoid staircasing effects after spawning a process which writes messages (for lynx 2.8.4). Portability: * configure script: * modify check in --disable-overwrite option so that it is used by default unless the --prefix/$prefix value is not /usr, in attempt to work around packagers who do not read the INSTALL notes. * correct a typo in configure --enable-colorfgbg option, and move it to the experimental section (cf: 20011208). * modify configure script to allow building with termcap only, or with fallbacks only. In this case, we do not build tic and toe. * modify run_tic.sh to check if the build is a cross-compile. In that case, do not use the build's tic to install the terminfo database. * modify c++/Makefile.in to accommodate archive programs that are different for C++ than for C, and add cases for vendor's C++ compilers on Solaris and IRIX. * add several configure script options to aid with cross-compiling: --with-build-cc, --with-build-cflags, --with-build-ldflags, and --with-build-libs. * add experimental --with-caps=XXX option to customize to similar terminfo database formats such as AIX 4.x * add configure option --with-ospeed to assist packagers in transition to 5.3 change to ospeed type. * library: * implement a simple vsscanf() fallback function which uses the %n conversion to help parse the input data. * various fixes to build/work with different implementations of vsscanf(). * add/use macro to suppress sign-extension of char type on platforms where this is a problem in ctype macros, e.g., Solaris. * finish changes needed to build dll's on cygwin. * add #undef's before possible redefinition of ERR and OK in curses.h * programs: * modify ifdef's in write_entry.c to allow use of symbolic links on platforms with no hard links, e.g., BeOS. * modify _nc_write_entry() to allow for the possibility that linking aliases on a filesystem that ignores case would not succeed because the source and destination differ only by case, e.g., NCR260VT300WPP0 on cygwin. * modify logic in tic, toe, tput and tset which checks for basename of argv[0] to work properly on systems such as OS/2 which have case-independent filenames and/or program suffixes, e.g., ".ext".
2003-01-21 12:05:16 +01:00
NC_VERS= 5.3
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:=ncurses/} \
ftp://dickey.his.com/ncurses/ \
ftp://dickey.his.com/ncurses/${NC_VERS}/
MAINTAINER= jlam@netbsd.org
HOMEPAGE= http://dickey.his.com/ncurses/ncurses.html
COMMENT= CRT screen handling and optimization package
USE_LIBTOOL= YES
USE_BUILDLINK2= YES
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --with-libtool
CONFIGURE_ARGS+= --enable-bsdpad
Update to 5.3: Interface changes: * change type for bool used in headers to NCURSES_BOOL, which usually is the same as the compiler's definition for bool. * add all but two functions for X/Open curses wide-character support. These are only available if the library is configured using the --enable-widec option. Missing functions are * pecho_wchar() * slk_wset() * add environment variable $NCURSES_ASSUMED_COLORS to modify the assume_default_colors() extension. New features and improvements: * Improved support for termcap applications: * add logic to dump_entry.c to remove function-key definitions that do not fit into the 1023-byte limit for generated termcaps. This makes hds200 fit. * modify tgetent() to check if exit_attribute_mode resets the alternate character set, and if so, attempt to adjust the copy of the termcap "me" string which it will return to eliminate that part. In particular, 'screen' would lose track of line-drawing characters. * add check/fix to comp_parse.c to suppress warning about missing acsc string. This happens in configurations where raw termcap information is processed; tic already does this and other checks. * add tic -A option to suppress capabilities which are commented out when translating to termcap. * modify logic in lib_baudrate.c for ospeed, for FreeBSD to make it work properly for termcap applications (patch by Andrey A Chernov). * add a call to _nc_keypad() in keypad() to accommodate applications such as nvi, which use curses for output but not for input (fixes Debian #131263, cf: 20011215). * correct logic for COLORFGBG environment variable: if rxvt is compiled with xpm support, the variable has three fields, making it slightly incompatible with itself. In either case, the background color is the last field. Major bug fixes: * rewrote limit-checks in wscrl() and associated _nc_scroll_window(), to ensure that if the parameter of wscrl() is larger than the size of the scrolling region, then the scrolling region will be cleared. * modify tset to restore original I/O modes if an error is encountered. Also modify to use buffered stderr consistently rather than mixing with write(). * move calls to def_shell_mode() and def_prog_mode() before loop with callbacks in lib_set_term.c, since the c++ demo otherwise initialized the tty modes before saving them. * modified wresize() to ensure that a failed realloc will not corrupt the window structure, and to make subwindows fit within the resized window. * altered resizeterm() to avoid having it fail when a child window cannot be resized because it would be larger than its parent. * correct/improve logic to produce an exit status for errors in tput, which did not exit with an error when told to put a string not in the current terminfo entry. * modify behavior of can_clear_with() so that if an application is running in a non-bce terminals with default colors enabled, it returns true, allowing the user to select/paste text without picking up extraneous trailing blanks. * add a check in relative_move() to guard against buffer overflow in the overwrite logic. * add some limit/pointer checks to -S option of tputs. * modify mvcur() to avoid emitting newline characters when nonl() mode is set. Normally this is not a problem since the actual terminal mode is set to suppress nl/crlf translations, however it is useful to allow the caller to manipulate the terminal mode to avoid staircasing effects after spawning a process which writes messages (for lynx 2.8.4). Portability: * configure script: * modify check in --disable-overwrite option so that it is used by default unless the --prefix/$prefix value is not /usr, in attempt to work around packagers who do not read the INSTALL notes. * correct a typo in configure --enable-colorfgbg option, and move it to the experimental section (cf: 20011208). * modify configure script to allow building with termcap only, or with fallbacks only. In this case, we do not build tic and toe. * modify run_tic.sh to check if the build is a cross-compile. In that case, do not use the build's tic to install the terminfo database. * modify c++/Makefile.in to accommodate archive programs that are different for C++ than for C, and add cases for vendor's C++ compilers on Solaris and IRIX. * add several configure script options to aid with cross-compiling: --with-build-cc, --with-build-cflags, --with-build-ldflags, and --with-build-libs. * add experimental --with-caps=XXX option to customize to similar terminfo database formats such as AIX 4.x * add configure option --with-ospeed to assist packagers in transition to 5.3 change to ospeed type. * library: * implement a simple vsscanf() fallback function which uses the %n conversion to help parse the input data. * various fixes to build/work with different implementations of vsscanf(). * add/use macro to suppress sign-extension of char type on platforms where this is a problem in ctype macros, e.g., Solaris. * finish changes needed to build dll's on cygwin. * add #undef's before possible redefinition of ERR and OK in curses.h * programs: * modify ifdef's in write_entry.c to allow use of symbolic links on platforms with no hard links, e.g., BeOS. * modify _nc_write_entry() to allow for the possibility that linking aliases on a filesystem that ignores case would not succeed because the source and destination differ only by case, e.g., NCR260VT300WPP0 on cygwin. * modify logic in tic, toe, tput and tset which checks for basename of argv[0] to work properly on systems such as OS/2 which have case-independent filenames and/or program suffixes, e.g., ".ext".
2003-01-21 12:05:16 +01:00
CONFIGURE_ARGS+= --enable-overwrite
CONFIGURE_ARGS+= --with-cxx-binding
CONFIGURE_ARGS+= --without-ada
CONFIGURE_ARGS+= --without-curses-h
CONFIGURE_ARGS+= --without-gpm
CONFIGURE_ARGS+= --with-manpage-format=normal
CONFIGURE_ARGS+= --with-manpage-tbl
.include "../../mk/bsd.prefs.mk"
.if (${OPSYS} == SunOS)
PLIST_SUBST+= NOT_SUNOS="@comment "
TERMINFO_SRC= ${WRKSRC}/misc/terminfo.src
TERMINFODIR= share/lib/terminfo
.else
PLIST_SUBST+= NOT_SUNOS=""
TERMINFODIR= share/terminfo
.endif
PLIST_SUBST+= TERMINFODIR="${TERMINFODIR}"
CONFIGURE_ARGS+= --with-default-terminfo-dir=${PREFIX}/${TERMINFODIR}
CONFIGURE_ARGS+= --with-terminfo-dirs=${PREFIX}/${TERMINFODIR}
# Remove these manpages from the distribution so they won't get installed
CURSES_NO_MAN= clear.1 tput.1 tset.1
Update ncurses to 5.0. From the release notes: We decided to release ncurses as a new whole number release (5.0) because it incorporates several interface changes, including some that would invalidate existing shared libraries. These are the highlights from the change-log since ncurses 4.2 release. Interface changes: * The principal source of changes to the interface comes from the release of X/Open Curses in 1997. Earlier versions of ncurses (4.0 and before) were based on a draft version of the specification. The release version adds parameters to some functions to support the evolving internationalization of curses. These summarize the impact: + modified several prototypes to correspond with 1997 version of X/Open Curses (affects ABI since developers have used attr_get). + corrected prototypes for slk_* functions, using chtype rather than attr_t. + the slk_attr_{set,off,on} functions need an additional void* parameter according to XSI. + correct macros for wattr_set, wattr_get, separate wattrset macro from these to preserve behavior that allows attributes to be combined with color pair numbers. + reviewed/updated curses.h, term.h against X/Open Curses Issue 4 Version 2. This includes making some parameters NCURSES_CONST rather than const, e.g., in termcap.h. + reviewed/corrected macros in curses.h as per XSI document. + add set_a_attributes and set_pglen_inch to terminfo structure, as per XSI and Solaris 2.5. * The newest version of the X/Open Curses is implemented on Solaris and other vendor's systems. It adds new features to the terminfo descriptions: + implement tparm %l format. + implement tparm printf-style width and precision for %s, %d, %x, %o as per XSI. * We made additional changes to reduce impact by future interface changes: + rename key_names[] array to _nc_key_names since it is not part of the curses interface. + move macro winch to a function, to hide details of struct ldat * modify configure script to embed ABI in shared libraries for HP-UX 10.x (detailed request by Tim Mooney). * modify configuration of shared libraries on Digital Unix so that versioning is embedded in the library, rather than implied by links (patch by Tim Mooney). New features: * enable sigwinch handler by default. * turn on hashmap scrolling code by default * improved support for termcap applications + modify tput to accept termcap names as an alternative to terminfo names. + provide support for termcap PC variable by copying it from terminfo data and using it as the padding character in tputs. + provide support for termcap ospeed variable by copying it from the internal cur_term member, and using ospeed as the baudrate reference for the delay_output and tputs functions. + change name-comparisons in lib_termcap to compare no more than 2 characters. + add configure option --enable-tcap-names, which essentially allows users to define new capabilities as in termcap. * add mouse support to ncurses menus. * add mouse and dll support for OS/2 EMX * modify terminfo parsing to accept octal and hexadecimal constants * add configure option --enable-no-padding, to allow environment variable $NCURSES_NO_PADDING to eliminate non-mandatory padding, thereby making terminal emulators (e.g., for vt100) a little more efficient. * modify lib_color.c to eliminate dependency on orig_colors and orig_pair, since SVr4 curses does not require these either, but uses them when they are available. * add -f option to infocmp and tic, which formats the terminfo if/then/else/endif so that they are readable (with newlines and tabs). * modify tic to compile into %'char' form in preference to %{number}, since that is a little more efficient. Major bug fixes: * modify lib_tstp.c to block SIGTTOU when handling SIGTSTP, fixes a problem where ncurses applications which were run via a shell script would hang when given a ^Z. Also, check if the terminal's process group is consistent, i.e., a shell has not taken ownership of it, before deciding to save the current terminal settings in the SIGTSTP handler. * suppress sc/rc capabilities from terminal description if they appear in smcup/rmcup. This affects only scrolling optimization, to fix a problem reported by several people with xterm's alternate screen, though the problem is more general. * modify relative_move and tputs to avoid an interaction with the BSD-style padding. The relative_move function could produce a string to replace on the screen which began with a numeric character, which was then interpreted by tputs as padding. * modify setupterm so that cancelled strings are treated the same as absent strings, cancelled and absent booleans false (does not affect tic, infocmp). * modify lib_vidattr.c to allow for terminal types (e.g., xterm-color) which may reset all attributes in the 'op' capability, so that colors are set before turning on bold and other attributes, but still after turning attributes off. * use 'access()' to check if ncurses library should be permitted to open or modify files with fopen/open/link/unlink/remove calls, in case the calling application is running in setuid mode. * correction to doupdate, for case where terminal does not support insert/delete character. The logic did not check that there was a difference in alignment of changes to old/new screens before repainting the whole non-blank portion of the line. Modified to fall through into logic that reduces by the portion which does not differ.
2000-01-15 19:39:28 +01:00
post-configure:
cd ${WRKSRC}/man; \
${RM} -f ${CURSES_NO_MAN}; \
for f in *.1m; do \
${MV} -f $${f} `basename $${f} .1m`.1; \
done; \
for f in *.3x; do \
${MV} -f $${f} `basename $${f} .3x`.3; \
Update ncurses to 5.0. From the release notes: We decided to release ncurses as a new whole number release (5.0) because it incorporates several interface changes, including some that would invalidate existing shared libraries. These are the highlights from the change-log since ncurses 4.2 release. Interface changes: * The principal source of changes to the interface comes from the release of X/Open Curses in 1997. Earlier versions of ncurses (4.0 and before) were based on a draft version of the specification. The release version adds parameters to some functions to support the evolving internationalization of curses. These summarize the impact: + modified several prototypes to correspond with 1997 version of X/Open Curses (affects ABI since developers have used attr_get). + corrected prototypes for slk_* functions, using chtype rather than attr_t. + the slk_attr_{set,off,on} functions need an additional void* parameter according to XSI. + correct macros for wattr_set, wattr_get, separate wattrset macro from these to preserve behavior that allows attributes to be combined with color pair numbers. + reviewed/updated curses.h, term.h against X/Open Curses Issue 4 Version 2. This includes making some parameters NCURSES_CONST rather than const, e.g., in termcap.h. + reviewed/corrected macros in curses.h as per XSI document. + add set_a_attributes and set_pglen_inch to terminfo structure, as per XSI and Solaris 2.5. * The newest version of the X/Open Curses is implemented on Solaris and other vendor's systems. It adds new features to the terminfo descriptions: + implement tparm %l format. + implement tparm printf-style width and precision for %s, %d, %x, %o as per XSI. * We made additional changes to reduce impact by future interface changes: + rename key_names[] array to _nc_key_names since it is not part of the curses interface. + move macro winch to a function, to hide details of struct ldat * modify configure script to embed ABI in shared libraries for HP-UX 10.x (detailed request by Tim Mooney). * modify configuration of shared libraries on Digital Unix so that versioning is embedded in the library, rather than implied by links (patch by Tim Mooney). New features: * enable sigwinch handler by default. * turn on hashmap scrolling code by default * improved support for termcap applications + modify tput to accept termcap names as an alternative to terminfo names. + provide support for termcap PC variable by copying it from terminfo data and using it as the padding character in tputs. + provide support for termcap ospeed variable by copying it from the internal cur_term member, and using ospeed as the baudrate reference for the delay_output and tputs functions. + change name-comparisons in lib_termcap to compare no more than 2 characters. + add configure option --enable-tcap-names, which essentially allows users to define new capabilities as in termcap. * add mouse support to ncurses menus. * add mouse and dll support for OS/2 EMX * modify terminfo parsing to accept octal and hexadecimal constants * add configure option --enable-no-padding, to allow environment variable $NCURSES_NO_PADDING to eliminate non-mandatory padding, thereby making terminal emulators (e.g., for vt100) a little more efficient. * modify lib_color.c to eliminate dependency on orig_colors and orig_pair, since SVr4 curses does not require these either, but uses them when they are available. * add -f option to infocmp and tic, which formats the terminfo if/then/else/endif so that they are readable (with newlines and tabs). * modify tic to compile into %'char' form in preference to %{number}, since that is a little more efficient. Major bug fixes: * modify lib_tstp.c to block SIGTTOU when handling SIGTSTP, fixes a problem where ncurses applications which were run via a shell script would hang when given a ^Z. Also, check if the terminal's process group is consistent, i.e., a shell has not taken ownership of it, before deciding to save the current terminal settings in the SIGTSTP handler. * suppress sc/rc capabilities from terminal description if they appear in smcup/rmcup. This affects only scrolling optimization, to fix a problem reported by several people with xterm's alternate screen, though the problem is more general. * modify relative_move and tputs to avoid an interaction with the BSD-style padding. The relative_move function could produce a string to replace on the screen which began with a numeric character, which was then interpreted by tputs as padding. * modify setupterm so that cancelled strings are treated the same as absent strings, cancelled and absent booleans false (does not affect tic, infocmp). * modify lib_vidattr.c to allow for terminal types (e.g., xterm-color) which may reset all attributes in the 'op' capability, so that colors are set before turning on bold and other attributes, but still after turning attributes off. * use 'access()' to check if ncurses library should be permitted to open or modify files with fopen/open/link/unlink/remove calls, in case the calling application is running in setuid mode. * correction to doupdate, for case where terminal does not support insert/delete character. The logic did not check that there was a difference in alignment of changes to old/new screens before repainting the whole non-blank portion of the line. Modified to fall through into logic that reduces by the portion which does not differ.
2000-01-15 19:39:28 +01:00
done
.if (${OPSYS} == SunOS)
${MV} ${TERMINFO_SRC} ${TERMINFO_SRC}.old
${SED} -e "/^screen|/,/^$$/d" -e "/^screen-w|/,/^$$/d" \
<${TERMINFO_SRC}.old >${TERMINFO_SRC}
.endif
1997-10-27 05:28:54 +01:00
post-install:
${INSTALL_DATA} ${WRKSRC}/c++/demo.cc \
${PREFIX}/share/examples/ncurses++demo.cc
.include "../../mk/bsd.pkg.mk"