git: 5f19e458f4fc - main - games/DDNet: update 15.9.1 → 16.0

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Wed, 30 Mar 2022 20:20:35 UTC
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5f19e458f4fc3dd11d8b4ef37f45d47753113fdd

commit 5f19e458f4fc3dd11d8b4ef37f45d47753113fdd
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2022-03-30 15:11:06 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-03-30 20:19:45 +0000

    games/DDNet: update 15.9.1 → 16.0
---
 games/DDNet/Makefile                           | 15 +++++++++++----
 games/DDNet/distinfo                           |  6 +++---
 games/DDNet/files/patch-cmake_FindVulkan.cmake | 11 +++++++++++
 3 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/games/DDNet/Makefile b/games/DDNet/Makefile
index 4497c8631418..5e6551a75881 100644
--- a/games/DDNet/Makefile
+++ b/games/DDNet/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	DDNet
-PORTVERSION=	15.9.1
+PORTVERSION=	16.0
 CATEGORIES=	games
 MASTER_SITES=	https://ddnet.tw/downloads/
 
@@ -11,7 +11,7 @@ LICENSE_FILE=	${WRKSRC}/license.txt
 
 LIB_DEPENDS=	libpnglite.so:graphics/pnglite
 
-USES=		cmake compiler:c++11-lang pkgconfig python sqlite:3 ssl tar:xz
+USES=		cmake compiler:c++17-lang pkgconfig python sqlite:3 ssl tar:xz
 CMAKE_ARGS=	-DPYTHON_EXECUTABLE="${PYTHON_CMD}"
 CMAKE_OFF=	AUTOUPDATE DOWNLOAD_GTEST PREFER_BUNDLED_LIBS
 
@@ -20,10 +20,10 @@ CXXFLAGS+=	-DBINARY_DIR="\\\"${PREFIX}/bin\\\""
 PORTDATA=	*
 DATADIR=	${PREFIX}/share/ddnet
 
-OPTIONS_DEFINE=		TEST WEBSOCKETS MYSQL VIDEORECORDER UPNP
+OPTIONS_DEFINE=		TEST WEBSOCKETS MYSQL VIDEORECORDER UPNP VULKAN
 OPTIONS_MULTI=		COMPONENTS
 OPTIONS_MULTI_COMPONENTS=CLIENT SERVER
-OPTIONS_DEFAULT=	CLIENT SERVER TEST VIDEORECORDER UPNP
+OPTIONS_DEFAULT=	CLIENT SERVER TEST VIDEORECORDER UPNP VULKAN
 OPTIONS_SUB=		yes
 
 CLIENT_DESC=		Build game client
@@ -66,6 +66,13 @@ UPNP_CMAKE_BOOL=	UPNP
 UPNP_LIB_DEPENDS=	libminiupnpc.so:net/miniupnpc
 UPNP_IMPLIES=		SERVER
 
+VULKAN_DESC=		Enable the vulkan backend
+VULKAN_CMAKE_BOOL=	VULKAN
+VULKAN_IMPLIES=		CLIENT
+VULKAN_BUILD_DEPENDS=	glslangValidator:graphics/glslang \
+			${LOCALBASE}/include/vulkan/vulkan.h:graphics/vulkan-headers
+VULKAN_LIB_DEPENDS=	libvulkan.so:graphics/vulkan-loader
+
 post-extract:
 # json-parser and md5 are left intact
 .for dep in glew pnglite wavpack zlib
diff --git a/games/DDNet/distinfo b/games/DDNet/distinfo
index c488d1f49b50..cf371f677e3a 100644
--- a/games/DDNet/distinfo
+++ b/games/DDNet/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1645786981
-SHA256 (DDNet-15.9.1.tar.xz) = af29bb554f522cb05cb58a5663c30858b25e4a58830a0cc694d2d10d9d13b7ee
-SIZE (DDNet-15.9.1.tar.xz) = 26689296
+TIMESTAMP = 1648642451
+SHA256 (DDNet-16.0.tar.xz) = ee151734a3301133f0ac48392681eb0416ae575d0b920736080eb32670237812
+SIZE (DDNet-16.0.tar.xz) = 28315596
diff --git a/games/DDNet/files/patch-cmake_FindVulkan.cmake b/games/DDNet/files/patch-cmake_FindVulkan.cmake
new file mode 100644
index 000000000000..1cc85087d5a7
--- /dev/null
+++ b/games/DDNet/files/patch-cmake_FindVulkan.cmake
@@ -0,0 +1,11 @@
+--- cmake/FindVulkan.cmake.orig	2022-03-30 07:34:45 UTC
++++ cmake/FindVulkan.cmake
+@@ -1,7 +1,7 @@
+ if(NOT CMAKE_CROSSCOMPILING)
+   find_package(PkgConfig QUIET)
+   pkg_check_modules(PC_VULKAN vulkan)
+-  if(PC_VULKAN_FOUND)
++  if(FALSE AND PC_VULKAN_FOUND)
+     set(VULKAN_INCLUDE_DIRS "${PC_VULKAN_INCLUDE_DIRS}")
+     set(VULKAN_LIBRARIES "${PC_VULKAN_LIBRARIES}")
+     set(VULKAN_FOUND TRUE)