summaryrefslogtreecommitdiff
path: root/shells/zsh
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2016-04-06 04:36:39 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2016-04-06 04:36:39 +0000
commit26866f517f62268d2668b5231937bdbb6bddb0ad (patch)
tree7333302f9fd63c90d5ac1ec0db954e54e67ae4a4 /shells/zsh
parent- Update to 1.0.2 (diff)
Clean up Makefile and regenerate patches.
Reorganize Makefile for clarity, and add a few comments. While here, regenerate the patches with makepatch. No functional changes.
Notes
Notes: svn path=/head/; revision=412602
Diffstat (limited to 'shells/zsh')
-rw-r--r--shells/zsh/Makefile63
-rw-r--r--shells/zsh/files/patch-Doc_zshmodules.14
-rw-r--r--shells/zsh/files/patch-Src_jobs.c8
-rw-r--r--shells/zsh/files/patch-Src_watch.c4
4 files changed, 47 insertions, 32 deletions
diff --git a/shells/zsh/Makefile b/shells/zsh/Makefile
index 9747a6d15eb8..dcce225a7f5a 100644
--- a/shells/zsh/Makefile
+++ b/shells/zsh/Makefile
@@ -22,9 +22,15 @@ 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}"
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 \
@@ -32,9 +38,7 @@ SHEBANG_FILES= Functions/Calendar/calendar_add \
Functions/Misc/zcalc \
Functions/Misc/zed \
Functions/Misc/zkbd
-SHEBANG_LANG= zsh
-zsh_OLD_CMD= /bin/zsh
-zsh_CMD= ${PREFIX}/bin/zsh
+
GNU_CONFIGURE= yes
TEST_TARGET= test
@@ -45,40 +49,48 @@ CONFIGURE_ARGS= --with-tcsetpgrp \
--enable-function-subdirs --enable-multibyte \
--sysconfdir=${PREFIX}/etc
-EXTRA_PATCHES= ${FILESDIR}/extra-patch-bsdtar
+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
-OPTIONS_DEFINE= GDBM MEM SECURE_FREE MAILDIR PCRE STATIC DOCS DEBUG \
- EXAMPLES
+OPTIONS_DEFINE= GDBM MEM SECURE_FREE MAILDIR PCRE STATIC DEBUG \
+ DOCS EXAMPLES
OPTIONS_DEFAULT=SECURE_FREE MAILDIR
+OPTIONS_SUB= yes
-GDBM_DESC= Enable GDBM support (GPL)
-MEM_DESC= Enable zsh-mem options
-SECURE_FREE_DESC= Enable zsh-secure-free
-MAILDIR_DESC= Enable support for Maildirs in MAIL(PATH)
-
-PLIST_SUB+= ZSH_VER="${ZSH_VER}"
-
-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
+DEBUG_CONFIGURE_ENABLE= zsh-debug
-OPTIONS_SUB= yes
+DOCS_DISTFILES= ${DISTNAME}-doc${EXTRACT_SUFX}:doc
-DOCS_DISTFILES= ${DISTNAME}-doc${EXTRACT_SUFX}:doc
+GDBM_DESC= Enable GDBM support (GPL)
GDBM_LIB_DEPENDS= libgdbm.so:databases/gdbm
GDBM_CONFIGURE_ENABLE= gdbm
-PCRE_LIB_DEPENDS= libpcre.so:devel/pcre
-PCRE_CONFIGURE_ENABLE= pcre
+
+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
-MAILDIR_CONFIGURE_ENABLE= maildir-support
+
+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.
STATIC_LDFLAGS= -static
STATIC_CONFIGURE_ON= --disable-dynamic --with-term-lib="tinfow tinfo"
STATIC_CONFIGURE_OFF= --enable-dynamic --with-term-lib="ncursesw ncurses"
-DEBUG_CONFIGURE_ENABLE= zsh-debug
.include <bsd.port.pre.mk>
@@ -93,6 +105,8 @@ post-patch:
${WRKSRC}/Src/Modules/*.mdd
@${SED} -i "" -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}
@@ -109,7 +123,7 @@ post-patch:
@${FIND} ${WRKSRC}/Completion -type f -iname '*.orig' -delete
post-build:
- # Fix ".so" macro problem by using "soelim" command.
+# Fix ".so" macro problem by using "soelim" command.
${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 > \
@@ -117,6 +131,7 @@ post-build:
post-install:
${LN} -f ${STAGEDIR}${PREFIX}/bin/zsh ${STAGEDIR}${PREFIX}/bin/rzsh
+# Precompile completions and functions
(${STAGEDIR}${PREFIX}/bin/zsh -fc ' \
setopt extendedglob nomark_dirs; \
cd ${STAGEDIR}/${DATADIR}/${ZSH_VER} ; \
diff --git a/shells/zsh/files/patch-Doc_zshmodules.1 b/shells/zsh/files/patch-Doc_zshmodules.1
index d7e839541ae8..fca78496c032 100644
--- a/shells/zsh/files/patch-Doc_zshmodules.1
+++ b/shells/zsh/files/patch-Doc_zshmodules.1
@@ -1,6 +1,6 @@
---- Doc/zshmodules.1.orig 2014-11-21 22:50:41 UTC
+--- Doc/zshmodules.1.orig 2015-12-02 18:53:48 UTC
+++ Doc/zshmodules.1
-@@ -2415,7 +2415,6 @@ Returns the process ID of the current pr
+@@ -2717,7 +2717,6 @@ Returns the process ID of the current pr
Returns the process ID of the parent of the current process, even in
subshells\&. Compare \fB$PPID\fP, which returns the process ID of the parent
of the main shell process\&.
diff --git a/shells/zsh/files/patch-Src_jobs.c b/shells/zsh/files/patch-Src_jobs.c
index 6b92999146fc..6d00064589db 100644
--- a/shells/zsh/files/patch-Src_jobs.c
+++ b/shells/zsh/files/patch-Src_jobs.c
@@ -1,6 +1,6 @@
---- Src/jobs.c.orig 2014-08-23 20:40:52.000000000 +0200
-+++ Src/jobs.c 2014-09-10 10:33:50.283018759 +0200
-@@ -694,15 +694,15 @@
+--- Src/jobs.c.orig 2015-08-16 18:44:40 UTC
++++ Src/jobs.c
+@@ -687,15 +687,15 @@ printtime(struct timeval *real, child_ti
/* go ahead and compute these, since almost every TIMEFMT will have them */
elapsed_time = real->tv_sec + real->tv_usec / 1000000.0;
@@ -19,7 +19,7 @@
user_time = ti->ut / (double) clktck;
system_time = ti->st / (double) clktck;
percent = 100.0 * (ti->ut + ti->st)
-@@ -796,7 +795,7 @@
+@@ -791,7 +791,7 @@ printtime(struct timeval *real, child_ti
#endif
#ifdef HAVE_STRUCT_RUSAGE_RU_MAXRSS
case 'M':
diff --git a/shells/zsh/files/patch-Src_watch.c b/shells/zsh/files/patch-Src_watch.c
index c01a3632f9c1..51244955eae2 100644
--- a/shells/zsh/files/patch-Src_watch.c
+++ b/shells/zsh/files/patch-Src_watch.c
@@ -1,5 +1,5 @@
---- Src/watch.c.orig 2011-11-13 10:39:47.736213000 +0100
-+++ Src/watch.c 2011-11-13 10:47:22.110214518 +0100
+--- Src/watch.c.orig 2015-08-20 19:59:47 UTC
++++ Src/watch.c
@@ -30,8 +30,11 @@
#include "zsh.mdh"