aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-09-10 16:38:18 +0800
committerbapt <bapt@FreeBSD.org>2014-09-10 16:38:18 +0800
commit463b15a8186fc2b7540a65cd86ca0ab6b21528b4 (patch)
tree475cba52c2ec282468a4a79b834dd37f5dcff977
parentcfb609e957b5edc09ce20711aee38249dc3ca330 (diff)
downloadfreebsd-ports-gnome-463b15a8186fc2b7540a65cd86ca0ab6b21528b4.tar.gz
freebsd-ports-gnome-463b15a8186fc2b7540a65cd86ca0ab6b21528b4.tar.zst
freebsd-ports-gnome-463b15a8186fc2b7540a65cd86ca0ab6b21528b4.zip
Regenerate the patch that corrects memory report for builtin time command
-rw-r--r--shells/zsh/Makefile1
-rw-r--r--shells/zsh/files/patch-Src_jobs.c30
2 files changed, 31 insertions, 0 deletions
diff --git a/shells/zsh/Makefile b/shells/zsh/Makefile
index 5f0f6d3ced8d..bd6adfd4b99d 100644
--- a/shells/zsh/Makefile
+++ b/shells/zsh/Makefile
@@ -3,6 +3,7 @@
PORTNAME= zsh
PORTVERSION= 5.0.6
+PORTREVISION= 1
CATEGORIES= shells
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION} \
SF/${PORTNAME}/${PORTNAME}-doc/${PORTVERSION}:doc
diff --git a/shells/zsh/files/patch-Src_jobs.c b/shells/zsh/files/patch-Src_jobs.c
new file mode 100644
index 000000000000..f9f6a72acae5
--- /dev/null
+++ b/shells/zsh/files/patch-Src_jobs.c
@@ -0,0 +1,30 @@
+--- 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,14 @@
+ /* go ahead and compute these, since almost every TIMEFMT will have them */
+ elapsed_time = real->tv_sec + real->tv_usec / 1000000.0;
+
++ long clktck = get_clktck();
+ #ifdef HAVE_GETRUSAGE
+ user_time = ti->ru_utime.tv_sec + ti->ru_utime.tv_usec / 1000000.0;
+ system_time = ti->ru_stime.tv_sec + ti->ru_stime.tv_usec / 1000000.0;
+- total_time = user_time + system_time;
+- percent = 100.0 * total_time
+- / (real->tv_sec + real->tv_usec / 1000000.0);
++ percent = 100.0 * total_time / elapsed_time;
++ total_time *= (double) clktck;
+ #else
+ {
+- long clktck = get_clktck();
+ user_time = ti->ut / (double) clktck;
+ system_time = ti->st / (double) clktck;
+ percent = 100.0 * (ti->ut + ti->st)
+@@ -796,7 +795,7 @@
+ #endif
+ #ifdef HAVE_STRUCT_RUSAGE_RU_MAXRSS
+ case 'M':
+- fprintf(stderr, "%ld", ti->ru_maxrss / 1024);
++ fprintf(stderr, "%ld", ti->ru_maxrss);
+ break;
+ #endif
+ #ifdef HAVE_STRUCT_RUSAGE_RU_MAJFLT