freebsd-ports/benchmarks/linux-gputest/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

73 lines
2.2 KiB
Makefile

PORTNAME= gputest
PORTVERSION= 0.7.0
CATEGORIES= benchmarks linux
MASTER_SITES= http://vault.101011010.xyz/distfiles/ \
http://freebsd.nsu.ru/distfiles/ LOCAL/danfe
# http://www.ozone3d.net/gputest/dl/ (original
# upstream URL, but they ask not to hotlink)
DISTNAME= GpuTest_Linux_x64_${PORTVERSION}
PKGNAMEPREFIX= linux-
MAINTAINER= danfe@FreeBSD.org
COMMENT= GPU stress test and OpenGL benchmark
WWW= https://www.Geeks3D.com/GpuTest/
LICENSE= GEEKS3D
LICENSE_NAME= Geeks3D End-User License Agreement
LICENSE_FILE= ${WRKSRC}/EULA.txt
LICENSE_PERMS= dist-mirror pkg-mirror auto-accept
ONLY_FOR_ARCHS= amd64
PATCH_DEPENDS= p5-Sys-Mmap>0:devel/p5-Sys-Mmap
USES= linux perl5 zip
USE_LINUX= dri libglvnd xorglibs
USE_PERL5= patch
NO_BUILD= yes
OPTIONS_DEFINE= DOCS GUI
OPTIONS_DEFAULT= GUI
OPTIONS_SUB= yes
GUI_DESC= Install Python/Tkinter-based GUI launcher
GUI_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>0:x11-toolkits/py-tkinter@${PY_FLAVOR}
GUI_USES= python:run
post-patch:
@${REINPLACE_CMD} -e '1s,bash,sh,' ${WRKSRC}/start_*.sh
@${RM} ${WRKSRC}/data/.DS_Store
@cd ${WRKSRC} && ${PERL} ${FILESDIR}/apply-binary-patch.pl < \
${FILESDIR}/fix-logfile-path.crk
# We cannot just embed shebang line in the patch because 210:fix-shebang
# happens before 500:do-patch :(
post-patch-GUI-on:
@${REINPLACE_CMD} -e '1 { x; s,^,#!${PYTHON_CMD},; G; }' \
${WRKSRC}/gputest_gui.py
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
cd ${WRKSRC} && ${COPYTREE_SHARE} data \
${STAGEDIR}${PREFIX}/lib/${PORTNAME}
${INSTALL_LIB} ${WRKSRC}/*.so ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
${INSTALL_PROGRAM} ${WRKSRC}/GpuTest \
${STAGEDIR}${PREFIX}/lib/${PORTNAME}
${INSTALL_SCRIPT} ${WRKSRC}/start_*.sh \
${STAGEDIR}${PREFIX}/lib/${PORTNAME}
${INSTALL_DATA} ${WRKSRC}/_geeks3d_gputest_scores.csv \
${STAGEDIR}${PREFIX}/lib/${PORTNAME}
${PRINTF} '#!/bin/sh\n\ncd ${PREFIX}/lib/${PORTNAME} || exit\
1\n\nexec ./GpuTest "$$@"\n' > \
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
do-install-GUI-on:
${INSTALL_SCRIPT} ${WRKSRC}/gputest_gui.py ${STAGEDIR}${PREFIX}/bin
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.txt ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>