pkgsrc/shells/zsh/Makefile
ryoon 2e1f746539 zsh: Update to 5.9
Changelog:
5.9:
Changes since 5.8.1
-------------------

zsh 5.9 is dedicated to the memory of Sven Guckes, who was, amongst other
things, a long-time zsh advocate.  For more information, see:

  https://linuxnews.de/2022/02/sven-guckes-verstorben/
  https://groups.google.com/g/vim_announce/c/MJBKVd-xrEE/m/joVNaDgAAgAJ

When unsetting a hash element, the string enclosed in square brackets is
interpreted literally after any normal command-line-argument expansions.
Thus
  unset "hash[$key]"
first expands $key as usual for a double-quoted string, and then interprets
that result as the exact hash element to unset.  This differs from previous
versions of the shell, which would also remove a leading backslash for an
unusual subset of characters in the expansion of $key.  Note this also
means, for example, that now
  unset 'hash[ab]cd]'
unsets the element with key "ab]cd" rather than silently doing nothing.

The function command learnt a -T option to declare a function and enable
tracing for it simultaneously.

The option SHORT_REPEAT was added to enable the short syntax of
SHORT_LOOPS for the repeat command only. It is disabled by default.

The _arguments function now supports NUL-delimiting optargs in the
opt_args array via the -0 option. Developers of completion functions
should find this easier to handle reliably than the default
colon-delimiting behaviour.

The zsh/system module's `zsystem flock` command learnt an -i option to
set the wait interval used with -t. Additionally, -t now supports
fractional seconds.

The option CLOBBER_EMPTY was added to enable the overwrite behaviour
of CLOBBER for empty files only. It is disabled by default.

A (-) expansion flag was added. It works like (n) but correctly sorts
negative numbers.

The (*) expansion flag enables EXTENDED_GLOB for pattern matching.
For example, ${(*)sample/(#b)*(pat)*/${match[1]}} uses backreferences
even if EXTENDED_GLOB is not otherwise set.  However, this does not
descend into nested exapansions, and doubling as (**) does not disable
EXTENDED_GLOB.

The compinit function learnt a -w option to explain why compdump runs.
When run without the -i or -u options and compaudit discovers security
issues, answering "y" to the "Ignore insecure ..." prompt removes the
insecure elements (like the -i option) where previously it ignored the
result (thus formerly like the -u option).  Further, removing those
elements includes dropping directories from the $fpath array.

The zsh/datetime module's strftime builtin learnt an -n option to omit
the trailing newline when printing a formatted time.

The XTRACE option is now disabled while running user-defined completion
widgets.  This corresponds to long-standing behavior of other user ZLE
widgets.  Use the _complete_debug widget to capture XTRACE output, or
use "functions -T" to enable tracing of specific completion functions.

The fc builtin learnt an -s option which is a POSIX equivalent to the
`fc -e-` method of re-executing a command without invoking an editor.

The option CASE_PATHS was added to control how NO_CASE_GLOB behaves.
NO_CASE_GLOB + NO_CASE_PATHS is equivalent to the current NO_CASE_GLOB
behaviour. NO_CASE_GLOB + CASE_PATHS treats only path components that
contain globbing characters as case-insensitive; this behaviour may
yield more predictable results on case-sensitive file systems.
NO_CASE_PATHS is the default.

With the new TYPESET_TO_UNSET option set, "typeset foo" leaves foo unset,
in contrast to the default behavior which assigns foo="".  Any parameter
attributes such as numeric type, sorting, and padding are retained until
the parameter is explicitly unset or a conflicting value is assigned.
This is similar to default behavior of bash and ksh.  This option is
disabled by default.

The compadd builtin's -D option can now be specified more than once.

The zsh/zutil module's zformat builtin learnt an -F option which behaves
like -f except that ternary expressions check for existence instead of
doing math evaluation.

The conventional syntax used to indicate units, ranges, and default values
in completion descriptions (e.g. `timeout (seconds) (0-60) [20]`) is now
recognised by the completion system itself. These components are parsed
out of the description and can be individually styled. A _numbers helper
function has been added to help function authors offer rich completion
for these values.

The log builtin, WATCH parameter, et al., have been broken out into a
separate module, zsh/watch. The module is enabled by default.

The zsh/watch module's WATCHFMT parameter now supports colours via the
%F and %K escapes.

The STTY parameter can now be set to an empty string before running a
command to automatically restore terminal settings after the command
finishes.

The "jobs" command and "$jobstates" and related parameters can report on
parent shell jobs even in subshells.  This is a snapshot of the parent
state, frozen at the point the subshell started.  However, if a subshell
starts its own background jobs, the parent state is discarded in order
to report on those new jobs.
2022-05-16 14:58:30 +00:00

90 lines
2.6 KiB
Makefile

# $NetBSD: Makefile,v 1.103 2022/05/16 14:58:30 ryoon Exp $
DISTNAME= zsh-5.9
CATEGORIES= shells
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=zsh/}
EXTRACT_SUFX= .tar.xz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://zsh.sourceforge.io/
COMMENT= The Z shell
LICENSE= gnu-gpl-v2 AND zsh
USE_LANGUAGES= c c99
USE_TOOLS+= automake autoconf makeinfo
GNU_CONFIGURE= yes
INFO_FILES= yes
TEXINFO_REQD= 4.0
CHECK_PORTABILITY_SKIP= Misc/c2z # not used
CONFIGURE_ARGS+= --disable-gdbm
CONFIGURE_ARGS+= --enable-etcdir=${PKG_SYSCONFDIR:Q}
# Ensure we can find initscr(3) otherwise the curses module will not be built.
CONFIGURE_ARGS+= --with-term-lib="${BUILDLINK_LIBNAME.curses} ${BUILDLINK_LIBNAME.terminfo}"
.include "../../mk/bsd.prefs.mk"
# This cannot be detected automatically without a controlling tty, for example
# when bulk building.
.if ${OPSYS} == "Interix"
CONFIGURE_ARGS+= --without-tcsetpgrp
.else
CONFIGURE_ARGS+= --with-tcsetpgrp
.endif
.if ${USE_CROSS_COMPILE:U:tl} == "yes"
# These can't be detected automagically in cross-builds.
CONFIGURE_ENV.NetBSD+= zsh_cv_shared_environ=yes
CONFIGURE_ENV.NetBSD+= zsh_cv_shared_tgetent=yes
CONFIGURE_ENV.NetBSD+= zsh_cv_shared_tigetstr=yes
CONFIGURE_ENV.NetBSD+= zsh_cv_sys_dynamic_execsyms=yes
.endif
INSTALLATION_DIRS+= share/doc/zsh
PLIST_VARS+= xattr
.if exists(/usr/include/sys/xattr.h) || \
exists(/usr/include/${NATIVE_MACHINE_GNU_ARCH}-${LOWER_OPSYS}-gnu/sys/xattr.h) || \
defined(OSX_SDK_PATH) && exists(${OSX_SDK_PATH}/usr/include/sys/xattr.h)
PLIST.xattr= yes
.endif
PRINT_PLIST_AWK+= {if ($$0 ~ /attr.so/) {$$0 = "$${PLIST.xattr}" $$0;}}
MAKE_JOBS_SAFE= no
INSTALL_TARGET= install install.info
TEST_TARGET= check
PKG_SHELL= bin/zsh
REPLACE_INTERPRETER+= zsh
REPLACE.zsh.old= .*zsh
REPLACE.zsh.new= ${PREFIX}/bin/zsh
REPLACE_FILES.zsh= Functions/Calendar/*
REPLACE_FILES.zsh+= Functions/Example/*
REPLACE_FILES.zsh+= Functions/Misc/*
REPLACE_FILES.zsh+= Functions/VCS_Info/*
REPLACE_FILES.zsh+= Misc/globtests*
REPLACE_FILES.zsh+= Test/runtests.zsh Test/ztst.zsh
REPLACE_FILES.zsh+= Util/check-tmux-state Util/reporter
SUBST_CLASSES+= pkgdb
SUBST_STAGE.pkgdb= pre-configure
SUBST_MESSAGE.pkgdb= Set PKGDB_DIR
SUBST_FILES.pkgdb= Completion/BSD/Command/_bsd_pkg
SUBST_VARS.pkgdb= PKG_DBDIR
.include "options.mk"
pre-configure:
cd ${WRKSRC}; autoreconf -fiv
post-install:
.for f in FEATURES NEWS Etc/BUGS Etc/FAQ
${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/share/doc/zsh
.endfor
.include "../../converters/libiconv/buildlink3.mk"
.include "../../mk/curses.buildlink3.mk"
.include "../../mk/terminfo.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"