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)
This commit is contained in:
Alexey Dokuchaev 2021-11-22 10:31:58 +00:00
parent 15a2371535
commit 46f126d48b
6 changed files with 76 additions and 33 deletions

View file

@ -2,7 +2,7 @@
PORTNAME= unigine-heaven
PORTVERSION= 4.0
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= benchmarks linux
MASTER_SITES= https://assets.unigine.com/d/
PKGNAMEPREFIX= linux-
@ -10,7 +10,7 @@ DISTNAME= Unigine_Heaven-${PORTVERSION}
EXTRACT_SUFX= .run
MAINTAINER= h2+fbsdports@fsfe.org
COMMENT= Unigine Heaven Benchmark, basic version, linux binaries
COMMENT= Unigine Heaven 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= heaven
bash_CMD= ${LINUXBASE}/bin/bash
SUB_FILES= wrapper.sh
DESKTOP_ENTRIES="Unigine Heaven" "${COMMENT}" "${DATADIR}/data/launcher/icon.png" \
"${PKGNAMEPREFIX}${PORTNAME}" "Game;" false
do-extract:
@${MKDIR} ${WRKSRC}
cd ${WRKSRC} && ${TAIL} -n 1097642 ${_DISTDIR}/${DISTFILES} | ${TAR} zxf -
${PRINTF} '#!/bin/sh\ncd ${DATADIR}\nexec\
${LINUXBASE}/bin/bash ./heaven\n' > ${WRKDIR}/${PORTNAME}
@${TAIL} -n 1097642 ${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}

View file

@ -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 ./heaven

View file

@ -1,14 +1,14 @@
Heaven Benchmark immerses a user into a magical steampunk world of
shiny brass, wood and gears. Nested on flying islands, a tiny village
with its cozy, sun-heated cobblestone streets, an elaborately crafted
dirigible above the expanse of fluffy clouds, and a majestic dragon
on the central square gives a true sense of adventure. An interactive
experience with fly-by and walk-through modes allows for exploring
all corners of this world powered by the cutting-edge UNIGINE Engine
that leverages the most advanced capabilities of graphics APIs and
turns this benchmark into a visual masterpiece.
Heaven Benchmark immerses a user into a magical steampunk world of shiny
brass, wood and gears. Nested on flying islands, a tiny village with its
cozy, sun-heated cobblestone streets, an elaborately crafted dirigible
above the expanse of fluffy clouds, and a majestic dragon on the central
square gives a true sense of adventure. An interactive experience with
fly-by and walk-through modes allows for exploring all corners of this
world powered by the cutting-edge UNIGINE Engine that leverages the most
advanced capabilities of graphics APIs and turns this benchmark into a
visual masterpiece.
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/heaven

View file

@ -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}

View file

@ -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

View file

@ -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