summaryrefslogtreecommitdiff
path: root/benchmarks/linux-unigine-valley
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2021-11-22 10:31:58 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2021-11-22 10:31:59 +0000
commit46f126d48beb5b3588105ed9371b63653ba81637 (patch)
tree77c1bfc517bffc257ae4a418c988c7d15ec50b80 /benchmarks/linux-unigine-valley
parentdatabases/py-asyncpg: Update to 0.25.0 (diff)
benchmarks/linux-unigine-{heaven,valley}: the ports had been improved (+)
- Add missing dependency for playing music: USE_LINUX+=openal-soft - In the `do-extract', rather than changing current directory, pass it to tar(1) as a -C argument and don't needlessly use semi-private _DISTDIR variable: this makes the command shorter and avoids bogus double slash in the build log - Provide more user-friendly wrapper script which anticipates potential problems that typically affect running this program and advises on how to solve them - Spell GNU/Linux correctly in the COMMENT and port description; reformat the latter with `fmt -w 75' for better looks (less ragged right edge)
Diffstat (limited to 'benchmarks/linux-unigine-valley')
-rw-r--r--benchmarks/linux-unigine-valley/Makefile14
-rw-r--r--benchmarks/linux-unigine-valley/files/wrapper.sh.in22
-rw-r--r--benchmarks/linux-unigine-valley/pkg-descr17
3 files changed, 37 insertions, 16 deletions
diff --git a/benchmarks/linux-unigine-valley/Makefile b/benchmarks/linux-unigine-valley/Makefile
index 0446d215c567..9750dc3d2a80 100644
--- a/benchmarks/linux-unigine-valley/Makefile
+++ b/benchmarks/linux-unigine-valley/Makefile
@@ -2,7 +2,7 @@
PORTNAME= unigine-valley
PORTVERSION= 1.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= benchmarks linux
MASTER_SITES= https://assets.unigine.com/d/
PKGNAMEPREFIX= linux-
@@ -10,7 +10,7 @@ DISTNAME= Unigine_Valley-${PORTVERSION}
EXTRACT_SUFX= .run
MAINTAINER= h2+fbsdports@fsfe.org
-COMMENT= Unigine Valley Benchmark, basic version, linux binaries
+COMMENT= Unigine Valley benchmark (basic version for GNU/Linux)
LICENSE= Proprietary
LICENSE_NAME= Unigine "Basic" License
@@ -19,24 +19,24 @@ LICENSE_PERMS= no-dist-sell no-pkg-sell no-dist-mirror no-pkg-mirror
ONLY_FOR_ARCHS= amd64 i386
USES= linux shebangfix
-USE_LINUX= dri xorglibs
+USE_LINUX= dri openal-soft xorglibs
USE_LDCONFIG= yes
NO_BUILD= yes
SHEBANG_FILES= valley
bash_CMD= ${LINUXBASE}/bin/bash
+SUB_FILES= wrapper.sh
DESKTOP_ENTRIES="Unigine Valley" "${COMMENT}" "${DATADIR}/data/launcher/icon.png" \
"${PKGNAMEPREFIX}${PORTNAME}" "Game;" false
do-extract:
@${MKDIR} ${WRKSRC}
- cd ${WRKSRC} && ${TAIL} -n 1491255 ${_DISTDIR}/${DISTFILES} | ${TAR} zxf -
- ${PRINTF} '#!/bin/sh\ncd ${DATADIR}\nexec\
- ${LINUXBASE}/bin/bash ./valley\n' > ${WRKDIR}/${PORTNAME}
+ @${TAIL} -n 1491255 ${DISTDIR}/${DISTFILES} | ${TAR} xzf - -C ${WRKSRC}
do-install:
- ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PKGNAMEPREFIX}${PORTNAME}
+ ${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh \
+ ${STAGEDIR}${PREFIX}/bin/${PKGNAMEPREFIX}${PORTNAME}
cd ${WRKSRC} && ${COPYTREE_SHARE} ./data ${STAGEDIR}${DATADIR}
cd ${WRKSRC} && ${COPYTREE_SHARE} ./bin ${STAGEDIR}${DATADIR}
cd ${WRKSRC} && ${COPYTREE_SHARE} ./documentation ${STAGEDIR}${DATADIR}
diff --git a/benchmarks/linux-unigine-valley/files/wrapper.sh.in b/benchmarks/linux-unigine-valley/files/wrapper.sh.in
new file mode 100644
index 000000000000..d1c2b28d1b66
--- /dev/null
+++ b/benchmarks/linux-unigine-valley/files/wrapper.sh.in
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+LNX_ROOT=$(sysctl -n compat.linux.emul_path)
+
+if [ ! -f "$LNX_ROOT/proc/self/exe" -o ! -d "$LNX_ROOT/sys/dev/char" ]
+then
+ echo "This program requires mounted linprocfs(5) and linsysfs(5)" >&2
+ exit 1
+fi
+
+# OpenAL Soft uses PulseAudio by default, which might not work on FreeBSD
+
+ALSOFT_CONF=$LNX_ROOT/etc/openal/alsoft.conf
+
+if ! grep -qs '^drivers[[:blank:]]*=[[:blank:]]*oss' "$ALSOFT_CONF"
+then
+ echo "If there's no sound, try putting \`oss' as the first item" \
+ "on the \`drivers' line in the $ALSOFT_CONF file." | fmt -76 >&2
+ sleep 2
+fi
+
+cd %%DATADIR%% && exec $LNX_ROOT/bin/bash ./valley
diff --git a/benchmarks/linux-unigine-valley/pkg-descr b/benchmarks/linux-unigine-valley/pkg-descr
index 5fc19ae592c7..83204b61024b 100644
--- a/benchmarks/linux-unigine-valley/pkg-descr
+++ b/benchmarks/linux-unigine-valley/pkg-descr
@@ -1,13 +1,12 @@
-Valley Benchmark is a new GPU stress-testing tool from the developers
-of the very popular and highly acclaimed Heaven Benchmark. The
-forest-covered valley surrounded by vast mountains amazes with its
-scale from a bird's-eye view and is extremely detailed down to every
-leaf and flower petal. This non-synthetic benchmark powered by the
-state-of-the art UNIGINE Engine showcases a comprehensive set of
-cutting-edge graphics technologies with a dynamic environment and
-fully interactive modes available to the end user.
+Valley Benchmark is a new GPU stress-testing tool from the developers of
+the very popular and highly acclaimed Heaven Benchmark. The forest-covered
+valley surrounded by vast mountains amazes with its scale from a bird's-eye
+view and is extremely detailed down to every leaf and flower petal. This
+non-synthetic benchmark powered by the state-of-the art UNIGINE Engine
+showcases a comprehensive set of cutting-edge graphics technologies with a
+dynamic environment and fully interactive modes available to the end user.
-This port includes the linux-binaries of the basic (free-to-use)
+This port includes the binaries for GNU/Linux of the basic (free-to-use)
version of the benchmark.
WWW: https://benchmark.unigine.com/valley