Index: head/benchmarks/unixbench/Makefile =================================================================== --- head/benchmarks/unixbench/Makefile (revision 541216) +++ head/benchmarks/unixbench/Makefile (revision 541217) @@ -1,51 +1,51 @@ # Created by: se # $FreeBSD$ PORTNAME= unixbench DISTVERSIONPREFIX= v DISTVERSION= 5.1.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= benchmarks MAINTAINER= pizzamig@FreeBSD.org COMMENT= BYTE magazine's Public Domain benchmark for UNIX LICENSE= GPLv2 RUN_DEPENDS= x11perf:x11/x11perf USES= gmake perl5 shebangfix USE_GITHUB= yes GH_ACCOUNT= kdlucas GH_PROJECT= byte-unixbench WRKSRC_SUBDIR= UnixBench SUB_FILES= unixbench SHEBANG_FILES= Run pgms/gfx-x11 do-install: ${INSTALL_SCRIPT} ${WRKDIR}/unixbench ${STAGEDIR}${PREFIX}/bin/ ${MKDIR} ${STAGEDIR}${PREFIX}/libexec/unixbench ${INSTALL_SCRIPT} ${WRKSRC}/Run ${STAGEDIR}${PREFIX}/libexec/unixbench ${MKDIR} ${STAGEDIR}${PREFIX}/libexec/unixbench/pgms for f in ${WRKSRC}/pgms/* ; do \ case $$f in \ *.sh|*gfx-x11) \ ${INSTALL_SCRIPT} $${f} \ ${STAGEDIR}${PREFIX}/libexec/unixbench/pgms/ ;; \ *.logo|*.base) \ ${INSTALL_DATA} $${f} \ ${STAGEDIR}${PREFIX}/libexec/unixbench/pgms/ ;; \ *.orig|*.rej|*~) \ ;;\ *) \ ${INSTALL_PROGRAM} $${f} \ ${STAGEDIR}${PREFIX}/libexec/unixbench/pgms/ ;; \ esac ; \ done ${MKDIR} ${STAGEDIR}${PREFIX}/libexec/unixbench/testdir ${INSTALL_DATA} ${WRKSRC}/testdir/* ${STAGEDIR}${PREFIX}/libexec/unixbench/testdir/ ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${PREFIX}/libexec/unixbench/ ${INSTALL_DATA} ${WRKSRC}/Makefile ${STAGEDIR}${PREFIX}/libexec/unixbench/ .include Index: head/benchmarks/unixbench/files/patch-Run =================================================================== --- head/benchmarks/unixbench/files/patch-Run (revision 541216) +++ head/benchmarks/unixbench/files/patch-Run (revision 541217) @@ -1,71 +1,90 @@ ---- Run.orig 2017-09-04 20:35:19 UTC +--- Run.orig 2020-06-11 08:18:10 UTC +++ Run @@ -91,10 +91,10 @@ chomp($BASEDIR); my $BINDIR = getDir('UB_BINDIR', $BASEDIR . "/pgms"); # Temp directory, for temp files. -my $TMPDIR = getDir('UB_TMPDIR', $BASEDIR . "/tmp"); +my $TMPDIR = "/tmp"; # Directory to put results in. -my $RESULTDIR = getDir('UB_RESULTDIR', $BASEDIR . "/results"); +my $RESULTDIR = "/tmp"; # Directory where the tests are executed. my $TESTDIR = getDir('UB_TESTDIR', $BASEDIR . "/testdir"); -@@ -735,12 +735,10 @@ sub getSystemInfo { +@@ -672,6 +672,18 @@ sub processCpuFlags { + # these fields: + # describing the model etc. Returns undef if the information can't be got. + sub getCpuInfo { ++ my $ncpu = getCmdOutput("sysctl -n hw.ncpu"); ++ my $cpus = [ ]; ++ my $i; ++ for ($i=0;$i<$ncpu;$i++) { ++ $cpus->[$i]{'model'} = getCmdOutput("sysctl -n hw.model"); ++ $cpus->[$i]{'bogo'} = 0; ++ $cpus->[$i]{'flags'} = getCmdOutput("sysctl -n hw.machine"); ++ } ++ $cpus; ++} ++ ++sub getCpuInfoBak { + open(my $fd, "<", "/proc/cpuinfo") || return undef; + my $cpus = [ ]; +@@ -735,12 +747,10 @@ sub getSystemInfo { + # Get the language info. my $lang = getCmdOutput("printenv LANG"); - my $map = getCmdOutput("locale -k LC_CTYPE | grep charmap"); + my $map = getCmdOutput("locale -k | grep charmap"); $map =~ s/.*=//; - my $coll = getCmdOutput("locale -k LC_COLLATE | grep collate-codeset"); - $coll =~ s/.*=//; - $info->{'language'} = sprintf "%s (charmap=%s, collate=%s)", - $lang, $map, $coll; + $info->{'language'} = sprintf "%s (charmap=%s)", + $lang, $map; # Get details on the CPUs, if possible. my $cpus = getCpuInfo(); -@@ -750,10 +748,9 @@ sub getSystemInfo { +@@ -750,10 +760,9 @@ sub getSystemInfo { } # Get graphics hardware info. - $info->{'graphics'} = getCmdOutput("3dinfo | cut -f1 -d\'(\'"); + # $info->{'graphics'} = getCmdOutput("3dinfo | cut -f1 -d\'(\'"); # Get system run state, load and usage info. - $info->{'runlevel'} = getCmdOutput("runlevel | cut -f2 -d\" \""); $info->{'load'} = getCmdOutput("uptime"); $info->{'numUsers'} = getCmdOutput("who | wc -l"); -@@ -781,6 +778,7 @@ sub abortRun { +@@ -781,6 +790,7 @@ sub abortRun { # Do checks that everything's ready for testing. sub preChecks { + return; # Set the language. $ENV{'LANG'} = $language; -@@ -1386,7 +1384,7 @@ sub displaySystem { +@@ -1386,7 +1396,7 @@ sub displaySystem { } # Display system load and usage info. - printf $fd " %s; runlevel %s\n\n", $info->{'load'}, $info->{'runlevel'}; + printf $fd " %s; \n\n", $info->{'load'}; } -@@ -1603,8 +1601,8 @@ sub displaySystemHtml { +@@ -1603,8 +1613,8 @@ sub displaySystemHtml { # Display system runlevel, load and usage info. printf $fd "\n"; printf $fd " Uptime:\n"; - printf $fd " %s; runlevel %s\n", - $info->{'load'}, $info->{'runlevel'}; + printf $fd " %s\n", + $info->{'load'}; printf $fd "\n"; printf $fd "

\n\n";