diff options
Diffstat (limited to 'games')
-rw-r--r-- | games/tyrquake/Makefile | 13 | ||||
-rw-r--r-- | games/tyrquake/distinfo | 11 | ||||
-rw-r--r-- | games/tyrquake/patches/patch-Makefile | 85 | ||||
-rw-r--r-- | games/tyrquake/patches/patch-aa | 73 | ||||
-rw-r--r-- | games/tyrquake/patches/patch-ab | 107 |
5 files changed, 98 insertions, 191 deletions
diff --git a/games/tyrquake/Makefile b/games/tyrquake/Makefile index 5710f840d7b..3be63f8248f 100644 --- a/games/tyrquake/Makefile +++ b/games/tyrquake/Makefile @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.5 2014/10/10 21:44:46 snj Exp $ +# $NetBSD: Makefile,v 1.6 2015/02/10 22:10:33 snj Exp $ -DISTNAME= tyrquake-0.61 +DISTNAME= tyrquake-0.61_20140630 CATEGORIES= games x11 -MASTER_SITES= http://disenchant.net/files/engine/ +#MASTER_SITES= http://disenchant.net/files/engine/ +MASTER_SITES= http://ftp.NetBSD.org/pub/NetBSD/misc/snj/tyrquake/ MAINTAINER= snj@NetBSD.org HOMEPAGE= http://disenchant.net/tyrquake/ @@ -12,18 +13,20 @@ LICENSE= gnu-gpl-v2 USE_TOOLS+= gmake +WRKSRC= ${WRKDIR}/tyrquake + 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_FILES.audio= common/snd_oss.c SUBST_SED.audio= -e "s|/dev/dsp|${DEVOSSAUDIO}|" INSTALLATION_DIRS= bin do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/tyr-* ${DESTDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/bin/tyr-* ${DESTDIR}${PREFIX}/bin .include "../../graphics/MesaLib/buildlink3.mk" .include "../../x11/libXext/buildlink3.mk" diff --git a/games/tyrquake/distinfo b/games/tyrquake/distinfo index 0c319ff9e84..e9b9b7541af 100644 --- a/games/tyrquake/distinfo +++ b/games/tyrquake/distinfo @@ -1,7 +1,6 @@ -$NetBSD: distinfo,v 1.3 2012/06/23 19:45:06 dholland Exp $ +$NetBSD: distinfo,v 1.4 2015/02/10 22:10:33 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) = d7e794cf7681ba9928869342cf81436d480a99f0 -SHA1 (patch-ab) = 5e7bc38524448e2dec6e9665bfac0c77e681e9eb +SHA1 (tyrquake-0.61_20140630.tar.gz) = 62e4e36f193e8ce2f2d555a9ff8f156300f7762a +RMD160 (tyrquake-0.61_20140630.tar.gz) = d5f8100ae108ae18bf898094e76f417f6f5e111f +Size (tyrquake-0.61_20140630.tar.gz) = 4077622 bytes +SHA1 (patch-Makefile) = 38507b8ec0af0b929904cc2eb5894922b13fc0a6 diff --git a/games/tyrquake/patches/patch-Makefile b/games/tyrquake/patches/patch-Makefile new file mode 100644 index 00000000000..5464934401b --- /dev/null +++ b/games/tyrquake/patches/patch-Makefile @@ -0,0 +1,85 @@ +$NetBSD: patch-Makefile,v 1.1 2015/02/10 22:10:33 snj Exp $ + +- add DragonFly support +- add Solaris support +- honor pkgsrc LDFLAGS +- don't invoke git to obtain version info + +--- Makefile.orig 2015-02-10 13:43:40.000000000 -0800 ++++ Makefile 2015-02-10 14:00:56.000000000 -0800 +@@ -28,7 +28,7 @@ TARGET_UNIX ?= $(if $(filter UNIX,$ + # ============================================================================ + + TYR_RELEASE := v0.62-pre +-TYR_GIT := $(shell git describe --dirty 2> /dev/null) ++TYR_GIT := v0.61-1226-g0ca7766-dirty + TYR_VERSION := $(if $(TYR_GIT),$(TYR_GIT),$(TYR_RELEASE)) + TYR_VERSION_NUM ?= $(patsubst v%,%,$(TYR_VERSION)) + +@@ -52,7 +52,7 @@ TOPDIR := $(shell pwd) + ifneq (,$(findstring MINGW32,$(SYSNAME))) + HOST_OS = WIN32 + else +-ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD)) ++ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD DragonFly)) + HOST_OS = UNIX + HOST_UNIX = bsd + else +@@ -68,12 +68,19 @@ ifneq (,$(findstring $(SYSNAME),Linux)) + HOST_OS = UNIX + HOST_UNIX = linux + else ++ifneq (,$(findstring $(SYSNAME),SunOS)) ++HOST_OS = UNIX ++# enable this if someone can provide a cd_solaris.c with cdrom stuff ++#HOST_UNIX = solaris ++HOST_UNIX = null ++else + $(error OS type not detected.) + endif + endif + endif + endif + endif ++endif + + # -------------------------------------------------------------------- + # Setup driver options, choosing sensible defaults based on target OS +@@ -412,7 +419,7 @@ endef + endif + endif + +-git_date = $(shell git log -1 --date=short --format="%ad" -- $< 2>/dev/null) ++git_date = 2014-06-30 + doc_version = $(git_date) $(TYR_VERSION) + + quiet_cmd_man2man = ' MAN2MAN $@' +@@ -988,23 +995,23 @@ ALL_QWSV_LFLAGS += $(patsubst %,-l%,$(AL + # ============================================================================ + + $(BIN_DIR)/tyr-quake$(EXT): $(patsubst %,$(NQSWDIR)/%,$(ALL_NQSW_OBJS)) +- $(call do_cc_link,$(ALL_NQSW_LFLAGS)) ++ $(call do_cc_link,$(ALL_NQSW_LFLAGS)) $(LDFLAGS) + $(call do_strip,$@) + + $(BIN_DIR)/tyr-glquake$(EXT): $(patsubst %,$(NQGLDIR)/%,$(ALL_NQGL_OBJS)) +- $(call do_cc_link,$(ALL_NQGL_LFLAGS)) ++ $(call do_cc_link,$(ALL_NQGL_LFLAGS)) $(LDFLAGS) + $(call do_strip,$@) + + $(BIN_DIR)/tyr-qwcl$(EXT): $(patsubst %,$(QWSWDIR)/%,$(ALL_QWSW_OBJS)) +- $(call do_cc_link,$(ALL_QWSW_LFLAGS)) ++ $(call do_cc_link,$(ALL_QWSW_LFLAGS)) $(LDFLAGS) + $(call do_strip,$@) + + $(BIN_DIR)/tyr-glqwcl$(EXT): $(patsubst %,$(QWGLDIR)/%,$(ALL_QWGL_OBJS)) +- $(call do_cc_link,$(ALL_QWGL_LFLAGS)) ++ $(call do_cc_link,$(ALL_QWGL_LFLAGS)) $(LDFLAGS) + $(call do_strip,$@) + + $(BIN_DIR)/tyr-qwsv$(EXT): $(patsubst %,$(QWSVDIR)/%,$(ALL_QWSV_OBJS)) +- $(call do_cc_link,$(ALL_QWSV_LFLAGS)) ++ $(call do_cc_link,$(ALL_QWSV_LFLAGS)) $(LDFLAGS) + $(call do_strip,$@) + + # Build man pages, text and html docs from source diff --git a/games/tyrquake/patches/patch-aa b/games/tyrquake/patches/patch-aa deleted file mode 100644 index 2dbf8226772..00000000000 --- a/games/tyrquake/patches/patch-aa +++ /dev/null @@ -1,73 +0,0 @@ -$NetBSD: patch-aa,v 1.3 2012/06/23 19:45:06 dholland Exp $ - -- add DragonFly support -- add Solaris support -- honor pkgsrc LDFLAGS - ---- Makefile.orig 2009-07-05 05:43:49.000000000 +0000 -+++ Makefile -@@ -37,7 +37,7 @@ ifneq (,$(findstring MINGW32,$(SYSNAME)) - HOST_OS = WIN32 - TOPDIR := $(shell pwd -W) - else --ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD OpenBSD)) -+ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD OpenBSD DragonFly)) - HOST_OS = UNIX - UNIX = bsd - TOPDIR := $(shell pwd) -@@ -48,10 +48,18 @@ UNIX = linux - #UNIX = null - TOPDIR := $(shell pwd) - else -+ifneq (,$(findstring $(SYSNAME),SunOS)) -+HOST_OS = UNIX -+# enable this if someone can provide a cd_solaris.c with cdrom stuff -+#UNIX = solaris -+UNIX = null -+TOPDIR := $(shell pwd) -+else - $(error OS type not detected.) - endif - endif - endif -+endif - - ifeq ($(TARGET_OS),WIN32) - EXT = .exe -@@ -611,11 +619,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 +868,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 +954,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 deleted file mode 100644 index d1d330763b7..00000000000 --- a/games/tyrquake/patches/patch-ab +++ /dev/null @@ -1,107 +0,0 @@ -$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); |