Index: games/iourbanterror/Makefile =================================================================== --- games/iourbanterror/Makefile +++ games/iourbanterror/Makefile @@ -2,29 +2,36 @@ # $FreeBSD$ PORTNAME= iourbanterror -PORTVERSION= ${GAMEVERSION}.${DISTVERSION} -PORTREVISION= 2 +PORTVERSION= ${GAMEVERSION} +PORTREVISION= 0 PORTEPOCH= 1 CATEGORIES= games -DISTNAME= ioquake3-${DISTVERSION} +MASTER_SITES= MAINTAINER= kami@freebsd.org COMMENT= Quake 3 engine modified for Urban Terror (based on ioquake3) -RUN_DEPENDS= urbanterror-data>0:games/urbanterror-data - LICENSE?= GPLv2 +RUN_DEPENDS= urbanterror-data>0:games/urbanterror-data + MASTERDIR= ${.CURDIR}/../ioquake3 DESCR= ${.CURDIR}/../${PORTNAME}/pkg-descr +DISTINFO_FILE= ${.CURDIR}/../${PORTNAME}/distinfo PATCHDIR= ${.CURDIR}/../${PORTNAME}/files +URTDATADIR= ${.CURDIR}/../urbanterror-data IOQ3?= CLIENT -# The docs belong to ioquake3 -OPTIONS_EXCLUDE= DOCS -GAMEVERSION= 4.2.023 -Q3ENGINEVER= ${DISTVERSION}+${GAMEVERSION} +USE_GITHUB= yes +GH_ACCOUNT= Barbatos +GH_PROJECT= ioq3-for-UrbanTerror-4 +GH_TAGNAME= release-${GAMEVERSION} + +# Not supported +OPTIONS_EXCLUDE= DOCS MUMBLE + +Q3ENGINEVER= ${GAMEVERSION} Q3TOTALCONV= yes Q3DIR= ${PREFIX}/share/quake3 Q3ICON= ${PREFIX}/share/quake3/q3ut4/q3ut.ico @@ -34,19 +41,18 @@ BINSUFFIX= HOMEPATH= /.ioUrbanTerror -MAKE_ARGS+= BUILD_MISSIONPACK=0 \ - BUILD_STANDALONE=1 +.if ${IOQ3:MCLIENT} +USE_XORG+= x11 xxf86dga xxf86vm +# Build without CURL is broken +OPTIONS_SLAVE= CURL +.endif pre-patch: - @(cd ${WRKSRC} && \ - for pfile in ${MASTERDIR}/files/patch-*; do \ - ${PATCH} < $${pfile}; \ - done) - @${FIND} ${WRKSRC} -name \*.orig -delete @${REINPLACE_CMD} \ - -e 's/ioquake3/${Q3CLIENT}/g' \ - -e 's/ioq3ded/${Q3SERVER}/g' \ - -e 's/baseq3/${Q3BASE}/g' \ + -e 's/Quake3-UrT/${Q3CLIENT}/g' \ + -e 's/ioUrbanTerror-Ded/${Q3SERVER}/g' \ "${WRKSRC}/Makefile" +.include "${URTDATADIR}/Makefile.include" + .include "${MASTERDIR}/Makefile" Index: games/iourbanterror/distinfo =================================================================== --- /dev/null +++ games/iourbanterror/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1480523790 +SHA256 (Barbatos-ioq3-for-UrbanTerror-4-1.36-release-4.3.1_GH0.tar.gz) = 3068cacf9937bcebb1d14ea61c50682d81fc0b173890d6b02636aa95ef73575e +SIZE (Barbatos-ioq3-for-UrbanTerror-4-1.36-release-4.3.1_GH0.tar.gz) = 12023440 Index: games/iourbanterror/files/patch-Makefile =================================================================== --- /dev/null +++ games/iourbanterror/files/patch-Makefile @@ -0,0 +1,156 @@ +--- Makefile.orig 2016-11-30 21:17:29 UTC ++++ Makefile +@@ -516,75 +516,91 @@ else # ifeq mingw32 + + ifeq ($(PLATFORM),freebsd) + +- ifneq (,$(findstring alpha,$(shell uname -m))) +- ARCH=axp +- else #default to i386 +- ARCH=i386 +- endif #alpha test +- +- +- BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ +- -I/usr/X11R6/include +- +- DEBUG_CFLAGS=$(BASE_CFLAGS) -g +- +- ifeq ($(USE_OPENAL),1) +- BASE_CFLAGS += -DUSE_OPENAL=1 +- ifeq ($(USE_OPENAL_DLOPEN),1) +- BASE_CFLAGS += -DUSE_OPENAL_DLOPEN=1 +- endif +- endif ++ ifeq ($(shell which pkg-config > /dev/null; echo $$?),0) ++ CURL_CFLAGS=$(shell pkg-config --cflags libcurl) ++ CURL_LIBS=$(shell pkg-config --libs libcurl) ++ OPENAL_CFLAGS=$(shell pkg-config --cflags openal) ++ OPENAL_LIBS=$(shell pkg-config --libs openal) ++ SDL_CFLAGS=$(shell pkg-config --cflags sdl|sed 's/-Dmain=SDL_main//') ++ SDL_LIBS=$(shell pkg-config --libs sdl) ++ VORBIS_CFLAGS=$(shell pkg-config --silence-errors --cflags vorbis vorbisfile) ++ VORBIS_LIBS=$(shell pkg-config --silence-errors --libs vorbis vorbisfile) ++ endif + +- ifeq ($(USE_CODEC_VORBIS),1) +- BASE_CFLAGS += -DUSE_CODEC_VORBIS=1 +- endif ++ USE_SDL = 1 + +- ifeq ($(USE_SDL),1) +- BASE_CFLAGS += $(shell sdl-config --cflags) -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 +- endif ++ ifndef HOMEPATH ++ HOMEPATH = /.ioUrbanTerror ++ endif ++ ++ ifndef DEFAULT_LIBDIR ++ DEFAULT_LIBDIR = /usr/local/lib/iourbanterror ++ endif ++ ++ # flags ++ BASE_CFLAGS = $(shell env MACHINE_ARCH=$(ARCH) make -f /dev/null -VCFLAGS) \ ++ -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ ++ -DHOMEPATH=\\\"$(HOMEPATH)\\\" \ ++ -DDEFAULT_LIBDIR=\\\"$(DEFAULT_LIBDIR)\\\" \ ++ -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON ++ CLIENT_CFLAGS += $(SDL_CFLAGS) ++ HAVE_VM_COMPILED = true + +- ifeq ($(ARCH),axp) +- BASE_CFLAGS += -DNO_VM_COMPILED +- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \ +- -fomit-frame-pointer -fexpensive-optimizations +- else +- ifeq ($(ARCH),i386) +- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro \ +- -march=pentium -fomit-frame-pointer -pipe -ffast-math \ +- -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ +- -funroll-loops -fstrength-reduce +- HAVE_VM_COMPILED=true +- else +- BASE_CFLAGS += -DNO_VM_COMPILED +- endif +- endif ++ OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer ++ OPTIMIZE = $(OPTIMIZEVM) -ffast-math + + SHLIBEXT=so + SHLIBCFLAGS=-fPIC + SHLIBLDFLAGS=-shared $(LDFLAGS) + + THREAD_LDFLAGS=-lpthread +- # don't need -ldl (FreeBSD) + LDFLAGS=-lm + +- CLIENT_LDFLAGS = ++ CLIENT_LDFLAGS = $(SDL_LIBS) -lX11 -lXxf86dga -lXxf86vm + +- ifeq ($(USE_SDL),1) +- CLIENT_LDFLAGS += $(shell sdl-config --libs) +- else +- CLIENT_LDFLAGS += -L/usr/X11R6/$(LIB) -lGL -lX11 -lXext -lXxf86dga -lXxf86vm ++ # optional features/libraries ++ ifeq ($(USE_OPENAL),1) ++ CLIENT_LDFLAGS += $(THREAD_LIBS) $(OPENAL_LIBS) ++ CLIENT_CFLAGS += -DUSE_OPENAL ++ ifneq ($(USE_LOCAL_HEADERS),1) ++ CLIENT_CFLAGS += $(OPENAL_CFLAGS) ++ endif + endif + +- ifeq ($(USE_OPENAL),1) +- ifneq ($(USE_OPENAL_DLOPEN),1) +- CLIENT_LDFLAGS += $(THREAD_LDFLAGS) -lopenal ++ ifeq ($(USE_CURL),1) ++ CLIENT_LDFLAGS += $(CURL_LIBS) ++ CLIENT_CFLAGS += -DUSE_CURL ++ ifneq ($(USE_LOCAL_HEADERS),1) ++ CLIENT_CFLAGS += $(CURL_CFLAGS) + endif + endif + + ifeq ($(USE_CODEC_VORBIS),1) +- CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg ++ CLIENT_LDFLAGS += $(VORBIS_LIBS) ++ CLIENT_CFLAGS += -DUSE_CODEC_VORBIS ++ ifneq ($(USE_LOCAL_HEADERS),1) ++ CLIENT_CFLAGS += $(VORBIS_CFLAGS) ++ endif + endif + ++ ifeq ($(BUILD_CLIENT),1) ++ BASE_CFLAGS += $(CLIENT_CFLAGS) ++ endif ++ ++ # cross-compiling tweaks ++ ifeq ($(ARCH),i386) ++ ifeq ($(CROSS_COMPILING),1) ++ BASE_CFLAGS += -m32 ++ endif ++ endif ++ ifeq ($(ARCH),amd64) ++ ifeq ($(CROSS_COMPILING),1) ++ BASE_CFLAGS += -m64 ++ endif ++ endif ++ ++ RELEASE_CFLAGS = $(BASE_CFLAGS) ++ DEBUG_CFLAGS = $(BASE_CFLAGS) -g + + else # ifeq freebsd + +@@ -1391,10 +1407,10 @@ ifeq ($(HAVE_VM_COMPILED),true) + Q3DOBJ += $(B)/ded/vm_x86.o + endif + ifeq ($(ARCH),x86_64) +- Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o ++ Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/ded/vm_x86_64_assembler.o + endif + ifeq ($(ARCH),amd64) +- Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o ++ Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/ded/vm_x86_64_assembler.o + endif + ifeq ($(ARCH),ppc) + Q3DOBJ += $(B)/ded/vm_ppc.o Index: games/iourbanterror/files/patch-README =================================================================== --- /dev/null +++ games/iourbanterror/files/patch-README @@ -0,0 +1,11 @@ +--- README.orig 2016-10-05 18:47:05 UTC ++++ README +@@ -91,6 +91,8 @@ Makefile.local: + OPTIMIZE - use this for custom CFLAGS + V - set to show cc command line when building + DEFAULT_BASEDIR - extra path to search for baseq3 and such ++ DEFAULT_LIBDIR - extra path to search for libraries (FreeBSD only) ++ HOMEPATH - alternative home directory (FreeBSD only) + BUILD_SERVER - build the 'ioq3ded' server binary + BUILD_CLIENT - build the 'ioquake3' client binary + BUILD_CLIENT_SMP - build the 'ioquake3-smp' client binary Index: games/iourbanterror/files/patch-code-qcommon-q_shared.h =================================================================== --- games/iourbanterror/files/patch-code-qcommon-q_shared.h +++ /dev/null @@ -1,20 +0,0 @@ ---- code/qcommon/q_shared.h.orig 2008-11-03 17:03:54 UTC -+++ code/qcommon/q_shared.h -@@ -27,11 +27,12 @@ Foundation, Inc., 51 Franklin St, Fifth - // A user mod should never modify this file - - #ifdef STANDALONE -- #define PRODUCT_NAME "iofoo3" -- #define BASEGAME "foobar" -- #define CLIENT_WINDOW_TITLE "changeme" -- #define CLIENT_WINDOW_MIN_TITLE "changeme2" -- #define GAMENAME_FOR_MASTER "iofoo3" // must NOT contain whitespaces -+ #define PRODUCT_NAME "ioq3+UT" -+ #define BASEGAME "q3ut4" -+ #define CLIENT_WINDOW_TITLE "ioUrbanTerror" -+ #define CLIENT_WINDOW_MIN_TITLE "ioUT" -+ #define GAMENAME_FOR_MASTER "Quake3Arena" // must NOT contain whitespace -+ #define LEGACY_PROTOCOL - #else - #define PRODUCT_NAME "ioq3" - #define BASEGAME "baseq3" Index: games/iourbanterror/files/patch-code-qcommon-qcommon.h =================================================================== --- games/iourbanterror/files/patch-code-qcommon-qcommon.h +++ /dev/null @@ -1,11 +0,0 @@ ---- code/qcommon/qcommon.h.orig 2016-03-31 19:41:05 UTC -+++ code/qcommon/qcommon.h -@@ -254,7 +254,7 @@ extern int demo_protocols[]; - #endif - #endif - --#define PORT_MASTER 27950 -+#define PORT_MASTER 27900 - #define PORT_UPDATE 27951 - #define PORT_SERVER 27960 - #define NUM_SERVER_PORTS 4 // broadcast scan this many ports after Index: games/iourbanterror/files/patch-code-qcommon-vm_interpreted.c =================================================================== --- games/iourbanterror/files/patch-code-qcommon-vm_interpreted.c +++ /dev/null @@ -1,16 +0,0 @@ ---- code/qcommon/vm_interpreted.c.orig 2016-03-31 19:41:05 UTC -+++ code/qcommon/vm_interpreted.c -@@ -458,11 +458,11 @@ nextInstruction2: - goto nextInstruction2; - - case OP_STORE4: -- *(int *)&image[ r1&(dataMask & ~3) ] = r0; -+ *(int *)&image[ r1&(dataMask) ] = r0; - opStack -= 2; - goto nextInstruction; - case OP_STORE2: -- *(short *)&image[ r1&(dataMask & ~1) ] = r0; -+ *(short *)&image[ r1&(dataMask) ] = r0; - opStack -= 2; - goto nextInstruction; - case OP_STORE1: Index: games/iourbanterror/files/patch-code-qcommon-vm_x86.c =================================================================== --- games/iourbanterror/files/patch-code-qcommon-vm_x86.c +++ /dev/null @@ -1,20 +0,0 @@ ---- code/qcommon/vm_x86.c.orig 2016-03-31 19:41:05 UTC -+++ code/qcommon/vm_x86.c -@@ -512,7 +512,7 @@ void VM_Compile( vm_t *vm, vmHeader_t *h - break; - } - if (code[pc+4] == OP_STORE4) { -- opt = EmitMovEBXEDI(vm, (vm->dataMask & ~3)); -+ opt = EmitMovEBXEDI(vm, (vm->dataMask)); - EmitString( "B8" ); // mov eax, 0x12345678 - Emit4( Constant4() ); - // if (!opt) { -@@ -527,7 +527,7 @@ void VM_Compile( vm_t *vm, vmHeader_t *h - break; - } - if (code[pc+4] == OP_STORE2) { -- opt = EmitMovEBXEDI(vm, (vm->dataMask & ~1)); -+ opt = EmitMovEBXEDI(vm, (vm->dataMask)); - EmitString( "B8" ); // mov eax, 0x12345678 - Emit4( Constant4() ); - // if (!opt) { Index: games/iourbanterror/files/patch-code_client_snd__openal.c =================================================================== --- /dev/null +++ games/iourbanterror/files/patch-code_client_snd__openal.c @@ -0,0 +1,11 @@ +--- code/client/snd_openal.c.orig 2016-10-05 18:47:05 UTC ++++ code/client/snd_openal.c +@@ -1676,7 +1676,7 @@ static ALCcontext *alContext; + #elif defined(MACOS_X) + #define ALDRIVER_DEFAULT "/System/Library/Frameworks/OpenAL.framework/OpenAL" + #else +-#define ALDRIVER_DEFAULT "libopenal.so.0" ++#define ALDRIVER_DEFAULT "libopenal.so" + #endif + + /* Index: games/iourbanterror/files/patch-code_qcommon_files.c =================================================================== --- /dev/null +++ games/iourbanterror/files/patch-code_qcommon_files.c @@ -0,0 +1,18 @@ +--- code/qcommon/files.c.orig 2016-10-05 18:47:05 UTC ++++ code/qcommon/files.c +@@ -247,6 +247,7 @@ static cvar_t *fs_apppath; + + + static cvar_t *fs_basepath; ++static cvar_t *fs_libpath; + static cvar_t *fs_basegame; + static cvar_t *fs_gamedirvar; + static searchpath_t *fs_searchpaths; +@@ -2746,6 +2747,7 @@ static void FS_Startup( const char *game + fs_debug = Cvar_Get( "fs_debug", "0", 0 ); + fs_basepath = Cvar_Get ("fs_basepath", Sys_DefaultInstallPath(), CVAR_INIT ); + fs_basegame = Cvar_Get ("fs_basegame", "", CVAR_INIT ); ++ fs_libpath = Cvar_Get ("fs_libpath", Sys_DefaultLibPath(), CVAR_INIT ); + + fs_use_defaultHomePath = Cvar_Get ("use_defaultHomePath", "1", CVAR_INIT|CVAR_SYSTEMINFO ); + if ( fs_use_defaultHomePath->integer ) { Index: games/iourbanterror/files/patch-code_qcommon_qcommon.h =================================================================== --- /dev/null +++ games/iourbanterror/files/patch-code_qcommon_qcommon.h @@ -0,0 +1,13 @@ +--- code/qcommon/qcommon.h.orig 2016-10-05 18:47:05 UTC ++++ code/qcommon/qcommon.h +@@ -1069,6 +1069,10 @@ void Sys_SetDefaultCDPath(const char *pa + char *Sys_DefaultCDPath(void); + void Sys_SetDefaultInstallPath(const char *path); + char *Sys_DefaultInstallPath(void); ++ ++void Sys_SetDefaultLibPath(const char *path); ++char *Sys_DefaultLibPath(void); ++ + void Sys_SetDefaultHomePath(const char *path); + char *Sys_DefaultHomePath(void); + Index: games/iourbanterror/files/patch-code_qcommon_vm__interpreted.c =================================================================== --- /dev/null +++ games/iourbanterror/files/patch-code_qcommon_vm__interpreted.c @@ -0,0 +1,34 @@ +--- code/qcommon/vm_interpreted.c.orig 2016-10-05 18:47:05 UTC ++++ code/qcommon/vm_interpreted.c +@@ -534,18 +534,20 @@ nextInstruction2: + + //VM_LogSyscalls( (int *)&image[ programStack + 4 ] ); + { +- intptr_t* argptr = (intptr_t *)&image[ programStack + 4 ]; +- #if __WORDSIZE == 64 +- // the vm has ints on the stack, we expect +- // longs so we have to convert it +- intptr_t argarr[16]; +- int i; +- for (i = 0; i < 16; ++i) { +- argarr[i] = *(int*)&image[ programStack + 4 + 4*i ]; ++ // the vm has ints on the stack, we expect ++ // pointers so we might have to convert it ++ if (sizeof(intptr_t) != sizeof(int)) { ++ intptr_t argarr[16]; ++ int *imagePtr = (int *)&image[programStack]; ++ int i; ++ for (i = 0; i < 16; ++i) { ++ argarr[i] = *(++imagePtr); ++ } ++ r = vm->systemCall( argarr ); ++ } else { ++ intptr_t* argptr = (intptr_t *)&image[ programStack + 4 ]; ++ r = vm->systemCall( argptr ); + } +- argptr = argarr; +- #endif +- r = vm->systemCall( argptr ); + } + + #ifdef DEBUG_VM Index: games/iourbanterror/files/patch-code_qcommon_vm__x86.c =================================================================== --- /dev/null +++ games/iourbanterror/files/patch-code_qcommon_vm__x86.c @@ -0,0 +1,23 @@ +--- code/qcommon/vm_x86.c.orig 2016-10-05 18:47:05 UTC ++++ code/qcommon/vm_x86.c +@@ -36,7 +36,7 @@ Foundation, Inc., 51 Franklin St, Fifth + + /* need this on NX enabled systems (i386 with PAE kernel or + * noexec32=on x86_64) */ +-#ifdef __unix__ ++#if defined(__unix__) || defined(__linux__) || defined(__FreeBSD__) + #define VM_X86_MMAP + #endif + +@@ -93,7 +93,11 @@ static int asmCallPtr = (int)doAsmCall; + #endif + + ++#ifdef __clang__ ++ int callMask = 0; ++#else + static int callMask = 0; ++#endif + + static int instruction, pass; + static int lastConst = 0; Index: games/iourbanterror/files/patch-code_sys_sys__main.c =================================================================== --- /dev/null +++ games/iourbanterror/files/patch-code_sys_sys__main.c @@ -0,0 +1,94 @@ +--- code/sys/sys_main.c.orig 2016-10-05 18:47:05 UTC ++++ code/sys/sys_main.c +@@ -49,6 +49,7 @@ Foundation, Inc., 51 Franklin St, Fifth + + static char binaryPath[ MAX_OSPATH ] = { 0 }; + static char installPath[ MAX_OSPATH ] = { 0 }; ++static char libPath[ MAX_OSPATH ] = { 0 }; + + /* + ================= +@@ -95,6 +96,30 @@ char *Sys_DefaultInstallPath(void) + + /* + ================= ++Sys_SetDefaultLibPath ++================= ++*/ ++void Sys_SetDefaultLibPath(const char *path) ++{ ++ Q_strncpyz(libPath, path, sizeof(libPath)); ++} ++ ++/* ++================= ++Sys_DefaultLibPath ++================= ++*/ ++char *Sys_DefaultLibPath(void) ++{ ++ if (*libPath) ++ return libPath; ++ else ++ return Sys_Cwd(); ++} ++ ++ ++/* ++================= + Sys_DefaultAppPath + ================= + */ +@@ -385,6 +410,7 @@ Used to load a development dll instead o + #1 look down current path + #2 look in fs_homepath + #3 look in fs_basepath ++#4 look in fs_libpath + ================= + */ + void *Sys_LoadDll( const char *name, char *fqpath , +@@ -395,6 +421,7 @@ void *Sys_LoadDll( const char *name, cha + void (*dllEntry)( intptr_t (*syscallptr)(intptr_t, ...) ); + char fname[MAX_OSPATH]; + char *basepath; ++ char *libpath; + char *homepath; + char *pwdpath; + char *gamedir; +@@ -406,6 +433,7 @@ void *Sys_LoadDll( const char *name, cha + // TODO: use fs_searchpaths from files.c + pwdpath = Sys_Cwd(); + basepath = Cvar_VariableString( "fs_basepath" ); ++ libpath = Cvar_VariableString( "fs_libpath" ); + homepath = Cvar_VariableString( "fs_homepath" ); + gamedir = Cvar_VariableString( "fs_game" ); + +@@ -414,6 +442,9 @@ void *Sys_LoadDll( const char *name, cha + if(!libHandle && homepath) + libHandle = Sys_TryLibraryLoad(homepath, gamedir, fname, fqpath); + ++ if(!libHandle && libpath) ++ libHandle = Sys_TryLibraryLoad(libpath, gamedir, fname, fqpath); ++ + if(!libHandle && basepath) + libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname, fqpath); + +@@ -506,6 +537,10 @@ void Sys_ParseArgs( int argc, char **arg + # endif + #endif + ++#ifndef DEFAULT_LIBDIR ++# define DEFAULT_LIBDIR DEFAULT_BASEDIR ++#endif ++ + /* + ================= + Sys_SigHandler +@@ -572,6 +607,7 @@ int main( int argc, char **argv ) + Sys_ParseArgs( argc, argv ); + Sys_SetBinaryPath( Sys_Dirname( argv[ 0 ] ) ); + Sys_SetDefaultInstallPath( DEFAULT_BASEDIR ); ++ Sys_SetDefaultLibPath( DEFAULT_LIBDIR ); + + // Concatenate the command line for passing to Com_Init + for( i = 1; i < argc; i++ ) Index: games/iourbanterror/files/patch-code_sys_sys__unix.c =================================================================== --- /dev/null +++ games/iourbanterror/files/patch-code_sys_sys__unix.c @@ -0,0 +1,13 @@ +--- code/sys/sys_unix.c.orig 2016-10-05 18:47:05 UTC ++++ code/sys/sys_unix.c +@@ -55,7 +55,9 @@ char *Sys_DefaultHomePath(void) + if( ( p = getenv( "HOME" ) ) != NULL ) + { + Q_strncpyz( homePath, p, sizeof( homePath ) ); +-#ifdef MACOS_X ++#ifdef HOMEPATH ++ Q_strcat( homePath, sizeof( homePath ), HOMEPATH ); ++#elif defined MACOS_X + Q_strcat( homePath, sizeof( homePath ), "/Library/Application Support/Quake3" ); + #else + Q_strcat( homePath, sizeof( homePath ), "/.q3a" ); Index: games/iourbanterror/files/patch-code_unix_unix__main.c =================================================================== --- /dev/null +++ games/iourbanterror/files/patch-code_unix_unix__main.c @@ -0,0 +1,44 @@ +--- code/unix/unix_main.c.orig 2016-10-05 18:47:05 UTC ++++ code/unix/unix_main.c +@@ -738,6 +738,7 @@ changed the load procedure to match VFS + #1 look down current path + #2 look in fs_homepath + #3 look in fs_basepath ++#4 look in fs_libpath + ================= + */ + +@@ -780,6 +781,7 @@ void *Sys_LoadDll( const char *name, cha + char curpath[MAX_OSPATH]; + char fname[MAX_OSPATH]; + char *basepath; ++ char *libpath; + char *homepath; + char *pwdpath; + char *cdpath; +@@ -795,6 +797,7 @@ void *Sys_LoadDll( const char *name, cha + // TODO: use fs_searchpaths from files.c + pwdpath = Sys_Cwd(); + basepath = Cvar_VariableString( "fs_basepath" ); ++ libpath = Cvar_VariableString( "fs_libpath" ); + homepath = Cvar_VariableString( "fs_homepath" ); + cdpath = Cvar_VariableString( "fs_cdpath" ); + gamedir = Cvar_VariableString( "fs_game" ); +@@ -804,6 +807,9 @@ void *Sys_LoadDll( const char *name, cha + if(!libHandle && homepath) + libHandle = try_dlopen(homepath, gamedir, fname, fqpath); + ++ if(!libHandle && libpath) ++ libHandle = try_dlopen(libpath, gamedir, fname, fqpath); ++ + if(!libHandle && basepath) + libHandle = try_dlopen(basepath, gamedir, fname, fqpath); + +@@ -1609,6 +1615,7 @@ int main ( int argc, char* argv[] ) + Sys_SetDefaultCDPath(dirname(cdpath)); + + Sys_SetDefaultInstallPath(DEFAULT_BASEDIR); ++ Sys_SetDefaultLibPath(DEFAULT_LIBDIR); + + // merge the command line, this is kinda silly + for (len = 1, i = 1; i < argc; i++) Index: games/iourbanterror/files/patch-code_unix_unix__shared.c =================================================================== --- /dev/null +++ games/iourbanterror/files/patch-code_unix_unix__shared.c @@ -0,0 +1,41 @@ +--- code/unix/unix_shared.c.orig 2016-10-05 18:47:05 UTC ++++ code/unix/unix_shared.c +@@ -40,6 +40,8 @@ static char cdPath[MAX_OSPATH]; + // Used to determine local installation path + static char installPath[MAX_OSPATH]; + ++static char libPath[ MAX_OSPATH ] = { 0 }; ++ + // Used to determine where to store user-specific files + static char homePath[MAX_OSPATH]; + +@@ -390,6 +392,29 @@ char *Sys_DefaultInstallPath(void) + return Sys_Cwd(); + } + ++/* ++================= ++Sys_SetDefaultLibPath ++================= ++*/ ++void Sys_SetDefaultLibPath(const char *path) ++{ ++ Q_strncpyz(libPath, path, sizeof(libPath)); ++} ++ ++/* ++================= ++Sys_DefaultLibPath ++================= ++*/ ++char *Sys_DefaultLibPath(void) ++{ ++ if (*libPath) ++ return libPath; ++ else ++ return Sys_Cwd(); ++} ++ + void Sys_SetDefaultHomePath(const char *path) + { + Q_strncpyz(homePath, path, sizeof(homePath)); Index: games/urbanterror-data/Makefile =================================================================== --- games/urbanterror-data/Makefile +++ games/urbanterror-data/Makefile @@ -2,19 +2,27 @@ # $FreeBSD$ PORTNAME= data -PORTVERSION= 4.2.023 +PORTVERSION= ${GAMEVERSION} CATEGORIES= games -MASTER_SITES= http://cdn.urbanterror.info/urt/42/zips/ \ - http://www.f1m.fr/uploads/urt/ \ - http://mirror.urtstats.net/urbanterror/ +MASTER_SITES= http://cdn.urbanterror.info/urt/${URT_VER}/releases/zips/ \ + https://up.barbatos.fr/urt/ \ + http://www.happyurtday.com/releases/4x/ \ + http://files.cucurb.net/UrbanTerror/ PKGNAMEPREFIX= urbanterror- -DISTNAME= UrbanTerror${URT_VER}_full${URT_REV} +DISTNAME= UrbanTerror${URT_VER}${URT_REV}_full EXTRACT_SUFX= .zip EXTRACT_ONLY= MAINTAINER= kami@freebsd.org COMMENT= Standalone realism based mod originally for Quake III Arena +LICENSE= EULA +LICENSE_NAME= Urban Terror Terms of Service +LICENSE_TEXT= Personal, non-commercial uses only, re-distribution \ + is not permitted: \ + http://www.urbanterror.info/support/36-terms-of-service/ +LICENSE_PERMS= none + NO_BUILD= yes NO_CDROM= The mod files may not be sold or distributed on physical media unless with permission from id Software. @@ -35,9 +43,10 @@ OPTIONS_SUB= yes UTDOCS= readme${URT_VER}.txt \ - How_To_Install.txt \ QIIIA_Game_Source_License.doc +.include "Makefile.include" + .include do-install: Index: games/urbanterror-data/Makefile.include =================================================================== --- /dev/null +++ games/urbanterror-data/Makefile.include @@ -0,0 +1 @@ +GAMEVERSION= 4.3.1 Index: games/urbanterror-data/distinfo =================================================================== --- games/urbanterror-data/distinfo +++ games/urbanterror-data/distinfo @@ -1,2 +1,3 @@ -SHA256 (UrbanTerror42_full023.zip) = e287e2a17432b81551f5c16e431d752484ce9be10508e756542f653757a29090 -SIZE (UrbanTerror42_full023.zip) = 1924172827 +TIMESTAMP = 1479836507 +SHA256 (UrbanTerror431_full.zip) = 9c19556ad462e45bfd97e6c8cc1fa04206719c13f7480e6fef4eb8fcc4f2d6b5 +SIZE (UrbanTerror431_full.zip) = 1462419175 Index: games/urbanterror-data/pkg-plist =================================================================== --- games/urbanterror-data/pkg-plist +++ games/urbanterror-data/pkg-plist @@ -1,39 +1,28 @@ %%DATADIR%%/q3ut4/autoexec_example.cfg %%DATADIR%%/q3ut4/mapcycle_example.txt %%DATADIR%%/q3ut4/server_example.cfg -%%DATADIR%%/q3ut4/ut4_commune.pk3 %%DATADIR%%/q3ut4/ut4_jumpents.pk3 -%%DATADIR%%/q3ut4/zUrT42_0001.pk3 -%%DATADIR%%/q3ut4/zUrT42_0002.pk3 -%%DATADIR%%/q3ut4/zUrT42_0003.pk3 -%%DATADIR%%/q3ut4/zUrT42_0004.pk3 -%%DATADIR%%/q3ut4/zUrT42_0005.pk3 -%%DATADIR%%/q3ut4/zUrT42_0006.pk3 -%%DATADIR%%/q3ut4/zUrT42_0007.pk3 -%%DATADIR%%/q3ut4/zUrT42_0008.pk3 -%%DATADIR%%/q3ut4/zUrT42_0009.pk3 -%%DATADIR%%/q3ut4/zUrT42_0010.pk3 -%%DATADIR%%/q3ut4/zUrT42_0011.pk3 -%%DATADIR%%/q3ut4/zUrT42_0012.pk3 -%%DATADIR%%/q3ut4/zUrT42_0013.pk3 -%%DATADIR%%/q3ut4/zUrT42_0014.pk3 -%%DATADIR%%/q3ut4/zUrT42_0015.pk3 -%%DATADIR%%/q3ut4/zUrT42_0016.pk3 -%%DATADIR%%/q3ut4/zUrT42_0017.pk3 -%%DATADIR%%/q3ut4/zUrT42_0018.pk3 -%%DATADIR%%/q3ut4/zUrT42_0019.pk3 -%%DATADIR%%/q3ut4/zUrT42_0020.pk3 -%%DATADIR%%/q3ut4/zUrT42_0021.pk3 -%%DATADIR%%/q3ut4/zUrT42_0022.pk3 -%%DATADIR%%/q3ut4/zUrT42_0023.pk3 -%%DATADIR%%/q3ut4/zUrT42_0024.pk3 -%%DATADIR%%/q3ut4/zUrT42_0025.pk3 -%%DATADIR%%/q3ut4/zUrT42_0026.pk3 -%%DATADIR%%/q3ut4/zUrT42_0027.pk3 -%%DATADIR%%/q3ut4/zUrT42_0028.pk3 -%%DATADIR%%/q3ut4/zUrT42_0029.pk3 -%%DATADIR%%/q3ut4/zUrT42_0030.pk3 -%%DATADIR%%/q3ut4/zUrT42_qvm.pk3 -%%DOCS%%%%DOCSDIR%%/How_To_Install.txt +%%DATADIR%%/q3ut4/zUrT%%VER%%_001.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_002.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_003.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_004.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_005.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_006.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_007.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_008.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_009.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_010.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_011.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_012.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_013.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_014.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_015.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_016.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_017.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_018.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_019.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_020.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_021.pk3 +%%DATADIR%%/q3ut4/zUrT%%VER%%_qvm.pk3 %%DOCS%%%%DOCSDIR%%/QIIIA_Game_Source_License.doc -%%DOCS%%%%DOCSDIR%%/readme42.txt +%%DOCS%%%%DOCSDIR%%/readme%%VER%%.txt