aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/linux-gputest
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2020-09-18 04:41:44 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2020-09-18 04:41:44 +0000
commit8d8e0de55366c118f82ae45335dfd15110b4909f (patch)
tree269de1f4d197eff8b8d73871cb943565e1c058eb /benchmarks/linux-gputest
parent316e9ac74c5818447844f5a074ba210261166a68 (diff)
downloadports-8d8e0de55366c118f82ae45335dfd15110b4909f.tar.gz
ports-8d8e0de55366c118f82ae45335dfd15110b4909f.zip
Add a port of GpuTest, OpenGL-based GPU stress test and popular benchmark.
This is the last version which natively supports GNU/Linux, the later are unfortunately Windows-only. WWW: http://www.Geeks3D.com/GpuTest/
Notes
Notes: svn path=/head/; revision=548874
Diffstat (limited to 'benchmarks/linux-gputest')
-rw-r--r--benchmarks/linux-gputest/Makefile73
-rw-r--r--benchmarks/linux-gputest/distinfo3
-rw-r--r--benchmarks/linux-gputest/files/patch-gputest__gui.py29
-rw-r--r--benchmarks/linux-gputest/pkg-descr9
-rw-r--r--benchmarks/linux-gputest/pkg-plist38
5 files changed, 152 insertions, 0 deletions
diff --git a/benchmarks/linux-gputest/Makefile b/benchmarks/linux-gputest/Makefile
new file mode 100644
index 000000000000..695d8fca24fd
--- /dev/null
+++ b/benchmarks/linux-gputest/Makefile
@@ -0,0 +1,73 @@
+# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
+# $FreeBSD$
+
+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
+
+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
+
+USES= linux zip
+USE_LINUX= dri libglvnd xorglibs
+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
+# Save log file in writable location instead of ${PREFIX}/lib/${PORTNAME}
+ @${REINPLACE_CMD} -e \
+ 's,_geeks3d_gputest_log\.txt,/tmp/geeks3d_gputest.log,' \
+ ${WRKSRC}/GpuTest
+
+# 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>
diff --git a/benchmarks/linux-gputest/distinfo b/benchmarks/linux-gputest/distinfo
new file mode 100644
index 000000000000..06752a531924
--- /dev/null
+++ b/benchmarks/linux-gputest/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1393924825
+SHA256 (GpuTest_Linux_x64_0.7.0.zip) = a6cbddfb40dc203735d63bc9609b24abde8613fbb649d0ef7d0d4515842ba263
+SIZE (GpuTest_Linux_x64_0.7.0.zip) = 2083164
diff --git a/benchmarks/linux-gputest/files/patch-gputest__gui.py b/benchmarks/linux-gputest/files/patch-gputest__gui.py
new file mode 100644
index 000000000000..ff33bda331c1
--- /dev/null
+++ b/benchmarks/linux-gputest/files/patch-gputest__gui.py
@@ -0,0 +1,29 @@
+--- gputest_gui.py.orig 2014-03-04 02:16:44 UTC
++++ gputest_gui.py
+@@ -7,7 +7,7 @@
+
+ import os
+ #from subprocess import call
+-import Tkinter as tk
++import tkinter as tk
+
+
+ root = tk.Tk()
+@@ -90,7 +90,7 @@ def prepare_command_line():
+ index = cs[0]
+ seltext = listbox1.get(index)
+ else:
+- print "\nPlease select a test (FurMark is the default test)."
++ print("\nPlease select a test (FurMark is the default test).")
+ index = 0
+ seltext = listbox1.get(index)
+
+@@ -98,7 +98,7 @@ def prepare_command_line():
+ for demo in allDemos:
+ if demo.demo_name == seltext:
+ demo_code = demo.demo_code
+- g_command_line = "./GpuTest /test='%s' /width=%d /height=%d /gpumon_terminal" % (demo_code, g_width, g_height)
++ g_command_line = "gputest /test='%s' /width=%d /height=%d /gpumon_terminal" % (demo_code, g_width, g_height)
+ if (fullscreen.get() == 1):
+ g_command_line += " /fullscreen"
+
diff --git a/benchmarks/linux-gputest/pkg-descr b/benchmarks/linux-gputest/pkg-descr
new file mode 100644
index 000000000000..50dc1970814d
--- /dev/null
+++ b/benchmarks/linux-gputest/pkg-descr
@@ -0,0 +1,9 @@
+GpuTest is a cross-platform GPU stress test and benchmarking utility, based
+on OpenGL. It comes with a number of different tests, including the famous
+stress test based on FurMark (OpenGL 2.1 or 3.2), a tessellation test based
+on TessMark (OpenGL 4.0), and geometry instancing test (OpenGL 3.3).
+
+An optional GUI (graphical user interface) program made with Python/Tkinter
+is available since GpuTest version 0.6.0.
+
+WWW: http://www.Geeks3D.com/GpuTest/
diff --git a/benchmarks/linux-gputest/pkg-plist b/benchmarks/linux-gputest/pkg-plist
new file mode 100644
index 000000000000..7ce8c384f1eb
--- /dev/null
+++ b/benchmarks/linux-gputest/pkg-plist
@@ -0,0 +1,38 @@
+bin/gputest
+%%GUI%%bin/gputest_gui.py
+lib/gputest/GpuTest
+lib/gputest/_geeks3d_gputest_scores.csv
+lib/gputest/data/_bg.jpg
+lib/gputest/data/_fur.jpg
+lib/gputest/data/apple_logo.jpg
+lib/gputest/data/bg.jpg
+lib/gputest/data/bg02.jpg
+lib/gputest/data/bg02_.jpg
+lib/gputest/data/bg08.jpg
+lib/gputest/data/bg09.jpg
+lib/gputest/data/fur.jpg
+lib/gputest/data/linux_logo.jpg
+lib/gputest/data/piano_texture.jpg
+lib/gputest/data/piano_texture_01.jpg
+lib/gputest/data/tess_bump.jpg
+lib/gputest/data/tess_diffuse.jpg
+lib/gputest/data/tess_normal.jpg
+lib/gputest/data/windows_logo.jpg
+lib/gputest/libgxl3d_r_linux.so
+lib/gputest/plugin_gxl3d_gpu_monitor_gml_x64.so
+lib/gputest/plugin_gxl3d_opencl_x64.so
+lib/gputest/start_furmark_benchmark_fullscreen_1920x1080.sh
+lib/gputest/start_furmark_windowed_1024x640.sh
+lib/gputest/start_gimark_benchmark_fullscreen_1920x1080.sh
+lib/gputest/start_gimark_windowed_1024x640.sh
+lib/gputest/start_pixmark_piano_benchmark_fullscreen_1920x1080.sh
+lib/gputest/start_pixmark_piano_windowed_1024x640.sh
+lib/gputest/start_pixmark_volplosion_benchmark_fullscreen_1920x1080.sh
+lib/gputest/start_pixmark_volplosion_windowed_1024x640.sh
+lib/gputest/start_plot3d_benchmark_fullscreen_1920x1080.sh
+lib/gputest/start_plot3d_windowed_1024x640.sh
+lib/gputest/start_tessmark_benchmark_fullscreen_1920x1080.sh
+lib/gputest/start_tessmark_windowed_1024x640.sh
+lib/gputest/start_triangle_benchmark_fullscreen_1920x1080.sh
+lib/gputest/start_triangle_windowed_1024x640.sh
+%%PORTDOCS%%%%DOCSDIR%%/README.txt