debian/0000755000000000000000000000000012223232362007163 5ustar debian/rules0000755000000000000000000000352112205672130010245 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DH_OPTIONS export LDFLAGS=-Wl,--as-needed export DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk %: dh $@ override_dh_auto_build: # Build the main game binaries make -C engine/hexen2 h2 make -s -C engine/hexen2 clean make -C engine/hexen2 glh2 make -s -C engine/hexen2 clean # Build the dedicated server make -C engine/hexen2/server # HexenWorld binaries make -C engine/hexenworld/server make -C engine/hexenworld/client hw make -s -C engine/hexenworld/client clean make -C engine/hexenworld/client glhw # HexenWorld master server make -C hw_utils/hwmaster # Build h2patch make -C h2patch # Launcher binaries make -C launcher # Build the hcode compiler make -C utils/hcc # building the gamecode utils/hcc/hcc -q -src gamecode/hc/h2 utils/hcc/hcc -q -src gamecode/hc/h2 -name progs2.src utils/hcc/hcc -q -src gamecode/hc/hw -oi -on utils/hcc/hcc -q -src gamecode/hc/portals -oi -on override_dh_installdocs: dh_installdocs --exclude=SrcNotes.txt --exclude=CHANGES override_dh_auto_install: override_dh_auto_clean: make -s -C engine/hexen2 distclean make -C engine/hexen2 clean make -C engine/hexen2/server clean rm -f engine/hexen2/server/h2ded make -s -C engine/hexenworld/client distclean make -s -C engine/hexenworld/server distclean make -s -C launcher distclean rm -f gamecode/hc/h2/progs.dat rm -f gamecode/hc/h2/files.dat rm -f gamecode/hc/h2/progdefs.h rm -f gamecode/hc/hw/files.dat rm -f gamecode/hc/hw/progdefs.h rm -f gamecode/hc/portals/files.dat rm -f gamecode/hc/portals/progdefs.h rm -f gamecode/hc/h2/progs2.dat rm -f gamecode/hc/hw/hwprogs.dat rm -f gamecode/hc/portals/progs.dat make -s -C h2patch distclean make -s -C utils/hcc distclean make -s -C hw_utils/hwmaster distclean dh_auto_clean debian/h2patch.60000644000000000000000000000116012212473072010604 0ustar .TH h2patch 6 games .SH NAME uhexen2 \- Hexen II: Hammer of Thyrion .SH SYNOPSIS .B h2path .SH DESCRIPTION .B h2patch h2patch allow to patch Hexen II pak files. .SH OPTIONS .TP Options: .RS .TP .B \fB-h\fP | \fB-help\fP show help .TP .B \fB-version\fP show version .TP .B \fB-verbose\fP be verbose .SH SEE ALSO .TP uhexen2(6), hcc(6), h2patch(6), h2launcher(6) .TP /usr/share/doc/uhexen2/README.gz .SH AUTHORS See the copyright file on \fI/usr/share/doc/uhexen2/copyright\fR This manual page was originally written by gustavo panizzo for the Debian project it can be used elsewhere. debian/patches/0000755000000000000000000000000012220451237010613 5ustar debian/patches/fix-ftbfs-hurd0000644000000000000000000000072112211363573013373 0ustar Description: simple patches for GNU/Hurd one of the patches adds GNU macro to a headers file the other patch defines PATH_MAX Origin: vendor Forwarded: no Last-Update: <2013-08-23> --- a/launcher/launcher_defs.h +++ b/launcher/launcher_defs.h @@ -114,3 +114,8 @@ extern const char *snd_rates[MAX_RATES]; #endif /* LAUNCHER_COMMONDEFS_H */ +// Define PATH_MAX for systems that don't have it, like Hurd +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + debian/patches/series0000644000000000000000000000010212220451137012020 0ustar syntax_checking.patch debian-paths fix-ftbfs-hurd hardening.patch debian/patches/syntax_checking.patch0000644000000000000000000002530512205672130015022 0ustar Description: better command line handling This is a hack to unix-ify the Hammer of Thyrion (uHexen2) command line. Its purpose is to catch mis-spelt options such as "-fullscrren" and also to print a comprehensive help message when desired. It has two parts: 1. option_t data structure, which attempts to bring all the command line args parsed by COM_CheckParm() into one place for validation upon program startup. 2. C code which parses the command line, attempting to identify faulty options, but also allowing for "+map e1m1" type args. Author: stevenaaus@yahoo.com Origin: upstream =================================================================== --- a/engine/hexen2/sys_unix.c +++ b/engine/hexen2/sys_unix.c @@ -595,65 +595,268 @@ static void PrintVersion (void) } #include "snd_sys.h" -static const char *help_strings[] = { - " [-v | --version] Display version information", + +/* Summarise command line options and inspect for correctness. + * No attempt is made to validate arg type is integer or whatever. + * Note: dos, windows options are not handled here. + * S.A. 22 Jan 2009 */ +typedef struct +{ + const char *option; + const char *alias1; + const char *alias2; + int num_args; /* only 0, 1 (and -1:one optional arg) are currently implemented */ + const char *descrip; /* if option = "" , descrip is an help section title */ +} option_t; + +static option_t options[] = +{ +/* GENERAL */ + {"","","",0,"General"}, #ifndef DEMOBUILD # if defined(H2MP) - " [-noportals] Disable the mission pack support", + {"-noportals", "", "", 0, "Disable the mission pack support"}, # else - " [-portals | -h2mp ] Run the Portal of Praevus mission pack", + {"-portals", "-h2mp", "", 0, "Play Portal of Praevus mission pack"}, # endif #endif + {"-game", "", "", 1, "Play this mod"}, + {"-basedir", "", "", 1, "Use this directory as base"}, + {"-nomouse", "", "", 0, "Disable mouse"}, + {"-heapsize", "", "", 1, "Kilobytes memory for heap"}, + {"-v", "--version", "", 0, "Display version information"}, + {"-h", "--help", "-?", 0, "Show help"}, +/* VIDEO */ + {"","","",0,"Video"}, #ifndef SVGAQUAKE - " [-w | -window ] Run the game windowed", - " [-f | -fullscreen] Run the game fullscreen", + {"-f", "-fullscreen", "", 0, "Run fullscreen"}, + {"-w", "-window", "", 0, "Run as a window"}, #endif - " [-width X [-height Y]] Select screen size", + {"-width", "", "", 1, "Set screen width"}, + {"-height", "", "", 1, "Set screen height (requires -width)"}, + {"-force", "", "", 0, "Skip some video sanity checks"}, + {"-conwidth", "", "", 1, "Set console width (in pixels)"}, #ifdef GLQUAKE - " [-bpp] Depth for GL fullscreen mode", - " [-vsync] Enable sync with monitor refresh", - " [-g | -gllibrary] Select 3D rendering library", - " [-fsaa N] Enable N sample antialiasing", - " [-paltex] Enable 8-bit textures", - " [-nomtex] Disable multitexture detection/usage", + {"-bpp", "", "", 1, "Depth for GL fullscreen mode"}, + {"-sync", "-vsync", "", 0, "Enable sync with monitor refresh"}, + {"-g", "-gllibrary", "", 1, "Select 3D rendering library"}, + {"-fsaa", "", "", 1, "Enable N sample antialiasing"}, + {"-paltex", "", "", 0, "Enable 8-bit textures"}, + {"-nomtex", "", "", 0, "Disable multitexture detection/usage"}, #endif +/* SOUND */ + {"","","",0,"Sound"}, + #if !defined(_NO_SOUND) #if SOUND_NUMDRIVERS - " [-s | -nosound] Run the game without sound", + {"-s", "-nosound", "", 0, "Disable sound"}, #endif #if (SOUND_NUMDRIVERS > 1) #if HAVE_OSS_SOUND - " [-sndoss] Use OSS sound", + {"-sndoss", "", "", 0, "Use OSS sound"}, #endif #if HAVE_ALSA_SOUND - " [-sndalsa] Use ALSA sound (alsa > 1.0.1)", + {"-sndalsa", "", "", 0, "Use ALSA sound (alsa > 1.0.1)"}, #endif #if HAVE_SUN_SOUND - " [-sndsun | -sndbsd] Use SUN / BSD sound", + {"-sndsun", "-sndbsd", "", 0, "Use SUN/BSD sound"}, #endif #if HAVE_SDL_SOUND - " [-sndsdl] Use SDL sound", + {"-sndsdl", "", "", 0, "Use SDL sound"}, #endif #endif /* SOUND_NUMDRIVERS */ #endif /* _NO_SOUND */ - " [-nomouse] Disable mouse usage", - " [-listen N] Enable multiplayer with max N players", - " [-heapsize Bytes] Heapsize (memory to allocate)", - NULL + {"-sndspeed", "", "", 1, "Sound sampling rate"}, + {"-sndbits", "", "", 1, "Sound sampling bits"}, + {"-alsadev", "", "", 1, "Alsa device name"}, + {"-ossdev", "", "", 1, "OSS device name"}, + {"-sndmono", "", "", 0, "Set mono playback"}, +/* MUSIC */ + {"","","",0,"Music"}, + + {"-nomidi", "", "", 0, "Disable midi device"}, + {"-nocdaudio", "", "", 0, "Disable CD playback"}, + {"-cddev", "", "", 1, "Use this CD device"}, +/* NETWORK */ + {"","","",0,"Network"}, + + {"-listen", "", "", -1, "Enable multiplayer with max N players"}, + {"-dedicated", "", "", -1, "Enable dedicated server with max N players"}, + {"-nolan", "", "", 0, "Disable local area network"}, + {"-noudp", "", "", 0, "Disable udp"}, + {"-noifscan", "", "", 0, "Disable net interface scan"}, + {"-ip", "-bindip", "", 1, "Use this IP address"}, + {"-localip", "", "", 1, "Use this local IP address"}, + {"-port", "", "", 1, "Use this port"}, + {"-udpport", "", "", 1, "Use this udp port"}, + {"-ipxport", "", "", 1, "Use this ipx port"}, +/* DEBUG */ + {"","","",0,"Debugging"}, + + {"-condebug", "-debuglog", "", 0, "Do extra debug logging"}, + {"-developer", "", "", 0, "Set developer cvar"}, + {"-devlog", "", "", 0, "Log some dev events when !developer"}, + {"-safemode", "", "", 0, "Disable some hardware features"}, +/* extra OPENGL */ +#ifdef GLQUAKE + {"","","",0,"Extra OpenGL"}, + + {"-lm_1", "", "", 0, "use GL_LUMINANCE light format"}, + {"-lm_4", "", "", 0, "use GL_RGBA light format"}, +# ifdef USE_3DFXGAMMA + {"-3dfxgamma", "", "", 0, "enable 3dfx gamma support"}, +# endif +#endif +/* SVGA */ +#ifdef SVGAQUAKE + {"","","",0,"SVGA"}, + {"-mode", "", "", 1, "SVGA mode"}, + {"-mdev", "", "", 1, "Use this mouse device"}, + {"-mrate", "", "", 1, "Mouse sampling rate"}, + {"-nokbd", "", "", 0, "Disable keyboard"}, +#endif +/* MISCELLANEOUS */ + {"","","",0,"Miscellaneous"}, + {"-forcemem", "", "", 0, "Force memory option"}, + {"-surfcachesize","", "", 1, "Surface cache size"}, + {"-protocol", "", "", 1, "Request different game version"}, + {"-particles", "", "", 1, "Set number of particles"}, + {"-fullsbar", "", "", 0, "Enable full status bar (unused)"}, + {"-nojoy", "", "", 0, "Disable joystick"}, + {"-zone", "", "", 1, "Zone memory size"}, +/* end used to terminate options */ + {"end","","",0,""} }; -static void PrintHelp (const char *name) +static void CheckArgs (int argc, char **argv) { - int i = 0; + /* Check each argv[] against the options registered above - + * If it's not a valid option, exit with error message. + * Else, skip checking the next option.num_arg argv[]. + * (num_args=-1 means a single argv[] is optional). + * Also allow for game commands like "+r_shadow 1" */ + int i, j, valid, skip; + int num_avail_options; + char string[40]; + + /* find how many options are registered */ + for (i = 1; ; i++) + { + if (options[i].option[0] == 0) + continue; + if (strcmp(options[i].option, "end") == 0) + break; + } + num_avail_options = i; - Sys_Printf ("Usage: %s [options]\n", name); - while (help_strings[i]) + if (argc <= 1) + return; + + skip = 0; + + for (i = 1; i < argc; i++) { - Sys_PrintTerm (help_strings[i]); - Sys_PrintTerm ("\n"); - i++; + if (skip == 1) { + /* one arg only */ + skip = 0; + continue; + } + if (skip == -1) { + /* optional single arg */ + skip = 0; + if (argv[i][0] != '-') + continue; + } + if (skip == -2) { + /* parsing +game_command */ + /* +game command found... skip till we find an "-option" */ + if (argv[i][0] != '-') + continue; + else + skip = 0; + } + + if ( !strcmp(argv[i], "-v") || !strcmp(argv[i], "-version" ) || + !strcmp(argv[i], "--version")) + { + exit(0); + } + if ( !strcmp(argv[i], "-h") || !strcmp(argv[i], "-help" ) || + !strcmp(argv[i], "-?") || !strcmp(argv[i], "--help")) + { + Sys_Printf ("\nUsage: %s [options] [+gamecommands]\n", argv[0]); + for (j = 0; j < num_avail_options; j++) + { + if (options[j].option[0]) { + sprintf (string, " %s", options[j].option); + if (options[j].alias1[0]) { + strcat (string, " | "); + strcat (string, options[j].alias1); + } + if (options[j].num_args == 1) + strcat (string, " ARG"); + if (options[j].num_args == -1) + strcat (string, " [ARG]"); + Sys_Printf ("%-30s%s\n", string, options[j].descrip); + } else { + /* print header */ + Sys_Printf ("\n%s Options:\n", options[j].descrip); + } + } + exit (0); + } + + valid = 0; /* check this arg is valid */ + + for (j = 0; j < num_avail_options; j++) + { + if (!options[j].option[0]) + continue; + + valid = (strcmp(options[j].option, argv[i]) == 0) | + (strcmp(options[j].alias1, argv[i]) == 0) | + (strcmp(options[j].alias2, argv[i]) == 0); + if (valid) + break; + } + + if (valid) { + switch (options[j].num_args) { + case 1: + /* ensure there is one, and skip checking next arg */ + if (i == argc-1) { + Sys_Printf ("\n%s: missing arg for option \"%s\"\n",argv[0],argv[i]); + exit(1); + } + /* this assumes that strings beginning with "-" and "+" will + * never be valid values for an option */ + if (argv[i+1][0] == '-' || argv[i+1][0] == '+') { + Sys_Printf ("\n%s: Missing arg for option \"%s\"\n",argv[0],argv[i]); + exit(1); + } + skip = 1; + break; + case -1: + skip = -1; + break; +#if 0 + case 0: + /* doesn't accept args: make sure there aren't any. */ + if (argv[i+1][0] != '-' && argv[i+1][0] != '+') { + Sys_Printf ("\n%s: Unwanted arg for option \"%s\"\n",argv[0],argv[i]); + exit(1); + } +#endif + } + } else { + if (argv[i][0] == '+') { + skip = -2; + } else { + Sys_Printf ("\n%s: illegal arg \"%s\"\n", argv[0], argv[i]); + exit (1); + } + } } - Sys_PrintTerm ("\n"); } /* @@ -679,23 +882,7 @@ int main (int argc, char **argv) PrintVersion(); - if (argc > 1) - { - for (i = 1; i < argc; i++) - { - if ( !(strcmp(argv[i], "-v")) || !(strcmp(argv[i], "-version" )) || - !(strcmp(argv[i], "--version")) ) - { - exit(0); - } - else if ( !(strcmp(argv[i], "-h")) || !(strcmp(argv[i], "-help" )) || - !(strcmp(argv[i], "-?")) || !(strcmp(argv[i], "--help")) ) - { - PrintHelp(argv[0]); - exit (0); - } - } - } + CheckArgs(argc, argv); memset (cwd, 0, sizeof(cwd)); if (Sys_GetBasedir(argv[0], cwd, sizeof(cwd)) != 0) debian/patches/hardening.patch0000644000000000000000000001230512220451210013563 0ustar Description: patches to enable hardening on uhexen2 simple fixes to enable hardened build Author: gustavo panizzo Origin: vendor Forwarded: not-needed Last-Update: <2013-08-26> --- a/engine/hexenworld/client/Makefile.svga +++ b/engine/hexenworld/client/Makefile.svga @@ -92,8 +92,8 @@ CFLAGS += -O2 -DNDEBUG=1 -ffast-math -fomit-frame-pointer endif -CPPFLAGS= -LDFLAGS = +CPPFLAGS += +LDFLAGS += # compiler includes INCLUDES= -I. -I$(COMMON_HW) -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/engine/hexenworld/client/Makefile +++ b/engine/hexenworld/client/Makefile @@ -161,8 +161,8 @@ CFLAGS += -O2 -DNDEBUG=1 -ffast-math -fomit-frame-pointer endif -CPPFLAGS= -LDFLAGS = +CPPFLAGS += +LDFLAGS += # compiler includes INCLUDES= -I. -I$(COMMON_HW) -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/engine/hexenworld/server/Makefile +++ b/engine/hexenworld/server/Makefile @@ -69,8 +69,8 @@ CFLAGS += -O2 -DNDEBUG=1 -ffast-math -fomit-frame-pointer endif -CPPFLAGS= -LDFLAGS = +CPPFLAGS += +LDFLAGS += # compiler includes INCLUDES= -I. -I$(COMMON_HW) -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/engine/hexen2/Makefile.svga +++ b/engine/hexen2/Makefile.svga @@ -90,8 +90,8 @@ CFLAGS += -O2 -DNDEBUG=1 -ffast-math -fomit-frame-pointer endif -CPPFLAGS= -LDFLAGS = +CPPFLAGS += +LDFLAGS += # compiler includes INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/engine/hexen2/Makefile +++ b/engine/hexen2/Makefile @@ -193,8 +193,8 @@ CFLAGS += -O2 -DNDEBUG=1 -ffast-math -fomit-frame-pointer endif -CPPFLAGS= -LDFLAGS = +CPPFLAGS += +LDFLAGS += # compiler includes INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/hw_utils/hwrcon/Makefile +++ b/hw_utils/hwrcon/Makefile @@ -57,8 +57,8 @@ CFLAGS += -O2 -DNDEBUG=1 endif -CPPFLAGS= -LDFLAGS = +CPPFLAGS += +LDFLAGS += # compiler includes INCLUDES= -I. -I$(UHEXEN2_SHARED) --- a/hw_utils/hwmquery/Makefile +++ b/hw_utils/hwmquery/Makefile @@ -56,8 +56,8 @@ CFLAGS += -O2 -DNDEBUG=1 endif -CPPFLAGS= -LDFLAGS = +CPPFLAGS += +LDFLAGS += # compiler includes INCLUDES= -I. -I$(UHEXEN2_SHARED) --- a/hw_utils/hwmaster/Makefile +++ b/hw_utils/hwmaster/Makefile @@ -56,8 +56,8 @@ CFLAGS += -O2 -DNDEBUG=1 endif -CPPFLAGS= -LDFLAGS = +CPPFLAGS += +LDFLAGS += # compiler includes INCLUDES= -I. -I$(UHEXEN2_SHARED) --- a/utils/bspinfo/Makefile +++ b/utils/bspinfo/Makefile @@ -50,7 +50,7 @@ endif CFLAGS += -DDOUBLEVEC_T -LDFLAGS = +LDFLAGS += LDLIBS = INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/utils/jsh2color/Makefile +++ b/utils/jsh2color/Makefile @@ -50,7 +50,7 @@ endif CFLAGS += -DDOUBLEVEC_T -LDFLAGS = +LDFLAGS += LDLIBS = INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/utils/genmodel/Makefile +++ b/utils/genmodel/Makefile @@ -49,7 +49,7 @@ CFLAGS += -O2 -DNDEBUG=1 -ffast-math endif -LDFLAGS = +LDFLAGS += LDLIBS = INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/utils/qbsp/Makefile +++ b/utils/qbsp/Makefile @@ -50,7 +50,7 @@ endif CFLAGS += -DDOUBLEVEC_T -LDFLAGS = +LDFLAGS += LDLIBS = INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/utils/texutils/lmp2pcx/Makefile +++ b/utils/texutils/lmp2pcx/Makefile @@ -49,7 +49,7 @@ CFLAGS += -O2 -DNDEBUG=1 endif -LDFLAGS = +LDFLAGS += LDLIBS = INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/utils/texutils/bsp2wal/Makefile +++ b/utils/texutils/bsp2wal/Makefile @@ -49,7 +49,7 @@ CFLAGS += -O2 -DNDEBUG=1 endif -LDFLAGS = +LDFLAGS += LDLIBS = INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/utils/dcc/Makefile +++ b/utils/dcc/Makefile @@ -49,7 +49,7 @@ CFLAGS += -O2 -DNDEBUG=1 endif -LDFLAGS = +LDFLAGS += LDLIBS = INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/utils/vis/Makefile +++ b/utils/vis/Makefile @@ -50,7 +50,7 @@ endif CFLAGS += -DDOUBLEVEC_T -LDFLAGS = +LDFLAGS += LDLIBS = INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/utils/pak/Makefile +++ b/utils/pak/Makefile @@ -50,7 +50,7 @@ CFLAGS += -O2 -DNDEBUG=1 endif -LDFLAGS = +LDFLAGS += LDLIBS = INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/utils/light/Makefile +++ b/utils/light/Makefile @@ -50,7 +50,7 @@ endif CFLAGS += -DDOUBLEVEC_T -LDFLAGS = +LDFLAGS += LDLIBS = INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/utils/qfiles/Makefile +++ b/utils/qfiles/Makefile @@ -49,7 +49,7 @@ CFLAGS += -O2 -DNDEBUG=1 endif -LDFLAGS = +LDFLAGS += LDLIBS = INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/engine/hexen2/server/Makefile +++ b/engine/hexen2/server/Makefile @@ -76,8 +76,8 @@ CFLAGS += -O2 -DNDEBUG=1 -ffast-math -fomit-frame-pointer endif -CPPFLAGS= -LDFLAGS = +CPPFLAGS += +LDFLAGS += # compiler includes INCLUDES= -I. -I.. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) --- a/h2patch/Makefile +++ b/h2patch/Makefile @@ -18,12 +18,12 @@ LINKER = $(CC) CPUFLAGS= -CFLAGS = -g -Wall +CFLAGS += -g -Wall CFLAGS += $(CPUFLAGS) ifndef DEBUG CFLAGS += -O2 -DNDEBUG=1 endif -LDFLAGS = +LDFLAGS += XDELTA_DIR:= $(LIBS_DIR)/xdelta3 XDFLAGS:= -DXD3_DEBUG=0 --- a/utils/hcc/Makefile +++ b/utils/hcc/Makefile @@ -51,7 +51,7 @@ # avoid the compiler warnings in pr_lex.c for now CFLAGS += -Wno-char-subscripts -LDFLAGS = +LDFLAGS += LDLIBS = INCLUDES= -I. -I$(COMMONDIR) -I$(UHEXEN2_SHARED) debian/patches/debian-paths0000644000000000000000000000354712205672130013106 0ustar Description: this patch changes the default search path for uhexen2 executables Origin: vendor Forwarded: not-needed Last-Update: <2012-09-16> --- a/engine/hexenworld/client/sys_unix.c +++ b/engine/hexenworld/client/sys_unix.c @@ -648,7 +648,7 @@ int main (int argc, char **argv) /* initialize the host params */ memset (&parms, 0, sizeof(parms)); - parms.basedir = cwd; + parms.basedir = "/usr/share/games/hexen2"; #if DO_USERDIRS parms.userdir = userdir; #else --- a/engine/hexenworld/server/sys_unix.c +++ b/engine/hexenworld/server/sys_unix.c @@ -541,7 +541,7 @@ int main (int argc, char **argv) /* initialize the host params */ memset (&parms, 0, sizeof(parms)); - parms.basedir = cwd; + parms.basedir = "/usr/share/games/hexen2"; #if DO_USERDIRS parms.userdir = userdir; #else --- a/engine/hexen2/sys_unix.c +++ b/engine/hexen2/sys_unix.c @@ -895,7 +895,7 @@ int main (int argc, char **argv) /* initialize the host params */ memset (&parms, 0, sizeof(parms)); - parms.basedir = cwd; + parms.basedir = "/usr/share/games/hexen2"; #if DO_USERDIRS parms.userdir = userdir; #else --- a/engine/hexen2/server/sys_unix.c +++ b/engine/hexen2/server/sys_unix.c @@ -582,7 +582,7 @@ int main (int argc, char **argv) /* initialize the host params */ memset (&parms, 0, sizeof(parms)); - parms.basedir = cwd; + parms.basedir = "/usr/share/games/hexen2"; #if DO_USERDIRS parms.userdir = userdir; #else --- a/launcher/config_file.c +++ b/launcher/config_file.c @@ -30,7 +30,7 @@ /* Default values for the options */ char game_basedir[MAX_OSPATH] = GAME_DATADIR; -int basedir_nonstd = 0; +int basedir_nonstd = 1; int destiny = DEST_H2; int opengl_support = 1; int fullscreen = 1; @@ -145,7 +145,6 @@ int cfg_read_basedir (void) char buff[1024], *tmp; int cnt; - game_basedir[0] = '\0'; cfg_file = open_config_file("r"); if (cfg_file == NULL) { debian/uhexen2-common.install0000644000000000000000000000177212220444325013427 0ustar gamecode/hc/h2/progs.dat usr/share/games/hexen2/data1/ gamecode/hc/h2/progs2.dat usr/share/games/hexen2/data1/ gamecode/hc/hw/hwprogs.dat usr/share/games/hexen2/hw/ gamecode/hc/portals/progs.dat usr/share/games/hexen2/portals/ gamecode/mapfixes/data1/maps usr/share/games/hexen2/data1/ gamecode/mapfixes/portals/maps usr/share/games/hexen2/portals/ gamecode/res/h2/default.cfg usr/share/games/hexen2/data1/ gamecode/res/h2/hexen.rc usr/share/games/hexen2/data1/ gamecode/res/h2/strings.txt usr/share/games/hexen2/data1/ gamecode/res/hw/default.cfg usr/share/games/hexen2/hw/ gamecode/res/hw/strings.txt usr/share/games/hexen2/hw/ gamecode/res/portals/default.cfg usr/share/games/hexen2/portals/ gamecode/res/portals/hexen.rc usr/share/games/hexen2/portals/ gamecode/res/portals/infolist.txt usr/share/games/hexen2/portals/ gamecode/res/portals/maplist.txt usr/share/games/hexen2/portals/ gamecode/res/portals/puzzles.txt usr/share/games/hexen2/portals/ gamecode/res/portals/strings.txt usr/share/games/hexen2/portals/ debian/upgrade-111.sh0000755000000000000000000000320512206141604011450 0ustar #!/bin/sh # # this script will download the binaries to patch pak0.pak and pak1.pak files # from uhexen2 site and patch them. # you need to be root or at least be able to write to /usr/share/games/hexen2 # gustavo panizzo 2012-09-17 GDVER="1.28" URL="http://downloads.sourceforge.net/project/uhexen2/Hexen2%20GameData/gamedata-${GDVER}/gamedata-src-${GDVER}.tgz" TEMP=`mktemp -d` for tool in wget xdelta3 tar md5sum awk do which $tool >/dev/null 2>/dev/null if [ $? != 0 ]; then echo "$tool is not avaiable, it is needed for this script to work" exit 1 fi done PAK0_MD5=`md5sum /usr/share/games/hexen2/data1/pak0.pak |awk '{print $1}'` PAK1_MD5=`md5sum /usr/share/games/hexen2/data1/pak1.pak |awk '{print $1}'` wget ${URL} -O ${TEMP}/gamedata-${GDVER}.tgz tar xzf ${TEMP}/gamedata-${GDVER}.tgz -C ${TEMP}/ if [ $PAK0_MD5 = c9675191e75dd25a3b9ed81ee7e05eff ]; then echo "pak0.pak file is already updated to 1.11" else mv /usr/share/games/hexen2/data1/pak0.pak $TEMP/ xdelta3 -f -d -s ${TEMP}/pak0.pak ${TEMP}/gamecode-${GDVER}/patch111/patchdat/data1/data1pk0.xd3 /usr/share/games/hexen2/data1/pak0.pak #xdelta3 -f -d -s /usr/share/games/hexen2/data1/pak0.pak ${TEMP}/gamecode-${GDVER}/patch111/patchdat/data1/data1pk0.xd3 /usr/share/games/hexen2/data1/pak0.pak fi if [ $PAK1_MD5 = c2ac5b0640773eed9ebe1cda2eca2ad0 ]; then echo "pak1.pak file is already updated to 1.11" else mv /usr/share/games/hexen2/data1/pak1.pak $TEMP/ xdelta3 -f -d -s ${TEMP}/pak1.pak ${TEMP}/gamecode-${GDVER}/patch111/patchdat/data1/data1pk1.xd3 /usr/share/games/hexen2/data1/pak1.pak fi rm -rf ${TEMP} debian/uhexen2.desktop0000644000000000000000000000025712213415131012134 0ustar [Desktop Entry] Name=Hexen 2 Comment=Hexen II Exec=/usr/games/h2launcher Icon=hexen2.png Terminal=false Type=Application Categories=Game;ActionGame; Keywords=Game;ActionGame; debian/h2launcher.60000644000000000000000000000104212205672130011303 0ustar .TH h2launcher 6 games .SS NAME h2launcher \- Hexen II: Hammer of Thyrion .SH SYNOPSIS .B h2launcher .SH DESCRIPTION .B h2launcher the graphical launcher for Hammer of Thyrion .SH OPTIONS .TP h2launcher has no options. .SH SEE ALSO .TP uhexen2(6), hcc(6), h2patch(6), h2launcher(6) .TP /usr/share/doc/uhexen2/README.gz .SH AUTHORS See the copyright file on \fI/usr/share/doc/uhexen2/copyright\fR This manual page was originally written by gustavo panizzo for the Debian project it can be used elsewhere. debian/README.Debian0000644000000000000000000000251212205672130011225 0ustar Hammer of Thyrion for Debian ---------------------------- This is the engine only, in order to play the game you need the game data. you can get the game data via: - copying the original game data (data1/pak0.pak and data1/pak1.pak) to /usr/share/games/hexen2/data1. - when it gain support, install the game data using game-data-packager How to patch Gamedata to 1.11 ----------------------------- if your pak0.pak and pak1.pak files are from version 1.03 (original cdrom version) of the game, you must upgrade them to 1.11 there are a couple of ways to acomplish that - run the upgrade-111.sh script on examples directory, as root. - run h2patch as root - patch the files from h2launcher menu - use xdelta to patch forward the files: MD5sum for the gamedata files ----------------------------- + data1/pak0.pak v1.03 b53c9391d16134cb3baddc1085f18683 + data1/pak1.pak v1.03 9a2010aafb9c0fe71c37d01292030270 + data1/pak0.pak v1.11 c9675191e75dd25a3b9ed81ee7e05eff + data1/pak1.pak v1.11 c2ac5b0640773eed9ebe1cda2eca2ad0 + portals/pak3.pak (Portal of Praevus, no need to patch this one) 77ae298dd0dcd16ab12f4a68067ff2c3 + hw/pak4.pak (HexenWorld, no need to patch this one) 88109ee385d9723ac5f1015e034a44dd -- gustavo panizzo Thu, 30 Jun 2011 19:03:08 -0300 debian/uhexen2.menu0000644000000000000000000000021512205672130011426 0ustar ?package(uhexen2):needs="X11" section="Games/Action"\ hints="Hexen II,First Person,FPS"\ title="Hexen II" command="/usr/games/h2launcher" debian/docs0000644000000000000000000000000712205672130010034 0ustar docs/* debian/uhexen2.install0000644000000000000000000000060312220444346012134 0ustar debian/uhexen2.desktop usr/share/applications/ engine/hexen2/glhexen2 usr/games engine/hexen2/server/h2ded usr/games engine/hexen2/hexen2 usr/games engine/hexenworld/client/glhwcl usr/games engine/hexenworld/client/hwcl usr/games engine/hexenworld/server/hwsv usr/games h2patch/h2patch usr/games hw_utils/hwmaster/hwmaster usr/games launcher/h2launcher usr/games utils/hcc/hcc usr/games debian/control0000644000000000000000000000237012223101131010555 0ustar Source: uhexen2 Section: contrib/games Priority: optional Maintainer: gustavo panizzo Uploaders: Jon Dowland Build-Depends: debhelper (>= 9.0.0), dpkg-dev (>= 1.16.1~), libgtk2.0-dev, libmad0-dev, libogg-dev, libsdl1.2-dev, libvorbis-dev, nasm Standards-Version: 3.9.4 Homepage: http://uhexen2.sourceforge.net/ Package: uhexen2 Provides: hexen2-engine Recommends: hexen2-data | game-data-packager Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, uhexen2-common Description: Hexen II - engine package Hammer of Thyrion is a Hexen II engine . This package will run the original Hexen II game, Portal of Praevus mission pack and HexenWorld. A dedicated server, h2ded and a GTK+ gui, h2launcher are included in this package. Package: uhexen2-common Architecture: all Enhances: hexen2-engine Depends: ${misc:Depends} Description: Hexen II engine - data package Hammer of Thyrion is a Hexen II engine. This package will install the data necessary to play the original Hexen II game, Portal of Praevus mission pack and HexenWorld. Other bits, non-free and non-distribuitable, are necessary to play the games. debian/compat0000644000000000000000000000000212205672130010362 0ustar 9 debian/watch0000644000000000000000000000016012205672130010212 0ustar version=3 opts=dversionmangle=s/\.dfsg// \ http://sf.net/uhexen2/hexen2source-[1-9](.+)\.(?:tar\.(?:gz|bz2|xz)) debian/uhexen2.examples0000644000000000000000000000021612205672130012301 0ustar scripts/cdrip_hexen2.sh scripts/cdrip_hexen2_matroxm3d.sh scripts/cdrip_hexen2_xplosiv.sh scripts/cdrip_missionpack.sh debian/upgrade-111.sh debian/uhexen2.links0000644000000000000000000000061612205672130011607 0ustar usr/share/man/man6/uhexen2.6 usr/share/man/man6/hexen2.6 usr/share/man/man6/uhexen2.6 usr/share/man/man6/glhexen2.6 usr/share/man/man6/uhexen2.6 usr/share/man/man6/glhwcl.6 usr/share/man/man6/uhexen2.6 usr/share/man/man6/h2ded.6 usr/share/man/man6/uhexen2.6 usr/share/man/man6/hwcl.6 usr/share/man/man6/uhexen2.6 usr/share/man/man6/hwmaster.6 usr/share/man/man6/uhexen2.6 usr/share/man/man6/hwsv.6 debian/uhexen2.60000644000000000000000000000562312205672130010637 0ustar .TH uhexen2 6 games "23 July 2012" "" "" .SH NAME .TP hexen2, h2ded, hwcl, hwsv, glhexen2, glhwcl -\ Hexen II: Hammer of Thyrion .SH SYNOPSIS hexen2 [options] [+gamecommands] .SH DESCRIPTION Hammer of Thyrion is an Hexen II engine .SH OPTIONS .RE .PP General Options: .RS .TP .B \fB-portals\fP | \fB-h2mp\fP Play Portal of Praevus mission pack .TP .B \fB-game\fP ARG Play this mod .TP .B \fB-basedir\fP ARG Use this directory as base .TP .B \fB-nomouse\fP Disable mouse .TP .B \fB-heapsize\fP ARG Kilobytes memory for heap .TP .B \fB-v\fP | \fB--version\fP Display version information .TP .B \fB-h\fP | \fB--help\fP Show help .RE .PP Video Options: .RS .TP .B \fB-f\fP | \fB-fullscreen\fP Run fullscreen .TP .B \fB-w\fP | \fB-window\fP Run as a window .TP .B \fB-width\fP ARG Set screen width .TP .B \fB-height\fP ARG Set screen height .TP .B \fB-conwidth\fP ARG Set console width (in pixels) .RE .PP Sound Options: .RS .TP .B \fB-s\fP | \fB-nosound\fP Disable sound .TP .B \fB-sndoss\fP Use OSS sound .TP .B \fB-sndalsa\fP Use ALSA sound (alsa > 1.0.1) .TP .B \fB-sndsdl\fP Use SDL sound .TP .B \fB-sndspeed\fP ARG Sound sampling rate .TP .B \fB-sndbits\fP ARG Sound sampling bits .TP .B \fB-alsadev\fP ARG Alsa device name .TP .B \fB-ossdev\fP ARG OSS device name .TP .B \fB-sndmono\fP Set mono playback .RE .PP Music Options: .RS .TP .B \fB-nomidi\fP Disable midi .TP .B \fB-nocdaudio\fP Disable CD playback .TP .B \fB-cddev\fP ARG Use this CD device .RE .PP Network Options: .RS .TP .B \fB-listen\fP [ARG] Enable multiplayer with max N players .TP .B \fB-dedicated\fP [ARG] Enable dedicated server with max N players .TP .B \fB-nolan\fP Disable local area network .TP .B \fB-noudp\fP Disable udp .TP .B \fB-noifscan\fP Disable if scan .TP .B \fB-ip\fP | \fB-bindip\fP ARG Use this IP address .TP .B \fB-localip\fP ARG Use this local IP address .TP .B \fB-port\fP ARG Use this port .TP .B \fB-udpport\fP ARG Use this udp port .TP .B \fB-ipxport\fP ARG Use this ipx port .RE .PP Debugging Options: .RS .TP .B \fB-condebug\fP | \fB-debuglog\fP Do extra debug logging .TP .B \fB-developer\fP Set developer cvar .TP .B \fB-devlog\fP Log some dev events when !developer .TP .B \fB-safemode\fP Disable some hardware features .RE .PP Miscellaneous Options: .RS .TP .B \fB-forcemem\fP Force memory option .TP .B \fB-surfcachesize\fP ARG Surface cache size .TP .B \fB-protocol\fP ARG Request different game version .TP .B \fB-particles\fP ARG Set number of particles .TP .B \fB-fullsbar\fP Enable full status bar (unused) .TP .B \fB-force\fP Skip some sanity checks .TP .B \fB-nojoy\fP Disable joystick .TP .B \fB-zone\fP ARG Zone memory size .SH SEE ALSO .TP uhexen2(6), hcc(6), h2patch(6), h2launcher(6) .TP /usr/share/doc/uhexen2/README.gz .SH AUTHORS See the copyright file on \fI/usr/share/doc/uhexen2/copyright\fR This manual page was originally written by gustavo panizzo for the Debian project it can be used elsewhere. debian/changelog0000644000000000000000000000137112220447235011043 0ustar uhexen2 (1.5.6+dfsg-1) unstable; urgency=low * New upstream release * Now source package includes more, unapplied, patches from upstream * Updated syntax_checking.patch * Removed VCS fields on control file, read README.source for more information about it. * Update upgrade-111.sh to get the latest version of gamedata and typo fixed. * First upload to unstable. * Maintainer field updated. * Source package now produces 2 binary packages, uhexen2 (arch dependent) and uhexen2-common (arch independent) -- gustavo panizzo Thu, 29 Aug 2013 19:34:03 -0300 uhexen2 (1.5.4+dfsg-1) experimental; urgency=low * Initial release (Closes: #632376) -- gustavo panizzo Wed, 20 Jun 2012 11:44:35 -0300 debian/source-cleaner.sh0000755000000000000000000000210412205672130012427 0ustar #!/bin/sh # this script cleans the source code of uhexen2 to make it dfsg # it should run from topdir of the source code # delete svn entries find . -type d -name .svn |xargs rm -rf find . -type f -regextype posix-extended -iregex '.*/VisualStudio20[0-9]+.zip' | xargs rm -f find . -type f -regextype posix-extended -iregex '.*/build_cross_win(32|64).sh' | xargs rm -f find . -type f -regextype posix-extended -iregex '.*/build_cross_(osx|dos).sh' | xargs rm -f find . -type f -regextype posix-extended -iregex '.*/build_(osx|dos|w64|w32).sh' | xargs rm -f rm -rf gamecode/patch111 rm -rf gamecode/hc/siege rm -rf gamecode/txt/siege rm -rf LICENSE.txt hexen2.spec rm -rf engine/hexen2/dos/ rm -rf engine/hexen2/MacOSX rm -rf docs/README.dos rm -rf docs/README.win32 rm -rf docs/README.AoT rm -rf docs/COMPILE rm -rf docs/COPYING rm -rf scripts/ccase.sh rm -rf scripts/cross_defs.dj rm -rf scripts/cross_defs.w32 rm -rf scripts/cross_defs.w64 rm -rf scripts/gcc-version.sh rm -rf scripts/mk_header.c rm -rf scripts/mkrelease.sh rm -rf scripts/systest.c rm -rf patches/syntax_checking.patch debian/hcc.60000644000000000000000000000140412205672130010007 0ustar .TH hcc 6 games .SH NAME hcc \- Hexen II: Hammer of Thyrion .SH SYNOPSIS .B hcc .SH DESCRIPTION .B hcc hcc the compiler of the game data for Hammer of Thyrion. .SH OPTIONS .TP \fB-oi\fP : Optimize Immediates .TP .B \fB-on\fP : Optimize Name Table .TP .B \fB-quiet\fP : Quiet mode .TP .B \fB-fileinfo\fP : Show object sizes per file \fB-src\fP : Specify source directory .TP .B \fB-name\fP : Specify the name of the .src file .SH SEE ALSO .TP uhexen2(6), hcc(6), h2patch(6), h2launcher(6) .TP /usr/share/doc/uhexen2/README.gz .SH AUTHORS See the copyright file on \fI/usr/share/doc/uhexen2/copyright\fR This manual page was originally written by gustavo panizzo for the Debian project it can be used elsewhere. debian/copyright0000644000000000000000000000647712205672130011135 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: uhexen2 Source: Files: * Copyright: <2000-2013> Ozkan Sezer <1997-1998> Raven Software Corp. <1996-1997> Id Software, Inc. License: GPL-2.0+ License: GPL-2.0+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: debian/* Copyright: <2012-2013> gustavo panizzo License: GPL-2.0 This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: libs/common/strlcpy.c libs/common/strlcat.c Copyright: <1998-2006> Todd C. Miller License: ISC Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. . THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Files: libs/md5/md5.* Copyright: <1995-1999> Free Software Foundation, Inc. License: GPL-2.0+ Files: libs/timidity/* Copyright: <1995> Tuukka Toivonen <2004> Konstantin Korikov License: GPL-2.0+ Files: libs/timidity/dls1.h Copyright: <1996> Sonic Foundry License: public-domain This file is in the public domain. Files: libs/timidity/dls2.h Copyright: <1998> Microsoft License: public-domain This file is in the public domain. Files: libs/xdelta3/* Copyright: <2001-2010> Joshua P. MacDonald License: GPL-2.0+ Files: libs/common/filenames.h Copyright: <2000-2007> Free Software Foundation, Inc. License: GPL-2.0+ debian/source/0000755000000000000000000000000012205672130010464 5ustar debian/source/format0000644000000000000000000000001412205672130011672 0ustar 3.0 (quilt) debian/uhexen2.manpages0000644000000000000000000000010312205672130012251 0ustar debian/uhexen2.6 debian/h2patch.6 debian/hcc.6 debian/h2launcher.6 debian/README.source0000644000000000000000000000335312205672130011347 0ustar uhexen2 for Debian ------------------ Content: 1. Packaging overview 2. Upstream sources 3. Patches 1 - Packaging + Packaging was maintained under version control, that is no longer the case. Upstream source contains non-free stuff which should be cleaned before upload to Debian. Then maintaining the package on a vcs is more work without any benefits. This could change in the future, but no promises will be made. 2 - Upstream sources Upstream (http://uhexen2.sourceforge.net/) releases several files + hexen2source-${VERSION}.tgz The main source tarball containing hexen2, hexenworld, game launcher, hexen2 utilities, hexenworld utilities, documentation, and even some extra patches. + hexen2source-gamecode-${VERSION}.tgz Sources for the game hcode including hexen2, mission pack, hexenworld and siege. + Those 2 files are combined on a single tree then, the non-free (gamecode/patch111), dubious (gamecode/hc/siege, gamecode/txt/siege), unused (hexen2.spec, win32, etc) or redundant (LICENSE.txt, COPYING) files are removed by source-cleaner.sh script. We keep patches/syntax_checking.patch on debian/patches directory. 3 - Patches The source package uses quilt for the modifications of the upstream source. If you want to change something it is best to use the quilt approach as documented in /usr/share/doc/quilt/README.source 2 patches are applied to the upstream source + syntax_checking.patch which already comes with the upstream source, it enables a long output to --help switch. + hardening.patch which modifies Makefiles to allow a hardened build. -- gustavo panizzo Fri, 23 Ago 2013 10:33:08 -0300