pkgsrc/shells/zsh/Makefile.common

112 lines
3 KiB
Text
Raw Normal View History

# $NetBSD: Makefile.common,v 1.34 2006/04/07 15:28:49 jlam Exp $
2003-06-29 06:24:56 +02:00
DISTNAME= zsh-${ZSH_VERSION}
CATEGORIES= shells
MASTER_SITES= ftp://sunsite.dk/pub/unix/shells/zsh/ \
ftp://ftp.fu-berlin.de/pub/unix/shells/zsh/ \
ftp://ftp.funet.fi/pub/unix/shells/zsh/ \
http://www.math.technion.ac.il/pub/zsh/ \
ftp://ftp.zsh.org/zsh/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= ${ZSH_MAINTAINER}
HOMEPAGE= http://sunsite.dk/zsh/
COMMENT= The Z shell
GNU_CONFIGURE= yes
2003-06-30 15:46:04 +02:00
CONFIGURE_ARGS+= --enable-etcdir=${PKG_SYSCONFDIR:Q}
USE_TOOLS+= makeinfo
INFO_FILES= # PLIST
TEXINFO_REQD= 4.0
2003-06-29 06:24:56 +02:00
2004-05-07 00:29:36 +02:00
PKG_INSTALLATION_TYPES= overwrite pkgviews
2003-06-29 06:24:56 +02:00
.include "../../mk/bsd.prefs.mk"
BUILD_DEFS+= ZSH_STATIC
.if defined(ZSH_STATIC) && !empty(ZSH_STATIC:M[Yy][Ee][Ss])
CONFIGURE_ARGS+= --disable-dynamic
NETBSD_SHLINKER= /libexec/ld.elf_so
NETBSD_SHLIBDIR= /lib
. if ${OPSYS} == "NetBSD" && ${OBJECT_FMT} == "ELF" && \
defined(MKDYNAMICROOT) && !empty(MKDYNAMICROOT:M[Yy][Ee][Ss]) && \
exists(${NETBSD_SHLINKER}) && exists(${NETBSD_SHLIBDIR})
#
# Built a dynamically linked "zsh" binary on NetBSD systems which use
# dynamically linked binaries on the root filesystem. The binary will
# only depend on the run-time link-editor and shared libraries on the
# root filesystem. We use "-rpath" below by purpose because the
# buildlink 3 framework won't filter it out.
#
BUILDLINK_PASSTHRU_RPATHDIRS+= ${NETBSD_SHLIBDIR}
LDFLAGS+= -Wl,-dynamic-linker=${NETBSD_SHLINKER} -Wl,-R${NETBSD_SHLIBDIR}
. else
2003-06-29 06:24:56 +02:00
LDFLAGS+= -static
. endif
2003-06-29 06:24:56 +02:00
.else
2003-06-30 15:46:04 +02:00
. if ${OPSYS} == "SunOS"
2003-06-29 06:24:56 +02:00
PLIST_SRC= ${PKGDIR}/PLIST.dynamic ${PKGDIR}/PLIST
2003-06-30 15:46:04 +02:00
. else
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/zsh
. if ${OPSYS} == "Linux" || ${OPSYS} == "IRIX" || ${OPSYS} == "OpenBSD"
PLIST_SRC+= ${PKGDIR}/PLIST.terminfo
. elif ${OPSYS} == "Interix" || ${OPSYS} == "DragonFly"
PLIST_SRC+= ${PKGDIR}/PLIST.terminfo ${PKGDIR}/PLIST.shlibs
2005-01-25 14:13:55 +01:00
. else
PLIST_SRC+= ${PKGDIR}/PLIST.shlibs
. endif
PLIST_SRC+= ${PKGDIR}/PLIST.dynamic ${PKGDIR}/PLIST
2003-06-30 15:46:04 +02:00
. endif
2003-06-29 06:24:56 +02:00
.endif
.if ${OPSYS} == "Interix"
2005-01-25 14:13:55 +01:00
CONFIGURE_ARGS+=--without-tcsetpgrp
.elif ${OPSYS} == "IRIX"
CONFIGURE_ARGS+=--with-tcsetpgrp
.endif
2003-06-29 06:24:56 +02:00
.undef MANZ
PKG_SHELL= bin/zsh
2003-06-29 06:24:56 +02:00
INSTALL_TARGET= install install.info
pre-install:
2005-10-23 17:36:48 +02:00
@cd ${WRKSRC}/Completion; ${FIND} . -name \*.orig -exec ${RM} \{\} \;
2003-06-29 06:24:56 +02:00
post-install:
@${INSTALL_DATA_DIR} ${PREFIX}/share/doc/zsh
update to zsh-4.2.1 Changes since zsh version 4.2.0 ------------------------------- - The autoload and related builtins take options -k and -z to indicate ksh or zsh autoloading style for given functions, making it possible to mix and match. - Assignments to associative arrays can use the i and r index flags. For example, assoc[(i)alpha*]=bravo sets the value for the element whose key matches the pattern `alpha*'; assoc[(r)activ*]=passive sets the value for the element whose current value matches the pattern `activ*'. - The glob qualifier F indicates a non-empty directory. Hence *(F) indicates all subdirectories with entries, *(/^F) means all subdirectories with no entries. - fc -p and fc -P provide push/pop for the status of the shell's history (both internal and using the history file). With automatic scoping (fc -ap) it becomes easy to use a temporary history in a function. This has been added to the calculator function zcalc to make its internal history work more seamlessly. - A new `try block' and `always block' syntax has been introduced to make it easier to ensure the shell runs important tidy-up code in the event of an error. It also runs after a break, continue, or return, including a return forced by the ERR_RETURN option (but not an exit, which is immediate). The syntax is: `{' try-block-list `}' `always' `{' always-block-list `}' where no newline or semicolon may appear between `}' and `always'. This is compatible with all previous valid zsh syntax as an `always' at that point used to be a syntax error. For example, { echo Code run in current shell } always { echo Tidy-up code } - A new zle widget reset-prompt has been added to re-expand the current prompt. Changes to the variable in use as well as changes in its expanions are both taken into account. The same effect is now forced by a job change notification, making the %j prompt escape and %(j..) ternary expression more useful. - The zftp module supports ports following the hostname in the normal suffix notation, `host:port'. This requires IPv6 colon-style addresses to be specified in suitably quoted square brackets, for example: zftp open '[f000::baaa]' zftp open '[f000::baaa]:ftp' (the two are equivalent). - Special traps, those that don't correspond to signals, i.e. ZERR, DEBUG and EXIT are no longer executed inside other traps. This caused unnecessary confusion if, for example, both DEBUG and EXIT traps were set. The new behaviour is more compatible with other shells. - New option TRAPS_ASYNC which if set allows traps to run while the shell is waiting for a child process. This is the traditional zsh behaviour; POSIX requires the option to be unset. In sh/ksh compatibility mode the option is turned off by default and the option letter -T turns it on, for compatibility with FreeBSD sh.
2004-08-16 18:17:39 +02:00
@cd ${WRKSRC}/Etc; ${INSTALL_DATA} BUGS FAQ \
${PREFIX}/share/doc/zsh
@cd ${WRKSRC}; ${INSTALL_DATA} FEATURES NEWS \
2003-06-29 06:24:56 +02:00
${PREFIX}/share/doc/zsh
# Utilize Zsh's test framework.
Update to 4.2.0 Patch provided by Geoff C. Wing in PR 24918 ok'd by uebayasi@ New features between zsh versions 4.0 and 4.2 Configuration: * upgraded to use autoconf post-2.50 * improved compatibility with other shells through shell options, builtin arguments and improved builtin option parsing Syntax and builtins: * new printf builtin * `+=' to append to parameters which works for scalars, arrays and (with pairs) associative arrays. * enhanced multiple parameter `for' loops: for key value in key1 value1 key2 value2 ... maintaining full compatibility with POSIX syntax. * Suffix aliases allow the shell to run a command on a file by suffix, e.g `alias -s ps=gv' makes `foo.ps' execute `gv foo.ps'. Supplied function zsh-mime-setup uses existing mailcap and mime.types files to set up suitable aliases. Supplied function pick-web-browser is suitable for finding a browser to show .html etc. files by suffix alias. * new option `no_case_glob' for case-insensitive globbing. Add-on modules and functions: * zsh/datetime modules makes date formatting and seconds since EPOCH available inside the shell. * zsh/net/tcp module provides builtin interface to TCP through ztcp builtin. Function suite for interactive and script use with expect-style pattern matching. * zsh/net/socket module provides zsocket builtin. * zcalc calculator function with full line editing. * builtin interface to pcre library * zsh/zselect module provides zselect builtin as interface to select system call Completion system: * general improvements to command and context support, low-level functions, display code. * in verbose mode, matches with the same description are grouped * highly configurable completions for values of specific parameters, specific redirections for specific commands * support for bash completion functions (typically zsh native functions are more powerful where available) * New completions provided for (some of these may be in later 4.0 releases): valgrind, tidy, texinfo, infocmp, Java classes, larch, limit, locale parameters, netcat, mysqldiff, mt, lsof, elinks, ant, debchange (dch), email addresses, file system types, Perforce, xsltproc. Plus many others. Line editor: * special parameters $PREDISPLAY, $POSTDISPLAY available in function widgets to configure uneditable text (for narrowing) * recursive editing * supplied widgets read-from-minibuffer, replace-string use these features (more intuitive prompting and argument reading than 4.0) * access to killed text via $CUTBUFFER and $killring * supplied highly configurable word widgets forward-word-match etc., can set what constitutes a word interactively or in startup script (implement bash-style behaviour, replacing previous bash-* word widgets) * interface to incremental search via $LASTSEARCH * better handling of keymaps in zle and widgets * better support for output from user-defined widgets while zle is active * tetris game which runs entirely in zle * several other contributed widgets Local internal improvements: * disowned jobs are automatically restarted * \u and \U print escapes for Unicode * read -d allows a custom line ending. * read -t . * line numbers in error messages and $PS4 output are more consistent * `=prog' expands only paths, no longer aliases for consistency * job display in prompts; `jobs' command output can be piped * prompts: new $RPROMPT2, %^, %j, %y, enhanced %{, %}, %_. * rand48() function in zsh/mathfunc for better randomness in arithmetic (if the corresponding math library function is present) * $SECONDS parameter can be made floating point via `typeset -F SECONDS' for better timing accuracy * improvements to command line history mechanism * job table is dynamically sized, preventing overflow (typically seen previously in complex completions). * many bugfixes
2004-03-28 12:30:13 +02:00
# Testing of dynamic shell only works after install has been done
2003-06-29 06:24:56 +02:00
#
.PHONY: do-test do-su-test real-su-test
do-test: do-su-test
do-su-test:
@${_PKG_SILENT}${_PKG_DEBUG} \
${ECHO_MSG} "*** Warning: This test needs to be run as root"
@${_PKG_SILENT}${_PKG_DEBUG} \
realtarget="real-su-test"; \
action="install"; \
${_SU_TARGET}
real-su-test:
@${_PKG_SILENT}${_PKG_DEBUG} \
${ECHO_MSG} "${_PKGSRC_IN}> Testing for ${PKGNAME}"
@cd ${WRKSRC} && ${MAKE} check
@cd ${WRKSRC}/Test && ${MAKE} clean