From owner-svn-ports-all@freebsd.org Wed Jul 27 07:39:22 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4E3FBA61B7; Wed, 27 Jul 2016 07:39:22 +0000 (UTC) (envelope-from adamw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9275A1AA4; Wed, 27 Jul 2016 07:39:22 +0000 (UTC) (envelope-from adamw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R7dLlJ095950; Wed, 27 Jul 2016 07:39:21 GMT (envelope-from adamw@FreeBSD.org) Received: (from adamw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R7dLTx095946; Wed, 27 Jul 2016 07:39:21 GMT (envelope-from adamw@FreeBSD.org) Message-Id: <201607270739.u6R7dLTx095946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adamw set sender to adamw@FreeBSD.org using -f From: Adam Weinberger Date: Wed, 27 Jul 2016 07:39:21 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r419165 - in head/shells/zsh: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 07:39:22 -0000 Author: adamw Date: Wed Jul 27 07:39:21 2016 New Revision: 419165 URL: https://svnweb.freebsd.org/changeset/ports/419165 Log: 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). Added: head/shells/zsh/files/patch-Completion-Unix-Type-_tar_archive - copied, changed from r419157, head/shells/zsh/files/extra-patch-bsdtar Deleted: head/shells/zsh/files/extra-patch-bsdtar Modified: head/shells/zsh/Makefile head/shells/zsh/files/patch-Completion-Unix-Command-_sysctl head/shells/zsh/pkg-descr Modified: head/shells/zsh/Makefile ============================================================================== --- head/shells/zsh/Makefile Wed Jul 27 07:12:24 2016 (r419164) +++ head/shells/zsh/Makefile Wed Jul 27 07:39:21 2016 (r419165) @@ -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 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 .if empty(ICONV_LIB) @@ -103,31 +84,18 @@ CONFIGURE_ENV+= ac_cv_lib_iconv_libiconv .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 > \ Modified: head/shells/zsh/files/patch-Completion-Unix-Command-_sysctl ============================================================================== --- head/shells/zsh/files/patch-Completion-Unix-Command-_sysctl Wed Jul 27 07:12:24 2016 (r419164) +++ head/shells/zsh/files/patch-Completion-Unix-Command-_sysctl Wed Jul 27 07:39:21 2016 (r419165) @@ -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 Copied and modified: head/shells/zsh/files/patch-Completion-Unix-Type-_tar_archive (from r419157, head/shells/zsh/files/extra-patch-bsdtar) ============================================================================== --- head/shells/zsh/files/extra-patch-bsdtar Wed Jul 27 02:03:38 2016 (r419157, copy source) +++ head/shells/zsh/files/patch-Completion-Unix-Type-_tar_archive Wed Jul 27 07:39:21 2016 (r419165) @@ -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 Modified: head/shells/zsh/pkg-descr ============================================================================== --- head/shells/zsh/pkg-descr Wed Jul 27 07:12:24 2016 (r419164) +++ head/shells/zsh/pkg-descr Wed Jul 27 07:39:21 2016 (r419165) @@ -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/