git: f409f005a617 - main - games/q3cellshading: try to unbreak and thus undeprecate the port
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 Nov 2023 17:01:39 UTC
The branch main has been updated by danfe:
URL: https://cgit.FreeBSD.org/ports/commit/?id=f409f005a617f7a7eb47712778cc6ae3c58367ca
commit f409f005a617f7a7eb47712778cc6ae3c58367ca
Author: Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-11-28 17:00:22 +0000
Commit: Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-11-28 17:00:22 +0000
games/q3cellshading: try to unbreak and thus undeprecate the port
Whack the `post-patch' target altogether while here by converting
to regular patch files.
---
games/q3cellshading/Makefile | 11 ----------
.../files/patch-code-unix-unix_main.c | 20 ++++++++++++-----
.../files/patch-code_botlib_be__interface.c | 13 +++++++++++
.../files/patch-code_renderer_tr__init.c | 25 ++++++++++++++++++++++
4 files changed, 53 insertions(+), 16 deletions(-)
diff --git a/games/q3cellshading/Makefile b/games/q3cellshading/Makefile
index 545358c1958f..80fb57dccc76 100644
--- a/games/q3cellshading/Makefile
+++ b/games/q3cellshading/Makefile
@@ -9,9 +9,6 @@ MAINTAINER= danfe@FreeBSD.org
COMMENT= Quake III engine with Cell Shading capabilities
WWW= https://q3cellshading.sourceforge.net/
-DEPRECATED= BROKEN for more than 2 years on all supported versions
-EXPIRATION_DATE= 2023-11-30
-BROKEN= ld: error: duplicate symbol: re
ONLY_FOR_ARCHS= i386
ONLY_FOR_ARCHS_REASON= does not run properly; try games/ioquake3 with option
@@ -74,14 +71,6 @@ USE_XORG= xxf86dga xxf86vm
MAKE_ENV+= GAMELIBS=YES
.endif
-post-patch:
- @${REINPLACE_CMD} -e 's|botlib\.log|/dev/null|' \
- ${WRKSRC}/code/botlib/be_interface.c
- @${REINPLACE_CMD} -e \
- 's|//[[:blank:]]*\(Swap_Init[[:blank:]]*();\)|\1|' \
- ${WRKSRC}/code/botlib/be_interface.c \
- ${WRKSRC}/code/renderer/tr_init.c
-
do-install:
.for bin in ${Q3BIN}
# Adjust program names to avoid conflicts with other Quake3 ports
diff --git a/games/q3cellshading/files/patch-code-unix-unix_main.c b/games/q3cellshading/files/patch-code-unix-unix_main.c
index 4ffa7d4132d5..a00024c2f194 100644
--- a/games/q3cellshading/files/patch-code-unix-unix_main.c
+++ b/games/q3cellshading/files/patch-code-unix-unix_main.c
@@ -1,6 +1,16 @@
---- ./code/unix/unix_main.c.orig Wed May 31 18:55:12 2006
-+++ ./code/unix/unix_main.c Wed May 31 18:55:13 2006
-@@ -707,12 +707,12 @@
+--- code/unix/unix_main.c.orig 2006-07-18 09:52:58 UTC
++++ code/unix/unix_main.c
+@@ -55,9 +55,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+
+ #include "linux_local.h" // bk001204
+
+-// Structure containing functions exported from refresh DLL
+-refexport_t re;
+-
+ unsigned sys_frame_time;
+
+ uid_t saved_euid;
+@@ -707,12 +704,12 @@ void *Sys_LoadDll( const char *name, char *fqpath ,
{
void *libHandle;
void (*dllEntry)( int (*syscallptr)(int, ...) );
@@ -14,7 +24,7 @@
char *fn;
const char* err = NULL;
-@@ -721,18 +721,7 @@
+@@ -721,18 +718,7 @@ void *Sys_LoadDll( const char *name, char *fqpath ,
// bk001206 - let's have some paranoia
assert( name );
@@ -34,7 +44,7 @@
// bk001129 - was RTLD_LAZY
#define Q_RTLD RTLD_NOW
-@@ -742,10 +731,19 @@
+@@ -742,10 +728,19 @@ void *Sys_LoadDll( const char *name, char *fqpath ,
homepath = Cvar_VariableString( "fs_homepath" );
gamedir = Cvar_VariableString( "fs_game" );
diff --git a/games/q3cellshading/files/patch-code_botlib_be__interface.c b/games/q3cellshading/files/patch-code_botlib_be__interface.c
new file mode 100644
index 000000000000..e8e1a2ac0748
--- /dev/null
+++ b/games/q3cellshading/files/patch-code_botlib_be__interface.c
@@ -0,0 +1,13 @@
+--- code/botlib/be_interface.c.orig 2006-07-18 09:53:28 UTC
++++ code/botlib/be_interface.c
+@@ -140,8 +140,8 @@ int Export_BotLibSetup(void)
+ bot_developer = LibVarGetValue("bot_developer");
+ memset( &botlibglobals, 0, sizeof(botlibglobals) ); // bk001207 - init
+ //initialize byte swapping (litte endian etc.)
+-// Swap_Init();
+- Log_Open("botlib.log");
++ Swap_Init();
++ Log_Open("/dev/null");
+ //
+ botimport.Print(PRT_MESSAGE, "------- BotLib Initialization -------\n");
+ //
diff --git a/games/q3cellshading/files/patch-code_renderer_tr__init.c b/games/q3cellshading/files/patch-code_renderer_tr__init.c
new file mode 100644
index 000000000000..d31da369929b
--- /dev/null
+++ b/games/q3cellshading/files/patch-code_renderer_tr__init.c
@@ -0,0 +1,25 @@
+--- code/renderer/tr_init.c.orig 2006-07-20 10:08:00 UTC
++++ code/renderer/tr_init.c
+@@ -152,13 +152,6 @@ int max_polys;
+ cvar_t *r_maxpolyverts;
+ int max_polyverts;
+
+-void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t );
+-void ( APIENTRY * qglActiveTextureARB )( GLenum texture );
+-void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture );
+-
+-void ( APIENTRY * qglLockArraysEXT)( GLint, GLint);
+-void ( APIENTRY * qglUnlockArraysEXT) ( void );
+-
+ static void AssertCvarRange( cvar_t *cv, float minVal, float maxVal, qboolean shouldBeIntegral )
+ {
+ if ( shouldBeIntegral )
+@@ -1040,7 +1033,7 @@ void R_Init( void ) {
+ Com_Memset( &backEnd, 0, sizeof( backEnd ) );
+ Com_Memset( &tess, 0, sizeof( tess ) );
+
+-// Swap_Init();
++ Swap_Init();
+
+ if ( (int)tess.xyz & 15 ) {
+ Com_Printf( "WARNING: tess.xyz not 16 byte aligned\n" );