diff options
author | snj <snj@pkgsrc.org> | 2010-03-09 23:20:01 +0000 |
---|---|---|
committer | snj <snj@pkgsrc.org> | 2010-03-09 23:20:01 +0000 |
commit | f379ddaa1a47371f62a6e04de4cf3ec4a6e4200c (patch) | |
tree | 8aee78355886920e3eafded9ec2e74f7a88dfff2 /games | |
parent | 4cab2b6d8da2272cf30eaced1644cc1b29626627 (diff) | |
download | pkgsrc-f379ddaa1a47371f62a6e04de4cf3ec4a6e4200c.tar.gz |
Add tyrquake:
TyrQuake is meant to be a fairly conservative branch of the Quake source
code. It's intended to support Quake and Quakeworld in both software and
GL versions, as well as the Quakeworld Server. It only contains bug fixes,
and does does not change the look or feel of the game by adding lots of
rendering enhancements, etc.
Diffstat (limited to 'games')
-rw-r--r-- | games/tyrquake/DESCR | 5 | ||||
-rw-r--r-- | games/tyrquake/MESSAGE | 8 | ||||
-rw-r--r-- | games/tyrquake/Makefile | 36 | ||||
-rw-r--r-- | games/tyrquake/PLIST | 6 | ||||
-rw-r--r-- | games/tyrquake/distinfo | 7 | ||||
-rw-r--r-- | games/tyrquake/patches/patch-aa | 41 | ||||
-rw-r--r-- | games/tyrquake/patches/patch-ab | 107 |
7 files changed, 210 insertions, 0 deletions
diff --git a/games/tyrquake/DESCR b/games/tyrquake/DESCR new file mode 100644 index 00000000000..b1155fed8c3 --- /dev/null +++ b/games/tyrquake/DESCR @@ -0,0 +1,5 @@ +TyrQuake is meant to be a fairly conservative branch of the Quake source +code. It's intended to support Quake and Quakeworld in both software and +GL versions, as well as the Quakeworld Server. It only contains bug fixes, +and does does not change the look or feel of the game by adding lots of +rendering enhancements, etc. diff --git a/games/tyrquake/MESSAGE b/games/tyrquake/MESSAGE new file mode 100644 index 00000000000..f5762a7e0df --- /dev/null +++ b/games/tyrquake/MESSAGE @@ -0,0 +1,8 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2010/03/09 23:20:01 snj Exp $ + +To use TyrQuake, you must have a set of data files. One possible source +is pkgsrc/games/quakedata/. Once you have obtained a set of data files, +place the id1 directory in ~/.tyrquake/. + +=========================================================================== diff --git a/games/tyrquake/Makefile b/games/tyrquake/Makefile new file mode 100644 index 00000000000..8a75647038b --- /dev/null +++ b/games/tyrquake/Makefile @@ -0,0 +1,36 @@ +# $NetBSD: Makefile,v 1.1.1.1 2010/03/09 23:20:01 snj Exp $ + +DISTNAME= tyrquake-0.61 +CATEGORIES= games x11 +MASTER_SITES= http://disenchant.net/files/engine/ + +MAINTAINER= snj@NetBSD.org +HOMEPAGE= http://disenchant.net/engine.html +COMMENT= Conservative branch of Quake + +LICENSE= gnu-gpl-v2 + +PKG_DESTDIR_SUPPORT= user-destdir + +USE_TOOLS+= gmake + +LDFLAGS+= ${LIBOSSAUDIO} + +SUBST_CLASSES+= audio +SUBST_STAGE.audio= post-patch +SUBST_MESSAGE.audio= Fixing path to the audio device. +SUBST_FILES.audio= common/snd_linux.c +SUBST_SED.audio= -e "s|/dev/dsp|${DEVOSSAUDIO}|" + +INSTALLATION_DIRS= bin + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/tyr-* ${DESTDIR}${PREFIX}/bin + +.include "../../graphics/MesaLib/buildlink3.mk" +.include "../../x11/libXext/buildlink3.mk" +.include "../../x11/libXxf86dga/buildlink3.mk" +.include "../../x11/libXxf86vm/buildlink3.mk" +.include "../../mk/oss.buildlink3.mk" + +.include "../../mk/bsd.pkg.mk" diff --git a/games/tyrquake/PLIST b/games/tyrquake/PLIST new file mode 100644 index 00000000000..7e9ac64a1b8 --- /dev/null +++ b/games/tyrquake/PLIST @@ -0,0 +1,6 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2010/03/09 23:20:01 snj Exp $ +bin/tyr-glquake +bin/tyr-glqwcl +bin/tyr-quake +bin/tyr-qwcl +bin/tyr-qwsv diff --git a/games/tyrquake/distinfo b/games/tyrquake/distinfo new file mode 100644 index 00000000000..b82636e0e8c --- /dev/null +++ b/games/tyrquake/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1.1.1 2010/03/09 23:20:01 snj Exp $ + +SHA1 (tyrquake-0.61.tar.gz) = b9c9ec45b339759f1e6bf884a6bed516ad1f8939 +RMD160 (tyrquake-0.61.tar.gz) = 005363c07abb3e071f3352517ac549a5ae3aa8fa +Size (tyrquake-0.61.tar.gz) = 1188917 bytes +SHA1 (patch-aa) = 0d5ec2c3a5d71aff7798d95021d1402dc14e423c +SHA1 (patch-ab) = 5e7bc38524448e2dec6e9665bfac0c77e681e9eb diff --git a/games/tyrquake/patches/patch-aa b/games/tyrquake/patches/patch-aa new file mode 100644 index 00000000000..8b190e7a930 --- /dev/null +++ b/games/tyrquake/patches/patch-aa @@ -0,0 +1,41 @@ +$NetBSD: patch-aa,v 1.1.1.1 2010/03/09 23:20:01 snj Exp $ + +--- Makefile.orig 2010-03-07 13:13:21.000000000 -0800 ++++ Makefile 2010-03-07 13:13:51.000000000 -0800 +@@ -611,11 +611,11 @@ tyr-glquake.exe: $(patsubst %,$(NQGLDIR) + + # Unix + tyr-quake: $(patsubst %,$(NQSWDIR)/%,$(NQ_UNIX_SW_OBJS)) +- $(call do_cc_link,$(NQ_UNIX_SW_LFLAGS)) ++ $(call do_cc_link,$(NQ_UNIX_SW_LFLAGS)) $(LDFLAGS) + $(call do_strip,$@) + + tyr-glquake: $(patsubst %,$(NQGLDIR)/%,$(NQ_UNIX_GL_OBJS)) +- $(call do_cc_link,$(NQ_UNIX_GL_LFLAGS)) ++ $(call do_cc_link,$(NQ_UNIX_GL_LFLAGS)) $(LDFLAGS) + $(call do_strip,$@) + + +@@ -860,11 +860,11 @@ tyr-glqwcl.exe: $(patsubst %,$(QWGLDIR)/ + + # Unix + tyr-qwcl: $(patsubst %,$(QWSWDIR)/%,$(QW_UNIX_SW_OBJS)) +- $(call do_cc_link,$(QW_UNIX_SW_LFLAGS)) ++ $(call do_cc_link,$(QW_UNIX_SW_LFLAGS)) $(LDFLAGS) + $(call do_strip,$@) + + tyr-glqwcl: $(patsubst %,$(QWGLDIR)/%,$(QW_UNIX_GL_OBJS)) +- $(call do_cc_link,$(QW_UNIX_GL_LFLAGS)) ++ $(call do_cc_link,$(QW_UNIX_GL_LFLAGS)) $(LDFLAGS) + $(call do_strip,$@) + + UNUSED_OBJS = cd_audio.o +@@ -946,7 +946,7 @@ tyr-qwsv.exe: $(patsubst %,$(QWSVDIR)/%, + + # Unix + tyr-qwsv: $(patsubst %,$(QWSVDIR)/%,$(QWSV_UNIX_OBJS)) +- $(call do_cc_link,$(QWSV_UNIX_LFLAGS)) ++ $(call do_cc_link,$(QWSV_UNIX_LFLAGS)) $(LDFLAGS) + $(call do_strip,$@) + + # ---------------------------------------------------------------------------- diff --git a/games/tyrquake/patches/patch-ab b/games/tyrquake/patches/patch-ab new file mode 100644 index 00000000000..d1d330763b7 --- /dev/null +++ b/games/tyrquake/patches/patch-ab @@ -0,0 +1,107 @@ +$NetBSD: patch-ab,v 1.1.1.1 2010/03/09 23:20:01 snj Exp $ + +ed46d97c106471672c571eebd51dedc0508e1225 upstream. + +[PATCH] Query size of X11 gamma ramp + +It seems since Xorg 7.4, the size of the gamma ramp is no longer 256 +in all cases. So we will need to query the gamma size and use the +appropriate size when calling into the X11 API. Quake assumes a 256 +valued gamma ramp througout the code, so we need to scale the ramp +passed down via VID_SetGammaRamp accordingly. + +--- common/gl_vidlinuxglx.c.orig 2009-07-04 22:43:49.000000000 -0700 ++++ common/gl_vidlinuxglx.c 2010-03-08 19:30:56.000000000 -0800 +@@ -463,7 +463,8 @@ HandleEvents(void) + } + + void (*VID_SetGammaRamp)(unsigned short ramp[3][256]); +-static unsigned short saved_gamma_ramp[3][256]; ++static unsigned short *x11_gamma_ramp; ++static int x11_gamma_size; + + void + signal_handler(int sig) +@@ -471,7 +472,10 @@ signal_handler(int sig) + printf("Received signal %d, exiting...\n", sig); + XAutoRepeatOn(x_disp); + if (VID_SetGammaRamp) +- VID_SetGammaRamp(saved_gamma_ramp); ++ XF86VidModeSetGammaRamp(x_disp, scrnum, x11_gamma_size, ++ x11_gamma_ramp, ++ x11_gamma_ramp + x11_gamma_size, ++ x11_gamma_ramp + x11_gamma_size * 2); + XCloseDisplay(x_disp); + Sys_Quit(); + } +@@ -589,10 +593,25 @@ CheckMultiTextureExtensions(void) + static void + VID_SetXF86GammaRamp(unsigned short ramp[3][256]) + { ++ int i; ++ unsigned short *r, *g, *b; ++ + if (!x_disp) + Sys_Error("%s: x_disp == NULL!", __func__); + +- XF86VidModeSetGammaRamp(x_disp, scrnum, 256, ramp[0], ramp[1], ramp[2]); ++ /* ++ * Need to scale the gamma ramp to the hardware size ++ */ ++ r = Hunk_TempAlloc(3 * x11_gamma_size * sizeof(unsigned short)); ++ g = r + x11_gamma_size; ++ b = r + x11_gamma_size * 2; ++ for (i = 0; i < x11_gamma_size; i++) { ++ r[i] = ramp[0][i * 256 / x11_gamma_size]; ++ g[i] = ramp[1][i * 256 / x11_gamma_size]; ++ b[i] = ramp[2][i * 256 / x11_gamma_size]; ++ } ++ ++ XF86VidModeSetGammaRamp(x_disp, scrnum, x11_gamma_size, r, g, b); + } + + /* +@@ -604,10 +623,23 @@ VID_SetXF86GammaRamp(unsigned short ramp + static void + Gamma_Init() + { +- if (XF86VidModeGetGammaRamp(x_disp, scrnum, 256, +- saved_gamma_ramp[0], +- saved_gamma_ramp[1], +- saved_gamma_ramp[2])) ++ Bool ret; ++ int size; ++ ++ ret = XF86VidModeGetGammaRampSize(x_disp, scrnum, &x11_gamma_size); ++ if (!ret|| !x11_gamma_size) { ++ VID_SetGammaRamp = NULL; ++ return; ++ } ++ ++ size = 3 * x11_gamma_size * sizeof(unsigned short); ++ x11_gamma_ramp = Hunk_AllocName(size, "x11_gamma_ramp"); ++ ++ ret = XF86VidModeGetGammaRamp(x_disp, scrnum, x11_gamma_size, ++ x11_gamma_ramp, ++ x11_gamma_ramp + x11_gamma_size, ++ x11_gamma_ramp + x11_gamma_size * 2); ++ if (ret) + VID_SetGammaRamp = VID_SetXF86GammaRamp; + else + VID_SetGammaRamp = NULL; +@@ -993,9 +1025,12 @@ VID_Init(unsigned char *palette) + void + VID_Shutdown(void) + { +- if (VID_SetGammaRamp) +- VID_SetGammaRamp(saved_gamma_ramp); +- ++ if (VID_SetGammaRamp) { ++ XF86VidModeSetGammaRamp(x_disp, scrnum, x11_gamma_size, ++ x11_gamma_ramp, ++ x11_gamma_ramp + x11_gamma_size, ++ x11_gamma_ramp + x11_gamma_size * 2); ++ } + if (x_disp != NULL) { + if (ctx != NULL) + glXDestroyContext(x_disp, ctx); |