diff --git a/games/q3cellshading/Makefile b/games/q3cellshading/Makefile index 545358c1958f..80fb57dccc76 100644 --- a/games/q3cellshading/Makefile +++ b/games/q3cellshading/Makefile @@ -1,102 +1,91 @@ PORTNAME= q3cellshading PORTVERSION= 1.0 PORTREVISION= 4 CATEGORIES= games MASTER_SITES= SF DISTNAME= q3cel-${PORTVERSION}-src 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 USES= gmake zip MAKE_ENV= LIBDIR="${LIBDIR}" MAKE_JOBS_UNSAFE= yes BUILD_WRKSRC= ${WRKSRC}/code/unix WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}" VM_ARCHS= i386 powerpc OPTIONS_DEFINE= GAMELIBS OPTIMIZED_CFLAGS OPTIONS_DEFAULT= CLIENT DEDICATED OPTIMIZED_CFLAGS SMP_CLIENT OPTIONS_MULTI= FLAVOR OPTIONS_MULTI_FLAVOR= CLIENT DEDICATED SMP_CLIENT OPTIONS_SUB= yes CLIENT_DESC= Build client DEDICATED_DESC= Build dedicated server GAMELIBS_DESC= Force building game libraries SMP_CLIENT_DESC= Build SMP (threaded) client CLIENT_MAKE_ENV= CLIENT=YES CLIENT_VARS= Q3BIN+=quake3 DEDICATED_MAKE_ENV= DEDICATED=YES DEDICATED_VARS= Q3BIN+=q3ded OPTIMIZED_CFLAGS_MAKE_ENV= OPTIMIZED_CFLAGS=YES SMP_CLIENT_MAKE_ENV= SMP=YES SMP_CLIENT_VARS= Q3BIN+=quake3-smp LIBDIR= ${PREFIX}/lib/${PORTNAME} .include .if ${ARCH} == "i386" BUILD_DEPENDS+= nasm:devel/nasm .endif .for arch in ${ARCH} . if ${VM_ARCHS:M${arch}} != "" HAVE_VM_COMPILED= yes . endif .endfor .if !defined(HAVE_VM_COMPILED) MAKE_ENV+= DLL_ONLY=true .endif .if ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MSMP_CLIENT} USES+= gl xorg USE_GL= glu USE_XORG= xxf86dga xxf86vm .endif .if ${PORT_OPTIONS:MGAMELIBS} || !defined(HAVE_VM_COMPILED) 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 ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${bin} \ ${STAGEDIR}${PREFIX}/bin/${bin:C/(quake3|q3)/\1cel/} .endfor .if ${PORT_OPTIONS:MGAMELIBS} || !defined(HAVE_VM_COMPILED) .for dir in baseq3 missionpack @${MKDIR} ${STAGEDIR}${LIBDIR}/${dir} ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${dir}/*.so \ ${STAGEDIR}${LIBDIR}/${dir} .endfor .endif .include "${.CURDIR}/../quake3-data/Makefile.include" .include PATCH_ARGS+= -l 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,58 +1,68 @@ ---- ./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, ...) ); - char curpath[MAX_OSPATH]; char fname[MAX_OSPATH]; char *basepath; char *homepath; char *pwdpath; char *gamedir; + char *libdir = LIBDIR; 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 ); - getcwd(curpath, sizeof(curpath)); -#if defined __i386__ - snprintf (fname, sizeof(fname), "%si386.so", name); -#elif defined __powerpc__ //rcg010207 - PPC support. - snprintf (fname, sizeof(fname), "%sppc.so", name); -#elif defined __axp__ - snprintf (fname, sizeof(fname), "%saxp.so", name); -#elif defined __mips__ - snprintf (fname, sizeof(fname), "%smips.so", name); -#else -#error Unknown arch -#endif + snprintf (fname, sizeof(fname), "%s.so", name); // 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" ); - // pwdpath - fn = FS_BuildOSPath( pwdpath, gamedir, fname ); + // libdir + fn = FS_BuildOSPath( libdir, gamedir, fname ); Com_Printf( "Sys_LoadDll(%s)... \n", fn ); libHandle = dlopen( fn, Q_RTLD ); + + // pwdpath + if ( !libHandle ) + { + Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, dlerror() ); + fn = FS_BuildOSPath( pwdpath, gamedir, fname ); + Com_Printf( "Sys_LoadDll(%s)... \n", fn ); + libHandle = dlopen( fn, Q_RTLD ); + } if ( !libHandle ) { 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" );