pkgsrc/shells/mksh/Makefile

45 lines
1.2 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.24 2013/05/31 12:41:58 wiz Exp $
Update to mksh-45. * [tg] Make “set -x” print the commands run in escaped form * [tg] PS4 in dot.mkshrc is now timestamped * [tg] The &> GNU bash I/O redir is no longer parsed in -o posix, -o sh modes, lksh (breaks valid scripts) * [tg] Implement ${ …;} more efficiently (deleted-open files) * [tg] For shf, %#s (if you can get it past GCC’s printf format attribute) calls print_value_quoted, ignoring field width and precision * [tg] Catch “typeset =” (regression) with better error message * [tg, Tonnerre Lombard] add “doch” alias to dot.mkshrc which just repeats the last input line with sudo(8) * [tg] Use unsigned integers for all calculations, to avoid ISO C “Undefined Behaviour” (and implementation-defined behaviour) throughout (most of) the code; emulate signed integer arithmetics using unsigned; not-lksh only * [tg] Emulate signed modulo naïvely, for correct sign of the result * [tg] Add <<< and >>> for ROL and ROR (rotate left and right, respectively) operations, <<<= and >>> assignments; bitwise AND the RHS of a shift/rotate op with 31 (not for lksh) * [tg] Remove a warning by working around a workaround found in dietlibc which works around a bug in broken software such as GNU tar (really!) * [tg] Correct and simplify list and categorisation of built-in commands as POSIX special and “everything else” plus a flag to keep assignments * [tg] Handle ((foo)) as “let]” internally to avoid a conflict with user-defined functions called let (LP#1156707) * [tg] Clean up the code
2013-04-30 19:58:44 +02:00
DISTNAME= mksh-R45
PKGNAME= ${DISTNAME:S/-R/-/}
PKGREVISION= 1
CATEGORIES= shells
MASTER_SITES= http://www.mirbsd.org/MirOS/dist/mir/mksh/ \
http://pub.allbsd.org/MirOS/dist/mir/mksh/
Update to R44. The manpage is incompatible with mdocml, so switch to the separately distributed catman page. R44 contains these bugfixes: * [tg] "$@" always generates words; bug spotted by engla in IRC * [tg] Optimise print_columns display to use the screen space better Please upgrade to mksh R43 (or stick on R41c) because of# * [tg] Do not permit $'#' and $"#" in anything that looks like a string, as old scripts, like ncurses', depend on behaviour not guaranteed by POSIX regarding unescaped dollar signs there * [dalias] Make detection of function prototypes more reliable * [tg] Quote setenv arguments for eval properly in dot.mkshrc * [tg] Validate parameter names for typeset, export, etc. * [tg] Provide a classic BSD echo builtin for /bin/sh on MidnightBSD * [tg] When generating Makefrag.inc put list of check_categories inside * [tg] Actually test all [197]echo(1) flavours and MidnightBSD /bin/sh hacks mksh R42b and R41c fix regressions: * [tg] Correctly initialise memory (Debian #700604) * [tg] LP#1104543 fix was too strict (Debian #700526) mksh R42 brings back the release\ {early,often} scheme: * [tg] Make -DMKSH_DISABLE_EXPERIMENTAL a nop again * [tg] Quell some LLVM+Clang warnings; overhaul scan-build [198]assert(3)s * [tg, RT] Bunch of portability and build system fixes * [tg] Re-enable ${ precmd;} in dot.mkshrc and fix it to retain the errorlevel * [RT] Port to Minix-vmd, QNX 4, Watcom C; begin porting to SunOS 4.1.1, Xenix, ISC (Interactive) Unix * [tg] Prefer const-clean sys_errlist[] to [199]strerror(3) * [tg] Permit $"#" and $'#' everywhere except in the body of here documents that are not here strings * [tg] Use full recursive parser for double-quoted here strings, and reuse code between here strings and here documents * [tg] #ifdef DEBUG_LEAKS free all fds and memory on exit (LP#1106116) * [tg] Don't close stdout/stderr with redirections, dup /dev/null instead, always, both in dot.mkshrc and the testsuite, it does break! * [tg] Handle ${ #;} like functions in that local and return DWIW; use it for the big chunk in $PS1 to avoid [200]fork(2)ing (at cost of tempfiles; dot.mkshrc is a sample, adjust to your needs) * [tg] Document invalid ${a/b/c} patterns in manpage (Debian #698678) mksh R41b is a bugfix-only release off a stable branch: * [tg] Fix [201]gettimeofday(2) detection at build time (warning) * [RT, tg] Build.sh: catch non-working dash printf builtin * [chris2, dalias, tg] Remove musl libc workaround and use _GNU_SOURCE which they kindly aliased to _ALL_SOURCE, which is implemented now * [tg] Fix getn and some cases of possible array bounds trespasses * [chris2, dalias, tg] Use -fno-asynchronous-unwind-tables with GCC * [tg] Fix a few warnings from libFirm/cparser (mostly -Wsign-compare) * [tg] Correct mistake when doing hashtable lookup collision resolution * [tg] Fix running the ERR and EXIT traps in situations with set -e and/or eval (also closes Debian #696823) * [tg] Fix "command shift", reported by «ormaaj:#!/bin/mksh» * [Torsten Sillke] Unbreak linking on AIX (remove -qextchk) * [tg] Fix regression wrt lists in functions and "set -e" (LP#1104543) mksh R41 brings a number of bugfixes and new features: * [tg] Drop "set ±o arc4random" (deprecated in R40) * [tg] Drop old Build.sh -long-options (deprecated in R40) * [tg] Change the internal hash algorithm from Bob Jenkins' one-at-a-time to its NUL-counting, always-changing, better-avalanching MirOS variant [202]NZAAT (with feedback from ciruZ; 75% fill level is reasonable; names tbd in Mirkev/MirJSON) * [tg] Use $'#' for non-ASCII parameters for re-entry printing * [tg] Use sane spelling of "read-only" consistently * [tg] Improve tree -DDEBUG functions (internal/developer use) * [tg] Reduce stack usage a bit; speed up hash tables at size cost * [tg] MKSH_SMALL no longer implies -fno-inline * [tg] Support optional seed in ${parameter@#seed} for security * [tg] New Build.sh environment configurable: LDSTATIC (empty) * [tg] Improve LTO effect by always adding our copies of distributed utility function sources when linking statically (i.e. LDSTATIC is not empty) * [tg] Drop deprecated hack for lines beginning with an exclamation mark * [tg] No longer interpret numbers beginning with a 0 digit as octal * [tg] Attempt to use -fwrapv on more compilers * [tg, RT] Better portability to 386BSD, Debian 0.91, ancient Unic#s * [tg] No longer use [203]mkstemp(3) or [204]tempnam(3) functions, do our own * [tg] Fix some bugs in the manual page and Build.sh * [tg] Add MKSH_NO_CMDLINE_EDITING, MKSH_DISABLE_TTY_WARNING * [RT] Port to Coherent UNIX * [tg] Enable some options by default for some ports, for instance, since BeOS can never have a controlling tty, the option disabling that warning * [tg] Some bugfixes, prompted by RT and Valgrind * [RT] Disable [205]sigsuspend(2) on Syllable Desktop * [tg] Fix several issues with typeset -p (LP: #993847) * [RT] Detect lcc and apply inline fix, e.g. for use with libc5 * [tg] If klibc, set -DMKSH_NO_LIMITS and check for sigsuspend fix * [tg] Fix some issues found by Coverity and some found while fixing * [tg] Build.sh options: -t target-filename (instead of mksh); -L to build a legacy mksh, current changes: + different $KSH_VERSION "LEGACY KSH" instead of "MIRBSD KSH" + purely for running ksh88 and pdksh scripts; no command line editing + use traditional "set -- $(getopt #); echo $?" mode always + do not keep file descriptors private + parse leading-zero-digit numbers as octal + no mksh extension -T + use "long", not "int32_t", for arithmetics * [tg] fix trimming with positional parameters (Debian #48453) * [tg] ensure that case end tokens are not mixed up (Debian #220272) * [tg] make alias definitions in mksh -c work (Debian #517009), hack * [tg] Apply speed improvements and add MKSH_SMALL_BUT_FAST * [tg] Fix CONSERVATIVE_FDS use-before-definition bug * [tg] Correct two regressions when tab-completing (LP: #1025843) and fix bugs in the same code wrt. completion display and other expansions * [tg] Make quoted output of "typeset -p" AT&T ksh93 compatible * [tg] Implement ${foo@Q} like ${foo:Q} in [206]make(1) * [tg] Remove some unused code; more int # bool conversion * [tg] Fix using here documents in COMSUB etc. (LP: #1030581) * [tg] Fix ulimit builtin usage to match what limits we actually know * [tg] Allow overriding /etc location, experts only (LP: #1039713) * [tg] Update to Unicode 6.1.0 * [tg, Todd Miller] Avoid changing [207]ps(1) output by accident * [tg, ft, Christian Neukirchen] Detect zsh 2.5.02/NeXTstep for Build.sh * [tg] Detect musl-gcc wrapper, define _BSD_SOURCE there, which is totally bogus, but musl, just like dietlibc, gets it wrong * [tg] Improve compile-time assertions * [tg] Repair select builtin without any choices given * [tg] Add -DMKSH_GCC55009 hack to avoid some compile-time assertions and introduce arith-mandatory in check.t to substitute for missing that compile-time check; will change * [tg] Rewrite lots of code to not rely on -fwrapv so much * [tg] Build.sh: Fix [208]flock(2) detection on GNU/Linux * [Andrew Kudryashov] Manpage: fix default for HISTSIZE * [tg] Add debugging aid (split-screen mechanism using GNU screen) * [Andrew Kudryashov] Manpage, Website: point out correct mailing list * [tg, Andrew Kudryashov] Fix ~/nonexistant tab completion * [tg] Optimise sh -c "[^]\t\n"-$&-*;-?[\\`|]*" to exec, inspired by Jilles Tjoelker (-DMKSH_DISABLE_EXPERIMENTAL to ostracise) * [tg] Fix $? inside eval (RedHat BZ#865121) * [tg] Implement ksh93 feature ${ foo;} (using tempfiles this time; exclude with -DMKSH_DISABLE_EXPERIMENTAL in R41) * [tg] Run SIGINT check more reliably in the cat builtin (LP#1058815) * [tg] Handle ^C in here documents, COMSUB, arithmetics (LP#1069428) * [tg] Make dot.mkshrc usable with "set -o nounset" / "set -u" * [tg, Clint Adams] Clean up and optimise the error handling code * [tg] Fix and add some checks in the testsuite * [tg] Sort list of variables in the source code when possible * [tg] Add $BASHPID (for ormaaj) and $EPOCHREALTIME * [tg] Improve documentation, #ksh IRC channel homepage * [tg, RT] Minix 2 also doesn't have [209]gettimeofday(2) # check for it * [tg] Fix an input command line editing display redrawing issue * [tg] Track the tty to keep $COLUMNS and $LINES up-to-date after a SIGWINCH even in scripts
2013-03-11 20:47:38 +01:00
SITES.${DISTNAME}.cat1.gz= ${MASTER_SITES:S/dist/cats/}
EXTRACT_SUFX= .tgz
MAINTAINER= ahoka@NetBSD.org
HOMEPAGE= http://mirbsd.de/mksh
COMMENT= MirBSD Korn Shell
Update to mksh R38b: mksh R38b fixes the following problems: * [André Wösten] Add __NO_EXT_QNX to avoid picking up the wrong waitfor() from <libutil.h> in (while porting to) QNX 6.4 * [tg] Plug memory corruption issue introduced in R38 * [tg] Amend dot.mkshrc with a base64 en-/decoder in shell * [tg] Import a manpage fix via OpenBSD from Alan R. S. Bueno mksh R38 comes with these changes and fixes applied: * [tg] Improve regression test output debugging * [tg] Fix <libutil.h> prerequisites on MidnightBSD in mirtoconf * [tg] Mention that RedHat BZ#496791 cannot currently be fixed in the manpage by discouraging use of apostrophes in comments in comsubs; add appropriate (expected-fail) regression tests * [tg] Sync with OpenBSD ksh (mostly a no-op) * [James Butler] Add search-history-up and search-history-down keybindings (tcsh-like) to the Emacs command line editing mode * [tg] Bind new search-history-{up,down} to ANSI PgUp and PgDn keys * [tg] Document ANSI default keybindings (↑↓←→ Home End Del PgUp PgDn) in the mksh(1) manual page as well * [tg] Optimise internal UTF-8 handling code for size and reusability * [tg] Incompatible change: ${foo:1:2} and ${#foo} now operate on characters, not on bytes. Characters are octets (set +U) or (utf8-mode) MirOS OPTU-8 multibyte characters (set -U) * [tg] Improve regression tests relating to ${foo:1:2} and ${#foo} and let wc=1#x and utf8-mode * [tg] Use per-file copyright notices, move global text to manpage * [tg] Expose new MKSH_MIDNIGHTBSD01ASH_COMPAT ifdef; change it to only trigger if FPOSIX (or MKSH_BINSHREDUCED and /bin/sh) * [tg] Remove already-dead “#if 0” style debugging code * [tg] Change some code into a more portable fashion, optimise * [tg] Allow [[ $foo ]] (ksh93 extension) mentioned by pgas * [tg] Clean up mksh and the contributed arc4random.c for some conversion, enum and other warnings for gcc-snapshot trunk r147610 * [tg] Ensure no function uses more than 768 bytes of stack either * [tg, wbx] Add extension to make “!string” lines work like in GNU bash
2009-06-03 15:46:03 +02:00
LICENSE= miros
WRKSRC= ${WRKDIR}/mksh
WRKBUILD?= ${WRKSRC}
PKG_INSTALLATION_TYPES= pkgviews overwrite
PKG_SHELL= bin/mksh
LIBS.Interix+= -lcrypt
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 share/examples/mksh
do-build:
cd ${WRKBUILD} && LIBS=${LIBS:Q} CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
CPPFLAGS=${CPPFLAGS:Q} LDFLAGS=${LDFLAGS:Q} \
${TOOLS_SHELL} ${WRKSRC}/Build.sh -r
do-install:
${INSTALL_PROGRAM} ${WRKBUILD}/mksh ${DESTDIR}${PREFIX}/bin/mksh
${INSTALL_MAN} ${WRKSRC}/mksh.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/
${INSTALL_DATA} ${WRKSRC}/dot.mkshrc ${DESTDIR}${PREFIX}/share/examples/mksh/
# Uncomment this if you want to run the regression tests
#USE_TOOLS+= perl
#do-test:
# ${WRKBUILD}/test.sh -v
.include "../../mk/bsd.pkg.mk"