git: 1bdccb1e1940 - main - benchmarks/glmark2: update the port to version 2023.01

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Wed, 01 Mar 2023 14:55:27 UTC
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1bdccb1e19402cbdecb2ad52013f76b9d3eefc3b

commit 1bdccb1e19402cbdecb2ad52013f76b9d3eefc3b
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-03-01 14:54:54 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-03-01 14:54:54 +0000

    benchmarks/glmark2: update the port to version 2023.01
    
    - Now uses the Meson build system for the most common
      build flavors (X11, Wayland, DRM)
    - Add new option for GBM offscreen rendering (not sure
      how useful it is though)
    - Move `gl' and `localbase' from global USES to those
      options which actually require them
    
    Reported by:    portscout
    PR:             269776 (independent)
---
 benchmarks/glmark2/Makefile              | 24 ++++++++++++-----------
 benchmarks/glmark2/distinfo              |  6 +++---
 benchmarks/glmark2/files/patch-python311 | 33 --------------------------------
 benchmarks/glmark2/pkg-plist             | 18 +++++++++++------
 4 files changed, 28 insertions(+), 53 deletions(-)

diff --git a/benchmarks/glmark2/Makefile b/benchmarks/glmark2/Makefile
index e3303910cab3..d747a631891f 100644
--- a/benchmarks/glmark2/Makefile
+++ b/benchmarks/glmark2/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	glmark2
-PORTVERSION=	2021.12
+PORTVERSION=	2023.01
 CATEGORIES=	benchmarks
 
 MAINTAINER=	danfe@FreeBSD.org
@@ -10,17 +10,16 @@ LICENSE=	GPLv3
 
 LIB_DEPENDS=	libpng.so:graphics/png
 
-USES=		compiler:c++14-lang gl jpeg localbase:ldflags pkgconfig waf
-USE_GL=		egl gl glesv2
+USES=		compiler:c++14-lang jpeg meson pkgconfig
 USE_GITHUB=	yes
-CONFIGURE_ARGS=	--with-flavors=${PLATFORMS:ts,} --no-opt --no-debug
+CONFIGURE_ARGS=	-Dflavors=${PLATFORMS:ts,}
 
 PORTDOCS=	NEWS
 
 OPTIONS_DEFINE=	DOCS
 OPTIONS_MULTI=	PLATFORM
-OPTIONS_MULTI_PLATFORM=	DRM WAYLAND X11
-OPTIONS_DEFAULT=DRM WAYLAND X11
+OPTIONS_MULTI_PLATFORM=	DRM GBM WAYLAND X11
+OPTIONS_DEFAULT=	DRM GBM WAYLAND X11
 OPTIONS_SUB=	yes
 
 PLATFORM_DESC=		Window systems
@@ -28,21 +27,24 @@ PLATFORM_DESC=		Window systems
 DRM_DESC=		KMS console support
 DRM_LIB_DEPENDS=	libudev.so:devel/libudev-devd \
 			libdrm.so:graphics/libdrm
+DRM_USES=		gl
 DRM_USE=		GL=gbm
 DRM_VARS=		PLATFORMS+="drm-gl drm-glesv2"
 
+GBM_DESC=		GBM offscreen rendering
+GBM_USES=		gl
+GBM_USE=		GL=gbm
+GBM_VARS=		PLATFORMS+="gbm-gl gbm-glesv2"
+
 WAYLAND_CATEGORIES=	wayland
 WAYLAND_BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:devel/evdev-proto \
 			wayland-protocols>=1.12:graphics/wayland-protocols
 WAYLAND_LIB_DEPENDS=	libwayland-egl.so:graphics/wayland
 WAYLAND_VARS=		PLATFORMS+="wayland-gl wayland-glesv2"
 
-X11_USES=		xorg
+X11_USES=		localbase xorg
 X11_USE=		XORG=x11
-X11_VARS=		PLATFORMS+="x11-gl x11-glesv2"
-
-post-patch:
-	@${REINPLACE_CMD} -e "/lib/s/, 'dl'//" ${WRKSRC}/src/wscript_build
+X11_VARS=		PLATFORMS+="x11-gl x11-glesv2 x11-gl-egl"
 
 post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
diff --git a/benchmarks/glmark2/distinfo b/benchmarks/glmark2/distinfo
index c6b4e81b168d..81c63163f63c 100644
--- a/benchmarks/glmark2/distinfo
+++ b/benchmarks/glmark2/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1640270771
-SHA256 (glmark2-glmark2-2021.12_GH0.tar.gz) = 9f111284b2ef1d3fce91928e249e6ca00796a036831b063a549a0f3b03557a95
-SIZE (glmark2-glmark2-2021.12_GH0.tar.gz) = 9360052
+TIMESTAMP = 1674126135
+SHA256 (glmark2-glmark2-2023.01_GH0.tar.gz) = 8fece3fc323b643644a525be163dc4931a4189971eda1de8ad4c1712c5db3d67
+SIZE (glmark2-glmark2-2023.01_GH0.tar.gz) = 9366116
diff --git a/benchmarks/glmark2/files/patch-python311 b/benchmarks/glmark2/files/patch-python311
deleted file mode 100644
index 6f77aae72de6..000000000000
--- a/benchmarks/glmark2/files/patch-python311
+++ /dev/null
@@ -1,33 +0,0 @@
-https://gitlab.com/ita1024/waf/-/commit/68997828c850
-
---- waflib/ConfigSet.py.orig	2021-12-23 14:46:11 UTC
-+++ waflib/ConfigSet.py
-@@ -140,7 +140,7 @@ class ConfigSet(object):
- 		Utils.writef(filename,''.join(buf))
- 	def load(self,filename):
- 		tbl=self.table
--		code=Utils.readf(filename,m='rU')
-+		code=Utils.readf(filename,m='r')
- 		for m in re_imp.finditer(code):
- 			g=m.group
- 			tbl[g(2)]=eval(g(3))
---- waflib/Context.py.orig	2021-12-23 14:46:11 UTC
-+++ waflib/Context.py
-@@ -109,7 +109,7 @@ class Context(ctx):
- 				cache[node]=True
- 				self.pre_recurse(node)
- 				try:
--					function_code=node.read('rU',encoding)
-+					function_code=node.read('r',encoding)
- 					exec(compile(function_code,node.abspath(),'exec'),self.exec_dict)
- 				finally:
- 					self.post_recurse(node)
-@@ -340,7 +340,7 @@ def load_module(path,encoding=None):
- 		pass
- 	module=imp.new_module(WSCRIPT_FILE)
- 	try:
--		code=Utils.readf(path,m='rU',encoding=encoding)
-+		code=Utils.readf(path,m='r',encoding=encoding)
- 	except EnvironmentError:
- 		raise Errors.WafError('Could not read the file %r'%path)
- 	module_dir=os.path.dirname(path)
diff --git a/benchmarks/glmark2/pkg-plist b/benchmarks/glmark2/pkg-plist
index 304bba8bce9f..7e8882e80bad 100644
--- a/benchmarks/glmark2/pkg-plist
+++ b/benchmarks/glmark2/pkg-plist
@@ -1,15 +1,21 @@
 %%DRM%%bin/glmark2-drm
 %%DRM%%bin/glmark2-es2-drm
+%%GBM%%bin/glmark2-gbm
+%%GBM%%bin/glmark2-es2-gbm
 %%WAYLAND%%bin/glmark2-wayland
 %%WAYLAND%%bin/glmark2-es2-wayland
 %%X11%%bin/glmark2
+%%X11%%bin/glmark2-egl
 %%X11%%bin/glmark2-es2
-%%DRM%%share/man/man1/glmark2-drm.1.gz
-%%DRM%%share/man/man1/glmark2-es2-drm.1.gz
-%%WAYLAND%%share/man/man1/glmark2-wayland.1.gz
-%%WAYLAND%%share/man/man1/glmark2-es2-wayland.1.gz
-%%X11%%share/man/man1/glmark2.1.gz
-%%X11%%share/man/man1/glmark2-es2.1.gz
+%%DRM%%man/man1/glmark2-drm.1.gz
+%%DRM%%man/man1/glmark2-es2-drm.1.gz
+%%GBM%%man/man1/glmark2-gbm.1.gz
+%%GBM%%man/man1/glmark2-es2-gbm.1.gz
+%%WAYLAND%%man/man1/glmark2-wayland.1.gz
+%%WAYLAND%%man/man1/glmark2-es2-wayland.1.gz
+%%X11%%man/man1/glmark2.1.gz
+%%X11%%man/man1/glmark2-egl.1.gz
+%%X11%%man/man1/glmark2-es2.1.gz
 %%DATADIR%%/models/asteroid-high.3ds
 %%DATADIR%%/models/asteroid-low.3ds
 %%DATADIR%%/models/bunny.obj