aboutsummaryrefslogtreecommitdiffstats
path: root/games/seahaven
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-08-07 02:00:20 +0800
committerimp <imp@FreeBSD.org>2002-08-07 02:00:20 +0800
commitb014b4c9ab4d4a8993898229c39b7fe38eab1c36 (patch)
tree2640ebdeab8ed3fd07511d8ae3fdba04f02c1e7a /games/seahaven
parent8a0df1349a850685b118af36fdf08d06bd59b2ea (diff)
downloadfreebsd-ports-gnome-b014b4c9ab4d4a8993898229c39b7fe38eab1c36.tar.gz
freebsd-ports-gnome-b014b4c9ab4d4a8993898229c39b7fe38eab1c36.tar.zst
freebsd-ports-gnome-b014b4c9ab4d4a8993898229c39b7fe38eab1c36.zip
Update to 1.43. Looks like Garrett's changes have been included in
that version, so we can remove the patches from our repo. Note: This is still busted for -current. I'll fix that in a separate patch. This code is really really old.
Diffstat (limited to 'games/seahaven')
-rw-r--r--games/seahaven/Makefile2
-rw-r--r--games/seahaven/distinfo2
-rw-r--r--games/seahaven/files/patch-README15
-rw-r--r--games/seahaven/files/patch-aa16
-rw-r--r--games/seahaven/files/patch-main.C121
5 files changed, 2 insertions, 154 deletions
diff --git a/games/seahaven/Makefile b/games/seahaven/Makefile
index 0e6f7084ad5a..afa98c6f19a7 100644
--- a/games/seahaven/Makefile
+++ b/games/seahaven/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= seahaven
-PORTVERSION= 1.41
+PORTVERSION= 1.43
CATEGORIES= games
MASTER_SITES= http://seahaven.sourceforge.net/ \
${MASTER_SITE_SOURCEFORGE}
diff --git a/games/seahaven/distinfo b/games/seahaven/distinfo
index 913cbc4a5936..4074a6991f74 100644
--- a/games/seahaven/distinfo
+++ b/games/seahaven/distinfo
@@ -1 +1 @@
-MD5 (seahaven-1.41.tgz) = 57018678eb41daf6cb3f50fc41edd69b
+MD5 (seahaven-1.43.tgz) = f045e201b7ec1bc958be4ab1f62900e5
diff --git a/games/seahaven/files/patch-README b/games/seahaven/files/patch-README
deleted file mode 100644
index de04317d9d2d..000000000000
--- a/games/seahaven/files/patch-README
+++ /dev/null
@@ -1,15 +0,0 @@
---- ../../work.orig/seahaven-1.41/README Mon Aug 5 22:51:21 2002
-+++ README Mon Aug 5 23:38:16 2002
-@@ -56,6 +56,12 @@
-
- ---
-
-+Garrett Wollman <wollman@lcs.mit.edu> modified the program startup
-+and event loop to better conform with the Inter-Client Communications
-+Conventions Manual.
-+
-+---
-+
- Card images from the "spider" game which is:
-
- Copyright (c) 1990 by David Lemke & Network Computing Devices, Inc.
diff --git a/games/seahaven/files/patch-aa b/games/seahaven/files/patch-aa
deleted file mode 100644
index fc3953758977..000000000000
--- a/games/seahaven/files/patch-aa
+++ /dev/null
@@ -1,16 +0,0 @@
---- score.C.org Tue Dec 28 17:35:27 1999
-+++ score.C Tue Dec 28 17:37:37 1999
-@@ -82,8 +82,12 @@
- printLine("%5d game%s played", wins + losses);
- curx = GAMEWIDTH / 4;
- cury = 0;
-- printLine("Winning average: %5.2f%%", 100.0 *
-+ if (wins + losses) {
-+ printLine("Winning average: %5.2f%%", 100.0 *
- ((double) wins / (double) (wins + losses)));
-+ } else {
-+ printLine("Winning Average: N/A", 0, "");
-+ }
- curx = GAMEWIDTH / 2;
- cury = 0;
- if (streak > 0) {
diff --git a/games/seahaven/files/patch-main.C b/games/seahaven/files/patch-main.C
deleted file mode 100644
index 12867d2d1bf7..000000000000
--- a/games/seahaven/files/patch-main.C
+++ /dev/null
@@ -1,121 +0,0 @@
---- ../../work.orig/seahaven-1.41/main.C Mon Aug 5 22:51:21 2002
-+++ main.C Mon Aug 5 23:36:23 2002
-@@ -25,11 +25,21 @@
- exit(1);
- }
-
-+static void Quit() {
-+ XDestroyWindow(dpy, toplevel);
-+ XFlush(dpy);
-+ exit(0);
-+}
-
- main(int argc, char **argv) {
- char *displayname = NULL;
-+ char *name = NULL;
-+ XClassHint *classhint;
-+ XWMHints *wmhints;
-+ XSizeHints *sizehints;
- bool sync = false;
- int i;
-+ Atom wm_protocols, wm_delete_window;
-
- progname = argv[0];
-
-@@ -44,6 +54,10 @@
- } else if (strcmp(argv[i], "-speedup") == 0) {
- speedup = atoi(argv[++i]);
- if (speedup <= 0) Usage();
-+ } else if (strcmp(argv[i], "-name") == 0) {
-+ if (argv[++i] == NULL)
-+ Usage();
-+ name = argv[i];
- } else {
- Usage();
- }
-@@ -69,7 +83,7 @@
-
- XSetWindowAttributes attributes;
- long valuemask = CWEventMask | CWBackPixel;
-- attributes.event_mask = KeyPressMask;
-+ attributes.event_mask = KeyPressMask; /* ClientMessage is always there */
- attributes.background_pixel = backpixel;
-
- toplevel = XCreateWindow(dpy, DefaultRootWindow(dpy), 0, 0,
-@@ -78,6 +92,44 @@
- valuemask, &attributes);
- XSetIconName(dpy, toplevel, "Seahaven");
- XStoreName(dpy, toplevel, "Seahaven Towers");
-+ classhint = XAllocClassHint();
-+ if (!classhint)
-+ Punt("can't allocate memory for class hint");
-+ if (name)
-+ classhint->res_name = name;
-+ else {
-+ classhint->res_name = strrchr(progname, '/');
-+ if (!classhint->res_name)
-+ classhint->res_name = progname;
-+ }
-+ classhint->res_class = "Seahaven";
-+ XSetClassHint(dpy, toplevel, classhint);
-+ XFree(classhint);
-+
-+ /* We don't do focus management -- must tell WM to do it for us, or
-+ otherwise we might not get the focus when initially mapped. */
-+ wmhints = XAllocWMHints();
-+ if (!wmhints)
-+ Punt("can't allocate memory for window manager hints");
-+ wmhints->flags = InputHint | StateHint;
-+ wmhints->input = True;
-+ wmhints->initial_state = NormalState;
-+ XSetWMHints(dpy, toplevel, wmhints);
-+ XFree(wmhints);
-+
-+ /* Let the WM know that we can't be resized. */
-+ sizehints = XAllocSizeHints();
-+ if (!sizehints)
-+ Punt("can't allocate memory for window size hints");
-+ sizehints->flags = PMinSize | PMaxSize;
-+ sizehints->min_width = sizehints->max_width = GAMEWIDTH;
-+ sizehints->min_height = sizehints->max_height = GAMEHEIGHT;
-+ XSetWMNormalHints(dpy, toplevel, sizehints);
-+ XFree(sizehints);
-+
-+ wm_protocols = XInternAtom(dpy, "WM_PROTOCOLS", False);
-+ wm_delete_window = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
-+ XSetWMProtocols(dpy, toplevel, &wm_delete_window, 1);
-
- font = XLoadQueryFont
- (dpy, "-*-helvetica-medium-r-normal--*-120-*-*-p-*-iso8859-1");
-@@ -139,12 +191,15 @@
- case '\033': //esc
- case 'Q':
- case 'q':
-- XUnmapWindow(dpy, toplevel);
-- XFlush(dpy);
-- exit(0);
-+ Quit();
- break;
- }
- }
-+ } else if (event.type == ClientMessage
-+ && event.xclient.message_type == wm_protocols
-+ && event.xclient.format == 32
-+ && *(Atom *)&event.xclient.data == wm_delete_window) {
-+ Quit();
- } else if (event.type == ButtonPress) {
- Window w = event.xbutton.window;
- if (w == undobutton) DoUndo();
-@@ -152,11 +207,7 @@
- else if (w == restartbutton) DoRestart();
- else if (w == autobutton) DoAutoPlay();
- else if (w == newgamebutton) NewGame();
-- else if (w == quitbutton) {
-- XUnmapWindow(dpy, toplevel);
-- XFlush(dpy);
-- exit(0);
-- }
-+ else if (w == quitbutton) Quit();
- }
- }
- }