From nobody Fri Nov 26 00:55:10 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 639FB18B2605; Fri, 26 Nov 2021 00:55:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0brH0lL5z4p0H; Fri, 26 Nov 2021 00:55:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA97D2780E; Fri, 26 Nov 2021 00:55:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AQ0tAMe022571; Fri, 26 Nov 2021 00:55:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQ0tAJY022570; Fri, 26 Nov 2021 00:55:10 GMT (envelope-from git) Date: Fri, 26 Nov 2021 00:55:10 GMT Message-Id: <202111260055.1AQ0tAJY022570@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yasuhiro Kimura Subject: git: ae1787aab23e - main - shells/zsh: Add BASE_ZSH option List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yasu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae1787aab23e44e369dbb0cc814e8318c6f86e0d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637888111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lY74iehZtcriRvukiX5LgphFV89l3C5wnE6MKIuVeAA=; b=apt+LUCtTfdCZ6Ct0NFZq2vAYoZWtFjenMnMWdzb/8sJ0kiwhaLX/BYIt3/ceRc9z2y6KI hVorZUaHskGLOw/M02m3yCfAc9ohTqsw8VCyfEs0knB/ltb4vYvkStH4x8eSSfRtQiEl1f 3QJChzNtObxtydaCSroJscdvF2yLT0Qa5G+j3dNxO08wNQKqNXn7zaHkmwl19iwceDHGY3 Mxkokm3WFU/Si8pfy2JilF2Iab+EfuVLM/Dv9ApNae9kMK7ZV7IEqI8UQdUqQUxCBULj7X 3PKPLnSa9+sE8GYH5LHoj9pK7V74xI1uDTxdL0/GAM8WJg4aCVDHhgFq3pgHBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637888111; a=rsa-sha256; cv=none; b=SJEtcBeGOWMUsnwGUMIRU0EQuMnQreFfhBWtJtvDe3zeE0BJBlIylxhuPldspQKtLQUccQ HpniQ6nqri1sJzZmmWe1McbnCcC4ie1CytksI7xCA5wBRQ2rbiTDdr0ZTCu2qdmGCuLRsD z9jsh0uLR2pDiU1XKKKu6yMVZCiQS4wh3wFhJVQ+QsESS+xxVhiG568P+rFKPCqJR9qOsm SkGc8kEpBlNg7I5JbRBcGMKWOw2YmuBGiIagxlTSu2l7a59E0iQ4MxrhWYddJy495lSasq SQAWKzntB6D5xJcF3l/rHuRoq0LDlosbH7UY4v6PWjKuogIN11qRU4njaADibg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=ae1787aab23e44e369dbb0cc814e8318c6f86e0d commit ae1787aab23e44e369dbb0cc814e8318c6f86e0d Author: Yasuhiro Kimura AuthorDate: 2021-10-12 16:47:27 +0000 Commit: Yasuhiro Kimura CommitDate: 2021-11-26 00:53:36 +0000 shells/zsh: Add BASE_ZSH option Add new option BASE_ZSH that makes zsh and rzsh also available as /bin/zsh and /bin/rzsh. Under ports flamework everything is installed under /usr/local unless custom prefix is used. And according to it zsh is installed as /usr/local/bin/zsh. But on most Linux based OSes zsh is installed as /bin/zsh. And it causes problem if user's account information is shared between FreeBSD and Linux by using such tools as LDAP or NIS as account information also includes absolute path of user's login shell. To work around it I have created /bin/zsh as symbolic link referencing /usr/local/bin/zsh and also edited /etc/shells to add /bin/zsh to it every time I set up new FreeBSD system. But it's quite bothersome and that is why I add new BASE_ZSH option. While I'm here, * Pet portclippy * Re-format Makefile with portfmt PR: 259109 Proposed by: Chris Hutchinson (more intuitive option name) Approved by: maintainer timeout (> 2 weeks) --- shells/zsh/Makefile | 80 ++++++++++++++++++++++++++++------------------------ shells/zsh/pkg-plist | 2 ++ 2 files changed, 45 insertions(+), 37 deletions(-) diff --git a/shells/zsh/Makefile b/shells/zsh/Makefile index 2298ee440644..3d107054fe63 100644 --- a/shells/zsh/Makefile +++ b/shells/zsh/Makefile @@ -17,69 +17,69 @@ LICENSE_NAME= ZSH license LICENSE_FILE= ${WRKSRC}/LICENCE LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -MAKE_JOBS_UNSAFE= yes - -USES= autoreconf cpe iconv localbase:ldflags ncurses shebangfix tar:xz +USES= autoreconf cpe iconv localbase:ldflags ncurses shebangfix \ + tar:xz +SHEBANG_FILES= Functions/Calendar/* Functions/Misc/* SHEBANG_LANG= zsh -zsh_OLD_CMD= zsh # shebang appears as /bin/zsh and just zsh -SHEBANG_FILES= Functions/Calendar/* \ - Functions/Misc/* - -CONFIGURE_ARGS= --with-tcsetpgrp \ - --enable-function-subdirs \ - --enable-maildir-support \ - --enable-multibyte \ - --enable-zsh-secure-free \ - --sysconfdir=${PREFIX}/etc - +zsh_OLD_CMD= zsh # shebang appears as /bin/zsh and just zsh + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --enable-function-subdirs \ + --enable-maildir-support \ + --enable-multibyte \ + --enable-zsh-secure-free \ + --sysconfdir=${PREFIX}/etc \ + --with-tcsetpgrp # fix PREFIX != LOCALBASE -CONFIGURE_ARGS+=--disable-site-fndir \ - --enable-additional-fpath=${DATADIR}/site-functions +CONFIGURE_ARGS+= --disable-site-fndir \ + --enable-additional-fpath=${DATADIR}/site-functions +CONFIGURE_ENV+= ac_cv_header_sys_capability_h=no \ + zsh_cv_sys_path_dev_fd=no -CONFIGURE_ENV+= zsh_cv_sys_path_dev_fd=no \ - ac_cv_header_sys_capability_h=no +MAKE_JOBS_UNSAFE= yes +TEST_TARGET= test -GNU_CONFIGURE= yes CPPFLAGS+= -DBOOL_DEFINED LDFLAGS+= -Wl,--as-needed -TEST_TARGET= test -OPTIONS_DEFINE= DEBUG ETCDIR GDBM MEM PCRE STATIC \ - DOCS EXAMPLES +SUB_FILES= pkg-message + +PLIST_SUB+= ZSH_VER="${ZSH_VER}" +PORTDOCS= * + +OPTIONS_DEFINE= BASE_ZSH DEBUG DOCS ETCDIR EXAMPLES GDBM MEM PCRE STATIC OPTIONS_SUB= yes +BASE_ZSH_DESC= Make zsh and rzsh also available as /bin/zsh and /bin/rzsh ETCDIR_DESC= System-wide defaults in /etc (instead of $${PREFIX}/etc) GDBM_DESC= Enable GDBM support (GPL) MEM_DESC= Enable zsh-mem options -GDBM_LIB_DEPENDS= libgdbm.so:databases/gdbm -PCRE_LIB_DEPENDS= libpcre.so:devel/pcre - DEBUG_CONFIGURE_ENABLE= zsh-debug +DOCS_DISTFILES= ${DISTNAME}-doc${EXTRACT_SUFX}:doc ETCDIR_CONFIGURE_OFF= --enable-etcdir=${PREFIX}/etc +GDBM_LIB_DEPENDS= libgdbm.so:databases/gdbm GDBM_CONFIGURE_ENABLE= gdbm MEM_CONFIGURE_ENABLE= zsh-mem +PCRE_LIB_DEPENDS= libpcre.so:devel/pcre PCRE_CONFIGURE_ENABLE= pcre ## 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_CONFIGURE_ON= --disable-dynamic \ + --with-term-lib="tinfow tinfo" +STATIC_CONFIGURE_OFF= --enable-dynamic \ + --with-term-lib="ncursesw ncurses" 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 +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 ZSH_VER= ${PORTVERSION} -PLIST_SUB+= ZSH_VER="${ZSH_VER}" -SUB_FILES= pkg-message .include @@ -123,12 +123,18 @@ post-install: ${CHMOD} 644 $$i.zwc ; \ done') -post-install-EXAMPLES-on: - @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} - (cd ${WRKSRC}/StartupFiles && ${INSTALL_DATA} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}) +post-install-BASE_ZSH-on: + @${MKDIR} ${STAGEDIR}/bin +.for f in zsh rzsh + ${RLN} ${STAGEDIR}${PREFIX}/bin/${f} ${STAGEDIR}/bin/${f} +.endfor post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}) +post-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + (cd ${WRKSRC}/StartupFiles && ${INSTALL_DATA} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}) + .include diff --git a/shells/zsh/pkg-plist b/shells/zsh/pkg-plist index e51f7e5c411b..27783c0543af 100644 --- a/shells/zsh/pkg-plist +++ b/shells/zsh/pkg-plist @@ -1,5 +1,7 @@ @shell bin/zsh @shell bin/rzsh +%%BASE_ZSH%%@shell /bin/zsh +%%BASE_ZSH%%@shell /bin/rzsh bin/zsh-%%ZSH_VER%% %%NO_STATIC%%lib/zsh/%%ZSH_VER%%/zsh/cap.so %%NO_STATIC%%lib/zsh/%%ZSH_VER%%/zsh/clone.so