summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-benchmarks/glmark2/Manifest1
-rw-r--r--app-benchmarks/glmark2/glmark2-2021.12.ebuild72
2 files changed, 73 insertions, 0 deletions
diff --git a/app-benchmarks/glmark2/Manifest b/app-benchmarks/glmark2/Manifest
index 285e3b4c..275cc1ed 100644
--- a/app-benchmarks/glmark2/Manifest
+++ b/app-benchmarks/glmark2/Manifest
@@ -1 +1,2 @@
DIST glmark2-2020.04.tar.gz 9364467 SHA256 0fa7723111c928a73c04d4fa4adfc15a9dea6d335fe189f59c74ae5af26f99a2 SHA512 68d72403ab5c6b4562faf43ae94159e4b8dcb697f62ea9dc3eac5634a3e22b19e14e215a081ae2a39e5db77e6f0f40d5ceb0281962600526d08121a197105a80 WHIRLPOOL 786bd372f6081b6c653489012267581a77d625b4e8b353ad7fcc925ec680f0bbb7685ae89f2c9b5bb3d67c330998d22b13ab4415122cdc401ad6c1eb65d1b92c
+DIST glmark2-2021.12.tar.gz 9360052 SHA256 9f111284b2ef1d3fce91928e249e6ca00796a036831b063a549a0f3b03557a95 SHA512 d1840e6213e27ead650987ff4945ef76276d900d2ff0c08e008e806b98b24d73d77c5fb248017590d9cc3c9293b2a5074d644f5e8473b8e655e0aedd55155eda WHIRLPOOL 86db3e8980c1d8ed2e6a6eabf79d9101779f27a1dc08f0e3c70cfef24cbb222e5988b3f2b77981f88ec461fc8c42ad9ffceffbe4c9bbe9e1425153ad4b0dafde
diff --git a/app-benchmarks/glmark2/glmark2-2021.12.ebuild b/app-benchmarks/glmark2/glmark2-2021.12.ebuild
new file mode 100644
index 00000000..4c76c3c8
--- /dev/null
+++ b/app-benchmarks/glmark2/glmark2-2021.12.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit meson python-single-r1
+
+REV=${PV#*_p}
+
+DESCRIPTION="glmark2 is an OpenGL 2.0 and ES 2.0 benchmark"
+HOMEPAGE="https://github.com/glmark2/glmark2"
+SRC_URI="https://github.com/glmark2/glmark2/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+drm gles2 +opengl wayland X"
+
+RDEPEND="
+ virtual/jpeg:0=
+ media-libs/libpng:0=
+
+ gles2? ( media-libs/mesa[gles2?] )
+ drm? (
+ x11-libs/libdrm
+ media-libs/mesa[gbm(+)]
+ virtual/libudev:=
+ )
+ X? ( x11-libs/libX11 )
+ wayland? (
+ dev-libs/wayland
+ >=dev-libs/wayland-protocols-1.12
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ wayland? ( dev-util/wayland-scanner )
+"
+
+REQUIRED_USE="|| ( opengl gles2 )
+ || ( drm wayland X )"
+
+src_configure() {
+ local flavors=()
+
+ if use X; then
+ use opengl && flavors+=("x11-gl")
+ use gles2 && flavors+=("x11-glesv2")
+ fi
+
+ if use drm; then
+ use opengl && flavors+=("drm-gl")
+ use gles2 && flavors+=("drm-glesv2")
+ fi
+
+ if use wayland; then
+ use opengl && flavors+=("wayland-gl")
+ use gles2 && flavors+=("wayland-glesv2")
+ fi
+
+ flavor_list() {
+ local flavors="$(sort -u <<< "${1// /$'\n'}")"
+ echo "${flavors//$'\n'/,}"
+ }
+
+ local emesonargs=(
+ -Dflavors=$(flavor_list "${flavors[*]}")
+ )
+ meson_src_configure
+}