View | Details | Raw Unified | Return to bug 273641
Collapse All | Expand All

(-)b/misc/gtime/Makefile (+51 lines)
Added Link Here
1
PORTNAME=	time
2
DISTVERSION=	1.9
3
CATEGORIES=	misc
4
MASTER_SITES=	GNU/time
5
PKGNAMEPREFIX=	g
6
7
MAINTAINER=	ivalentine@arizona.edu
8
COMMENT=	GNU version of 'time' utility
9
WWW=		https://www.gnu.org/software/time/
10
11
LICENSE=	GPLv3
12
LICENSE_FILE=	${WRKSRC}/COPYING
13
14
BUILD_DEPENDS=	help2man:misc/help2man
15
16
USES=		cpe gmake makeinfo
17
CPE_VENDOR=	gnu
18
19
GNU_CONFIGURE=	yes
20
CONFIGURE_ARGS=	--program-prefix=g
21
CONFIGURE_ENV+=	MAKEINFO="${MAKEINFO} --no-split"
22
INSTALL_TARGET=	install-strip
23
TEST_TARGET=	check
24
25
DATADIR=	${PREFIX}/share/${PKGBASE}
26
DOCSDIR=	${PREFIX}/share/doc/${PKGBASE}
27
INFO=		time
28
PLIST_FILES=	bin/gtime \
29
		man/man1/gtime.1.gz
30
PORTDOCS=	AUTHORS ChangeLog NEWS README
31
32
OPTIONS_DEFINE=	DOCS
33
OPTIONS_SUB=	yes
34
35
post-build:
36
	${MKDIR} ${WRKDIR}/man1
37
	help2man -Nn "run programs and summarize system resource usage" ${WRKSRC}/time -o ${WRKDIR}/man1/${PKGBASE}.1
38
39
post-install:
40
	${INSTALL_MAN} ${WRKDIR}/man1/${PKGBASE}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/
41
42
post-install-DOCS-on:
43
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
44
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
45
46
pre-test:
47
.for f in help-version.sh time-exit-codes.sh time-max-rss.sh time-posix-quiet.sh
48
	@${REINPLACE_CMD} -e 's|env time|env ${WRKSRC}/time|g' ${WRKSRC}/tests/${f}
49
.endfor
50
51
.include <bsd.port.mk>
(-)b/misc/gtime/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1694798374
2
SHA256 (time-1.9.tar.gz) = fbacf0c81e62429df3e33bda4cee38756604f18e01d977338e23306a3e3b521e
3
SIZE (time-1.9.tar.gz) = 596779
(-)b/misc/gtime/files/patch-tests_time-max-rss.sh (+38 lines)
Added Link Here
1
--- tests/time-max-rss.sh.orig	2023-09-14 02:47:32 UTC
2
+++ tests/time-max-rss.sh
3
@@ -32,13 +32,13 @@ time-aux || framework_failure_ "time-aux is missing/no
4
 env time -o mem-baseline -f "%M" time-aux \
5
   || framework_failure_ "failed to run time/time-aux (baseline max-rss)"
6
 
7
-# Allocate 5MB of RAM
8
-env time -o mem-5MB -f "%M" time-aux -m 5M \
9
-  || framework_failure_ "failed to run time/time-aux (5M max-rss)"
10
+# Allocate 400MB of RAM
11
+env time -o mem-400MB -f "%M" time-aux -m 400M \
12
+  || framework_failure_ "failed to run time/time-aux (400M max-rss)"
13
 
14
 # Calculate the difference
15
 b=$(cat mem-baseline) || framework_failure_ "failed to read mem-baseline"
16
-c=$(cat mem-5MB) || framework_failure_ "failed to read mem-5MB"
17
+c=$(cat mem-400MB) || framework_failure_ "failed to read mem-400MB"
18
 d=$(( c - b ))
19
 
20
 # On some systems (e.g. OpenSolaris) getrusage(2) returns zero in ru_maxrss.
21
@@ -48,13 +48,13 @@ test "$b" -eq "0" && test "$c" -eq 0 \
22
 
23
 # There could be alot of variation between each invocation,
24
 # accept a reasonable range
25
-if test "$d" -ge 5000 && test "$d" -le 6000 ; then
26
-    : # acceptable values: 5000-6000 KB
27
+if test "$d" -ge 400000 && test "$d" -le 500000 ; then
28
+    : # acceptable values: 400000-500000 KB
29
 else
30
     cat<<EOF>&2
31
-time(1) failed to detect 5MB allcoation.
32
+time(1) failed to detect 400MB allcoation.
33
   mem-baseline(kb): $b
34
-  mem-5MB(kb):      $c
35
+  mem-400MB(kb):      $c
36
   delta(kb):        $d
37
 EOF
38
     fail=1
(-)b/misc/gtime/pkg-descr (-1 / +2 lines)
Added Link Here
0
- 
1
GNU time runs another program, then displays information about the
2
resources used by that program.

Return to bug 273641