git: b9da7fa0441f - main - games/ezquake: support for textures built into bsp maps up to 8192x8192 in size

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Wed, 21 Feb 2024 13:57:04 UTC
The branch main has been updated by vvd:

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

commit b9da7fa0441f97e509ef289bf5770cad5568a351
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-02-21 13:50:23 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-02-21 13:50:23 +0000

    games/ezquake: support for textures built into bsp maps up to 8192x8192 in size
    
    1. Add support for textures built into bsp maps up to 8192x8192 in size.
    2. Add LICENSE.
    3. Recreate all patches with make makepatch.
    
    Approved by:    arrowd (mentor, implicit)
---
 games/ezquake/Makefile                     |  5 ++++-
 games/ezquake/files/patch-Makefile         |  6 +++---
 games/ezquake/files/patch-config_manager.c |  4 ++--
 games/ezquake/files/patch-fs.c             | 12 ++++++------
 games/ezquake/files/patch-gl__texture.c    | 11 +++++++++++
 games/ezquake/files/patch-host.c           |  6 +++---
 6 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/games/ezquake/Makefile b/games/ezquake/Makefile
index 94ab54e06e9e..6052010e5a9f 100644
--- a/games/ezquake/Makefile
+++ b/games/ezquake/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	ezquake
 DISTVERSION=	3.2.3
-PORTREVISION=	3
+PORTREVISION=	4
 PORTEPOCH=	2
 CATEGORIES=	games
 MASTER_SITES=	https://github.com/ezQuake/ezquake-source/archive/ \
@@ -13,6 +13,9 @@ MAINTAINER=	vvd@FreeBSD.org
 COMMENT=	Modern QuakeWorld client
 WWW=		https://www.ezquake.com/
 
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
 LIB_DEPENDS=	libcurl.so:ftp/curl \
 		libexpat.so:textproc/expat2 \
 		libjansson.so:devel/jansson \
diff --git a/games/ezquake/files/patch-Makefile b/games/ezquake/files/patch-Makefile
index a2bf147c34bb..36c05c1dc79f 100644
--- a/games/ezquake/files/patch-Makefile
+++ b/games/ezquake/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig
+--- Makefile.orig	2021-02-09 17:35:52 UTC
 +++ Makefile
-@@ -89,6 +89,7 @@
+@@ -89,6 +89,7 @@ SDL2_CFLAGS ?= $(shell sdl2-config --cflags)
  SDL2_LIBS ?= $(shell sdl2-config --libs)
  
  CFLAGS_c += $(BUILD_DEFS) $(VER_DEFS) $(PATH_DEFS) $(SDL2_CFLAGS) -DNDEBUG -DJSS_CAM -DUSE_PR2 -DWITH_NQPROGS -DUSE_SDL2 -DWITH_ZIP
@@ -8,7 +8,7 @@
  LIBS_c += $(SDL2_LIBS)
  
  # built-in requirements
-@@ -379,7 +380,7 @@
+@@ -379,7 +380,7 @@ endif
  ifdef CONFIG_WINDOWS
      TARG_c := ezquake.exe
  else
diff --git a/games/ezquake/files/patch-config_manager.c b/games/ezquake/files/patch-config_manager.c
index a8101f526004..f4b99ada77e8 100644
--- a/games/ezquake/files/patch-config_manager.c
+++ b/games/ezquake/files/patch-config_manager.c
@@ -1,6 +1,6 @@
---- config_manager.c.orig
+--- config_manager.c.orig	2021-02-09 17:35:52 UTC
 +++ config_manager.c
-@@ -68,7 +68,7 @@
+@@ -68,7 +68,7 @@ cvar_t	cfg_save_sysinfo	=	{"cfg_save_sysinfo", "0"};
  cvar_t	cfg_save_cmdline	=	{"cfg_save_cmdline", "1"};
  cvar_t	cfg_backup			=	{"cfg_backup", "0"};
  cvar_t	cfg_legacy_exec		=	{"cfg_legacy_exec", "1"};
diff --git a/games/ezquake/files/patch-fs.c b/games/ezquake/files/patch-fs.c
index d8996840c962..a36395ef144f 100644
--- a/games/ezquake/files/patch-fs.c
+++ b/games/ezquake/files/patch-fs.c
@@ -1,6 +1,6 @@
---- fs.c.orig
+--- fs.c.orig	2021-02-09 17:35:52 UTC
 +++ fs.c
-@@ -63,6 +63,8 @@
+@@ -63,6 +63,8 @@ char	com_basedir[MAX_OSPATH];	// c:/quake
  char	com_homedir[MAX_PATH];		// something really long C:/Documents and Settings/qqshka
  char	userdirfile[MAX_OSPATH] = {0};
  char	com_userdir[MAX_OSPATH] = {0};
@@ -9,7 +9,7 @@
  int		userdir_type = -1;
  
  searchpath_t	*fs_searchpaths = NULL;
-@@ -616,6 +618,12 @@
+@@ -616,6 +618,12 @@ void FS_SetGamedir (char *dir, qbool force)
  	// Flush all data, so it will be forced to reload.
  	Cache_Flush ();
  
@@ -22,7 +22,7 @@
  	snprintf(com_gamedir, sizeof(com_gamedir), "%s/%s", com_basedir, dir);
  
  	FS_AddGameDirectory(com_gamedir, FS_LOAD_FILE_ALL);
-@@ -699,6 +707,8 @@
+@@ -699,6 +707,8 @@ void FS_InitFilesystemEx( qbool guess_cwd ) {
  #elif defined(__linux__)
  		if (!Sys_fullpath(com_basedir, "/proc/self/exe", sizeof(com_basedir)))
  			Sys_Error("FS_InitFilesystemEx: Sys_fullpath failed");
@@ -31,7 +31,7 @@
  #else
  		com_basedir[0] = 0; // FIXME: MAC / FreeBSD
  #endif
-@@ -717,12 +727,11 @@
+@@ -717,12 +727,11 @@ void FS_InitFilesystemEx( qbool guess_cwd ) {
  		strlcpy (com_basedir, COM_Argv(i + 1), sizeof(com_basedir));
  	}
   	else { // made com_basedir equa to cwd
@@ -48,7 +48,7 @@
  	}
  
  	for (i = 0; i < (int) strlen(com_basedir); i++)
-@@ -767,6 +776,14 @@
+@@ -767,6 +776,14 @@ void FS_InitFilesystemEx( qbool guess_cwd ) {
  	}
  
  	// start up with id1 by default
diff --git a/games/ezquake/files/patch-gl__texture.c b/games/ezquake/files/patch-gl__texture.c
new file mode 100644
index 000000000000..c5250684aefd
--- /dev/null
+++ b/games/ezquake/files/patch-gl__texture.c
@@ -0,0 +1,11 @@
+--- gl_texture.c.orig	2021-02-09 17:35:52 UTC
++++ gl_texture.c
+@@ -417,7 +417,7 @@ static void GL_Upload32 (unsigned *data, int width, in
+ 
+ static void GL_Upload8 (byte *data, int width, int height, int mode) 
+ {
+-	static unsigned trans[640 * 480];
++	static unsigned trans[8192 * 8192];
+ 	int	i, image_size, p;
+ 	unsigned *table;
+ 
diff --git a/games/ezquake/files/patch-host.c b/games/ezquake/files/patch-host.c
index cba197302ad7..ff4f65a13da5 100644
--- a/games/ezquake/files/patch-host.c
+++ b/games/ezquake/files/patch-host.c
@@ -1,6 +1,6 @@
---- host.c.orig
+--- host.c.orig	2021-02-09 17:35:52 UTC
 +++ host.c
-@@ -333,16 +333,30 @@
+@@ -333,16 +333,30 @@ void SYSINFO_Init(void)
  	SYSINFO_processor_description = cpu_model;
  
  	gettimeofday(&old_tp, NULL);
@@ -31,7 +31,7 @@
  
  	if (gl_renderer  &&  gl_renderer[0]) {
  		if (SYSINFO_3D_description != NULL) {
-@@ -351,7 +365,7 @@
+@@ -351,7 +365,7 @@ void SYSINFO_Init(void)
  		SYSINFO_3D_description = Q_strdup(gl_renderer);
  	}