From bc0401832476024c15e2a8456e4aa85c04883f33 Mon Sep 17 00:00:00 2001 From: jdc Date: Thu, 8 Sep 2005 06:30:37 +0000 Subject: [PATCH] Update xmris to version 4.0.5. Changes: Home page has moved. A couple of minor glitches fixed. GNU GPL added. --- games/xmris/DEINSTALL | 18 +++++++++++++++ games/xmris/Makefile | 19 ++++++++++------ games/xmris/PLIST | 4 +--- games/xmris/distinfo | 13 ++++++----- games/xmris/patches/patch-aa | 44 +++++++++++++++++++----------------- games/xmris/patches/patch-ab | 26 ++++++++++----------- games/xmris/patches/patch-ac | 31 +++++++++++++++++++++++++ 7 files changed, 104 insertions(+), 51 deletions(-) create mode 100644 games/xmris/DEINSTALL create mode 100644 games/xmris/patches/patch-ac diff --git a/games/xmris/DEINSTALL b/games/xmris/DEINSTALL new file mode 100644 index 000000000000..f89ba14079dc --- /dev/null +++ b/games/xmris/DEINSTALL @@ -0,0 +1,18 @@ +#!/bin/sh +# +# $NetBSD: DEINSTALL,v 1.1 2005/09/08 06:30:37 jdc Exp $ +# + +VARBASE=@VARBASE@ + +case "${STAGE}" in + POST-DEINSTALL) cat << EOF +============================================================= +The score files were not wiped out by this deletion process. +If you don't want them around, please remove the directory: + ${VARBASE}/games/xmris +and its contents. +============================================================= +EOF + ;; +esac diff --git a/games/xmris/Makefile b/games/xmris/Makefile index 5830fa6e70e6..7f5192f27405 100644 --- a/games/xmris/Makefile +++ b/games/xmris/Makefile @@ -1,21 +1,26 @@ -# $NetBSD: Makefile,v 1.6 2004/12/03 15:14:58 wiz Exp $ +# $NetBSD: Makefile,v 1.7 2005/09/08 06:30:37 jdc Exp $ -DISTNAME= xmris.4.04 -PKGNAME= xmris-4.04 +DISTNAME= xmris.4.0.5 +PKGNAME= xmris-4.05 CATEGORIES= games x11 -MASTER_SITES= http://www.cs.bris.ac.uk/~nathan/xmris/ +MASTER_SITES= http://www.planetfall.pwp.blueyonder.co.uk/xmris/ EXTRACT_SUFX= .tgz MAINTAINER= root@garbled.net -HOMEPAGE= http://www.cs.bris.ac.uk/~nathan/xmris/ +HOMEPAGE= http://www.planetfall.pwp.blueyonder.co.uk/xmris/ COMMENT= Version of the Mr Do video arcade game for X USE_PKGINSTALL= yes USE_IMAKE= yes -BUILD_TARGET= initialize xmris xmred NO_INSTALL_MANPAGES= yes -OWN_DIRS_PERMS= /var/games/${PKGBASE} games games 775 +USE_PKGINSTALL= yes +DEINSTALL_EXTRA_TMPL+= ${PKGDIR}/DEINSTALL + +post-patch: + @${MV} ${WRKSRC}/Imakefile ${WRKSRC}/Imakefile-pre + @${SED} -e 's@XXXVARBASEXXX@${VARBASE}@g' \ + < ${WRKSRC}/Imakefile-pre > ${WRKSRC}/Imakefile post-install: ${INSTALL_MAN} ${WRKSRC}/xmris.man ${PREFIX}/man/man6/xmris.6 diff --git a/games/xmris/PLIST b/games/xmris/PLIST index 91815bfbedf3..43e4f6fdcf2a 100644 --- a/games/xmris/PLIST +++ b/games/xmris/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.2 2002/02/15 10:12:42 skrll Exp $ +@comment $NetBSD: PLIST,v 1.3 2005/09/08 06:30:37 jdc Exp $ bin/xmred bin/xmris bin/xmsit @@ -11,5 +11,3 @@ man/man6/xmsit.6 man/man6/xmred.6 man/man6/xmris.6 @dirrm lib/X11/app-defaults/xmris -@exec ${MKDIR} %D/share/xmris -@unexec ${RM} -rf %D/share/xmris diff --git a/games/xmris/distinfo b/games/xmris/distinfo index bae07b2bb953..817dfc664f65 100644 --- a/games/xmris/distinfo +++ b/games/xmris/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.6 2005/03/16 20:44:17 rillig Exp $ +$NetBSD: distinfo,v 1.7 2005/09/08 06:30:37 jdc Exp $ -SHA1 (xmris.4.04.tgz) = 793f7088ac86ec17ca02962ae08ef9fe91c96423 -RMD160 (xmris.4.04.tgz) = 7051be17265f2be0e0ec16b0b8233c8243a1f46a -Size (xmris.4.04.tgz) = 268308 bytes -SHA1 (patch-aa) = d46671d89b62fb4bcdc568f5320e367c979f50ee -SHA1 (patch-ab) = 6c75333128fbc4e7d03b4a9d93fe642a00f8bd88 +SHA1 (xmris.4.0.5.tgz) = 96443fc266c7388fa67a58ee0e4bada7fe7b6e9e +RMD160 (xmris.4.0.5.tgz) = beade823d48c229b51fefad4fba804217aff3a11 +Size (xmris.4.0.5.tgz) = 273304 bytes +SHA1 (patch-aa) = af00a085442d3f7e8253bfc6eb58cf914c5c80ae +SHA1 (patch-ab) = 7985aa4060d6e2ff24f5417057ba528561c887d6 +SHA1 (patch-ac) = db0692ce0fe3ea75d954b9f5c03f404e7fb9d343 diff --git a/games/xmris/patches/patch-aa b/games/xmris/patches/patch-aa index c8e4ff10fc12..ac9d882478e7 100644 --- a/games/xmris/patches/patch-aa +++ b/games/xmris/patches/patch-aa @@ -1,33 +1,35 @@ -$NetBSD: patch-aa,v 1.4 2004/02/29 13:38:27 jdc Exp $ +$NetBSD: patch-aa,v 1.5 2005/09/08 06:30:37 jdc Exp $ ---- Imakefile.orig 1995-12-22 12:05:52.000000000 +0000 -+++ Imakefile 2004-02-29 13:23:08.000000000 +0000 -@@ -36,3 +36,3 @@ - #if HasGcc --EXTRACCOPTIONS = -Wall -Wpointer-arith -Wwrite-strings -Wtraditional -+EXTRACCOPTIONS = -Wall -Wpointer-arith -Wwrite-strings - #endif /* HasGcc */ -@@ -73,3 +73,3 @@ +--- Imakefile.orig 1999-11-22 14:06:25.000000000 +0000 ++++ Imakefile 2005-08-13 19:39:35.000000000 +0100 +@@ -69,7 +69,7 @@ + /* #define thefont "-*-courier-*-r-*-*-18-*-*-*-m-*-*-*" */ + XCOMM where is the high score file? XCOMM SCORE = $(LOCAL)/lib/$(APP) --SCORE = $(LIBDIR)/$(APP) -+SCORE = /var/games/$(APP) +-SCORE = /var/lib/games/$(APP) ++SCORE = XXXVARBASEXXX/games/$(APP) /* to install default gardens not in app_defaults/$(APP) -@@ -86,3 +86,3 @@ + /* #define InstallDefaultGardens $(SCORE)/gardens */ + +@@ -82,7 +82,7 @@ + XCOMM and they require these two libraries changed + XCOMM XLIB = -lXext-mit -lX11-mit XCOMM required for setuid, try one or the other, (the first is better) -XCOMM EXTRA_LOAD_FLAGS = -R$(USRLIBDIR)$${LD_RUN_PATH+\:$$LD_RUN_PATH} +XCOMM EXTRA_LOAD_FLAGS = -Wl,-R$(USRLIBDIR)$${LD_RUN_PATH+\:$$LD_RUN_PATH} XCOMM EXTRA_LOAD_FLAGS = -static -@@ -95,3 +95,3 @@ - XCOMM open access on the score file, 'cos transputers can't do setuid --INSTSCOREFLAGS = -m 777 -+INSTSCOREFLAGS = -m 664 - #else -@@ -99,5 +99,5 @@ + XCOMM some X implementations and openwindows require the maths library + XCOMM MATHSLIB = -lm +@@ -91,9 +91,9 @@ + XCOMM + XCOMM owner and access rights for executable & score directory XCOMM these are set for a setuid xmris -OWNER = -o games --INSTSCOREFLAGS = $(OWNER) -m 755 --INSTMRISFLAGS = $(OWNER) $(INSTUIDFLAGS) +OWNER = -o bin -g games -+INSTSCOREFLAGS = $(OWNER) -m 775 +-INSTSCOREFLAGS = $(OWNER) -m 755 ++INSTSCOREFLAGS = $(OWNER) -m 575 +-INSTMRISFLAGS = $(OWNER) $(INSTUIDFLAGS) +INSTMRISFLAGS = $(OWNER) -m 2755 XCOMM normal install locations + THEBINDIR = $(BINDIR) + THEMANDIR = $(MANDIR) diff --git a/games/xmris/patches/patch-ab b/games/xmris/patches/patch-ab index b2acfd506744..742b62c4c65d 100644 --- a/games/xmris/patches/patch-ab +++ b/games/xmris/patches/patch-ab @@ -1,15 +1,13 @@ -$NetBSD: patch-ab,v 1.4 2005/03/16 20:44:17 rillig Exp $ +$NetBSD: patch-ab,v 1.5 2005/09/08 06:30:37 jdc Exp $ ---- all.c.orig Fri Dec 22 13:05:56 1995 -+++ all.c Wed Mar 16 21:30:19 2005 -@@ -637,8 +637,10 @@ FUNCARG((stream), - * returns the error string, or NULL - */ - { -+#if !defined(__NetBSD__) && !defined(__linux__) - extern int sys_nerr; - extern char *sys_errlist[]; -+#endif - - int error; - +--- scoring.c.orig 1999-11-22 13:56:28.000000000 +0000 ++++ scoring.c 2005-08-13 20:38:27.000000000 +0100 +@@ -259,7 +259,7 @@ + #endif /* USELOCKFILE */ + #ifndef TRANSPUTER + if(stream && flag & 4 && effective_uid == real_uid) +- chmod(name, 0666); /* not everyone has fchmod */ ++ chmod(name, 0664); /* not everyone has fchmod */ + if(current_uid != real_uid) + set_euid((current_uid = real_uid)); + #endif /* TRANSPUTER */ diff --git a/games/xmris/patches/patch-ac b/games/xmris/patches/patch-ac new file mode 100644 index 000000000000..61f699c8ac70 --- /dev/null +++ b/games/xmris/patches/patch-ac @@ -0,0 +1,31 @@ +$NetBSD: patch-ac,v 1.1 2005/09/08 06:30:37 jdc Exp $ + +--- PixmapList.c.dist 1999-11-22 13:56:19.000000000 +0000 ++++ PixmapList.c 2005-08-28 13:16:35.000000000 +0100 +@@ -1410,17 +1410,21 @@ + * our geometry changes + */ + { +- float shown, top; ++ union { ++ float f; ++ XtArgVal x; ++ } shown, top; ++ + Arg args[2]; + + if(!plw->pixmap_list.scroll) + return; +- shown = (float)(plw->pixmap_list.orient == XtorientVertical ? ++ shown.f = (float)(plw->pixmap_list.orient == XtorientVertical ? + plw->core.height + 1 : plw->core.width + 1) / + (float)plw->pixmap_list.length; +- if(shown > (float)1.0) +- shown = (float)1.0; +- top = (float)(plw->pixmap_list.orient == XtorientVertical ? ++ if(shown.f > (float)1.0) ++ shown.f = (float)1.0; ++ top.f = (float)(plw->pixmap_list.orient == XtorientVertical ? + -plw->pixmap_list.y : -plw->pixmap_list.x) / + (float)plw->pixmap_list.length; + XtSetArg(args[0], XtNtopOfThumb, sizeof(float) > sizeof(XtArgVal) ?