aboutsummaryrefslogtreecommitdiffstats
path: root/shells
diff options
context:
space:
mode:
authoradamw <adamw@FreeBSD.org>2016-07-27 15:39:21 +0800
committeradamw <adamw@FreeBSD.org>2016-07-27 15:39:21 +0800
commitc199bfa33cb42d0ea5f4fe808dfd43c6529da271 (patch)
tree3ff14b8bdd4997858077b29ddb7e05b9d7df2858 /shells
parent898b4ab6e61263da5f1680886605eb9b207c907d (diff)
downloadfreebsd-ports-gnome-c199bfa33cb42d0ea5f4fe808dfd43c6529da271.tar.gz
freebsd-ports-gnome-c199bfa33cb42d0ea5f4fe808dfd43c6529da271.tar.zst
freebsd-ports-gnome-c199bfa33cb42d0ea5f4fe808dfd43c6529da271.zip
Reorganize, simplify, and improve the Makefile.
A couple options changes: The MAILDIR and SECURE_FREE knobs were both removed and switched to always-on. Having maildir support does not preclude mbox support, so there's no reason not to include it for everybody. The secure-free run-time free() safety check is good practice and is a mandatory default on a number of other OS's, so now it's enabled for all zsh here as well. PORTREVISION bump for the above changes. The rest of the changes are simplifications, and reorganizing things to be more legible. An EXTRA_PATCHES that was being applied unconditionally was converted to a normal files/patch-, and I added in some comments on things I got confused by. While here, I also rewrote the descr to better describe what Zsh is in relation to other shells. I also removed "See also zshcompsys(1) manpage. :)" Not even a smiley face can undo the pain of trying to read zshcompsys(1).
Diffstat (limited to 'shells')
-rw-r--r--shells/zsh/Makefile116
-rw-r--r--shells/zsh/files/patch-Completion-Unix-Command-_sysctl4
-rw-r--r--shells/zsh/files/patch-Completion-Unix-Type-_tar_archive (renamed from shells/zsh/files/extra-patch-bsdtar)9
-rw-r--r--shells/zsh/pkg-descr19
4 files changed, 59 insertions, 89 deletions
diff --git a/shells/zsh/Makefile b/shells/zsh/Makefile
index f0c8517d360e..0058ffadcbcc 100644
--- a/shells/zsh/Makefile
+++ b/shells/zsh/Makefile
@@ -3,11 +3,11 @@
PORTNAME= zsh
DISTVERSION= 5.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= shells
-MASTER_SITES= http://www.zsh.org/pub/:doc \
- http://www.zsh.org/pub/ \
+MASTER_SITES= http://www.zsh.org/pub/ \
SF \
+ http://www.zsh.org/pub/:doc \
SF/${PORTNAME}/${PORTNAME}-doc/${PORTVERSION}:doc
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
@@ -21,81 +21,62 @@ LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
MAKE_JOBS_UNSAFE= yes
-EXTRA_PATCHES= ${FILESDIR}/extra-patch-bsdtar
-ZSH_VER= ${PORTVERSION}
-PLIST_SUB+= ZSH_VER="${ZSH_VER}"
-SUB_FILES= pkg-message
-
USES= iconv ncurses shebangfix tar:xz
SHEBANG_LANG= zsh
-zsh_OLD_CMD= /bin/zsh
-zsh_CMD= ${PREFIX}/bin/zsh
-SHEBANG_FILES= Functions/Calendar/calendar_add \
- Functions/Misc/checkmail \
- Functions/Misc/run-help \
- Functions/Misc/sticky-note \
- Functions/Misc/zcalc \
- Functions/Misc/zed \
- Functions/Misc/zkbd
-
-GNU_CONFIGURE= yes
-TEST_TARGET= test
+zsh_OLD_CMD= zsh # shebang appears as /bin/zsh and just zsh
+SHEBANG_FILES= Functions/Calendar/* \
+ Functions/Misc/*
-CPPFLAGS+= -I${LOCALBASE}/include -DBOOL_DEFINED
-LDFLAGS+= -L${LOCALBASE}/lib -Wl,--as-needed
-CONFIGURE_ENV+= zsh_cv_sys_path_dev_fd=no
CONFIGURE_ARGS= --with-tcsetpgrp \
--enable-function-subdirs \
+ --enable-maildir-support \
--enable-multibyte \
+ --enable-zsh-secure-free \
--sysconfdir=${PREFIX}/etc
+CONFIGURE_ENV+= zsh_cv_sys_path_dev_fd=no
-DOCS= LICENCE META-FAQ README \
- Etc/BUGS Etc/CONTRIBUTORS Etc/FAQ Etc/completion-style-guide \
- Doc/zsh*.html Doc/zsh.dvi
-
-PORTDOCS= *
-PORTEXAMPLES= zlogin zshenv zshrc
-
-## Vendor completions to be added into the port (none used now)
-#EXTRA_COMPLETION_FILES= _sockstat
-#EXTRA_COMPLETION_DIR= Completion/BSD/Command
+GNU_CONFIGURE= yes
+CPPFLAGS+= -I${LOCALBASE}/include -DBOOL_DEFINED
+LDFLAGS+= -L${LOCALBASE}/lib -Wl,--as-needed
+TEST_TARGET= test
-OPTIONS_DEFINE= DEBUG ETCDIR GDBM MAILDIR MEM PCRE SECURE_FREE STATIC \
+OPTIONS_DEFINE= DEBUG ETCDIR GDBM MEM PCRE STATIC \
DOCS EXAMPLES
-OPTIONS_DEFAULT=SECURE_FREE MAILDIR
OPTIONS_SUB= yes
-DEBUG_CONFIGURE_ENABLE= zsh-debug
-
-DOCS_DISTFILES= ${DISTNAME}-doc${EXTRACT_SUFX}:doc
+GDBM_DESC= Enable GDBM support (GPL)
+ETCDIR_DESC= System-wide defaults in /etc (instead of $${PREFIX}/etc)
+MEM_DESC= Enable zsh-mem options
-GDBM_DESC= Enable GDBM support (GPL)
GDBM_LIB_DEPENDS= libgdbm.so:databases/gdbm
-GDBM_CONFIGURE_ENABLE= gdbm
+PCRE_LIB_DEPENDS= libpcre.so:devel/pcre
-ETCDIR_DESC= System-wide defaults in /etc (instead of $${PREFIX}/etc)
+DEBUG_CONFIGURE_ENABLE= zsh-debug
+GDBM_CONFIGURE_ENABLE= gdbm
ETCDIR_CONFIGURE_OFF= --enable-etcdir=${PREFIX}/etc
-
-MAILDIR_DESC= Enable support for Maildirs in MAIL(PATH)
-MAILDIR_CONFIGURE_ENABLE= maildir-support
-
-MEM_DESC= Enable zsh-mem options
MEM_CONFIGURE_ENABLE= zsh-mem
-
-SECURE_FREE_DESC= Enable zsh-secure-free
-SECURE_FREE_CONFIGURE_ENABLE= zsh-secure-free
-
-PCRE_LIB_DEPENDS= libpcre.so:devel/pcre
PCRE_CONFIGURE_ENABLE= pcre
-## Some modules can only be built dynamically (such as the regex module).
-## If you enable STATIC, you may get strange errors if scripts/plugins
-## try to use the regex module.
+## Some modules can only be built as a shared library.
+## If you enable STATIC, you may get strange errors if you, a script,
+## or a plugin tries to use the regex module.
STATIC_LDFLAGS= -static
STATIC_CONFIGURE_ON= --disable-dynamic --with-term-lib="tinfow tinfo"
STATIC_CONFIGURE_OFF= --enable-dynamic --with-term-lib="ncursesw ncurses"
+DOCS= LICENCE META-FAQ README \
+ Etc/BUGS Etc/CONTRIBUTORS Etc/FAQ Etc/completion-style-guide \
+ Doc/zsh*.html Doc/zsh.dvi
+DOCS_DISTFILES= ${DISTNAME}-doc${EXTRACT_SUFX}:doc
+
+PORTDOCS= *
+PORTEXAMPLES= zlogin zshenv zshrc
+
+ZSH_VER= ${PORTVERSION}
+PLIST_SUB+= ZSH_VER="${ZSH_VER}"
+SUB_FILES= pkg-message
+
.include <bsd.port.pre.mk>
.if empty(ICONV_LIB)
@@ -103,31 +84,18 @@ CONFIGURE_ENV+= ac_cv_lib_iconv_libiconv=no
.endif
post-patch:
- @${REINPLACE_CMD} -i '' -e '1s|zsh|${zsh_CMD}|' ${WRKSRC}/Functions/Misc/run-help-ip
- @${REINPLACE_CMD} -e '/LIBS/s/-lrt//' ${WRKSRC}/configure
- @${SED} -i "" -e "s,link=dynamic,link=either," \
- ${WRKSRC}/Src/Modules/*.mdd
- @${SED} -i "" -e "s,/etc/,${LOCALBASE}/etc/," \
+# FreeBSD's clock_gettime(2) is in libc, not librt; see PR 167857
+ @${REINPLACE_CMD} -e '/LIBS/s|-lrt||' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e "s|/etc/|${LOCALBASE}/etc/|" \
${WRKSRC}/Functions/MIME/zsh-mime-setup
-# Adding vendor completions into the package
-.ifdef EXTRA_COMPLETION_FILES
- @${ECHO} "===> Installing extra completion files"
-.for COMPFILE in ${EXTRA_COMPLETION_FILES}
- @(if [ -f ${WRKSRC}/${EXTRA_COMPLETION_DIR}/${COMPFILE} ] ; then \
- ${ECHO} "${EXTRA_COMPLETION_DIR}/${COMPFILE} already exists" ; \
- exit 1 ; \
- else \
- ${ECHO} ${EXTRA_COMPLETION_DIR}/${COMPFILE} ; \
- ${CP} ${FILESDIR}/${COMPFILE} \
- ${WRKSRC}/${EXTRA_COMPLETION_DIR}/${COMPFILE} ; \
- fi)
-.endfor
-.endif
- @${FIND} ${WRKSRC}/Completion -type f -iname '*.orig' -delete
+post-patch-STATIC-on:
+ @${REINPLACE_CMD} -e "s|link=dynamic|link=either|" \
+ ${WRKSRC}/Src/Modules/*.mdd
post-build:
# Fix ".so" macro problem by using "soelim" command.
+# soelim needs the manpages in man1/
${LN} -sf ${WRKSRC}/Doc ${WRKSRC}/man1
${MV} ${WRKSRC}/Doc/zshall.1 ${WRKSRC}/Doc/zshall.1.source
(cd ${WRKSRC} && ${SOELIM} -r ${WRKSRC}/Doc/zshall.1.source > \
diff --git a/shells/zsh/files/patch-Completion-Unix-Command-_sysctl b/shells/zsh/files/patch-Completion-Unix-Command-_sysctl
index 4f856bb2e252..45a30eee243d 100644
--- a/shells/zsh/files/patch-Completion-Unix-Command-_sysctl
+++ b/shells/zsh/files/patch-Completion-Unix-Command-_sysctl
@@ -1,5 +1,5 @@
---- Completion/Unix/Command/_sysctl.orig 2014-10-02 21:28:23.000000000 +0200
-+++ Completion/Unix/Command/_sysctl 2014-10-09 07:57:47.570857223 +0200
+--- Completion/Unix/Command/_sysctl.orig 2015-11-29 21:46:55 UTC
++++ Completion/Unix/Command/_sysctl
@@ -1,7 +1,7 @@
#compdef sysctl
diff --git a/shells/zsh/files/extra-patch-bsdtar b/shells/zsh/files/patch-Completion-Unix-Type-_tar_archive
index ee7456f89a34..4fbd55b6c55e 100644
--- a/shells/zsh/files/extra-patch-bsdtar
+++ b/shells/zsh/files/patch-Completion-Unix-Type-_tar_archive
@@ -1,6 +1,9 @@
---- ./Completion/Unix/Type/_tar_archive.orig 2009-12-05 18:29:12.000000000 +0100
-+++ ./Completion/Unix/Type/_tar_archive 2011-02-27 23:44:32.000000000 +0100
-@@ -14,17 +14,8 @@
+bsdtar/libarchive knows how to handle compressed tarballs
+natively, without needing fiddly command switches.
+
+--- Completion/Unix/Type/_tar_archive.orig 2014-12-13 23:55:54 UTC
++++ Completion/Unix/Type/_tar_archive
+@@ -14,17 +14,8 @@ local expl
_description files expl 'archive file'
if [[ "$1" = *[urtx]* ]]; then
diff --git a/shells/zsh/pkg-descr b/shells/zsh/pkg-descr
index 0020d39d9dc5..19b0cf7ec826 100644
--- a/shells/zsh/pkg-descr
+++ b/shells/zsh/pkg-descr
@@ -1,16 +1,15 @@
-Zsh is a UNIX command interpreter (shell) which of the standard shells
-most resembles the Korn shell (ksh), although it is not completely
-compatible. It includes enhancements of many types, notably in the
-command-line editor, options for customising its behaviour, filename
-globbing, features to make C-shell (csh) users feel more at home and
-extra features drawn from tcsh (another `custom' shell).
+Zsh is the Swiss Army knife of shells. It combines the most popular
+features of every other shell, and then lets you customize every
+inch of it. Users of bourne-style and C-style shells will feel at
+home in it.
-If you want to use zsh completion system, you should type the following
-commands:
+Zsh does intelligent completion, spell-checking, has a rich syntax
+for precise globbing, and is fully extensible through plugin
+systems.
+
+To fire up the zsh completion system, type the following commands:
$ autoload -U compinstall
$ compinstall
-See also zshcompsys(1) manpage. :)
-
WWW: http://www.zsh.org/