File: build_tweaks.patch

package info (click to toggle)
xsok 1.02-23
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,864 kB
  • sloc: ansic: 3,990; makefile: 72; sh: 16
file content (156 lines) | stat: -rw-r--r-- 5,196 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
From: <peter@p12n.org>
Subject: Random hacks to build + install xsok.

diff -urNad xsok-1.02/Makefile xsok-1.02/Makefile
--- xsok-1.02/Makefile
+++ xsok-1.02/Makefile
@@ -7,7 +7,7 @@
 #       But then, you're on your own...
 
 all:
-	(cd src && xmkmf && $(MAKE) && strip xsok)
+	(cd src && xmkmf && $(MAKE))
 	(cd lib && $(MAKE))
 	(cd src && $(MAKE) testname)
 
diff -urNad xsok-1.02/src/Imakefile xsok-1.02/src/Imakefile
--- xsok-1.02/src/Imakefile
+++ xsok-1.02/src/Imakefile
@@ -70,18 +70,18 @@
 # *****************************************************************************
 # I hope you don't need to change anything below this point
 # *****************************************************************************
-#if defined(HPArchitecture) || defined(AIXArchitecture)
+#if 0 /* defined(HPArchitecture) || defined(AIXArchitecture) */
 CC = c89
 CCOPTIONS =
 #else
 CC = gcc
 #ifdef EXTRA_WARNINGS
-CCOPTIONS = -O2 -pipe -ansi -fno-common -Wall -Wshadow -Wpointer-arith \
+CCOPTIONS = -pipe -ansi -fno-common -Wall -Wshadow -Wpointer-arith \
 	-Wcast-qual -Wcast-align -Waggregate-return \
 	-Wstrict-prototypes -Wmissing-prototypes \
 	-Wnested-externs -Wwrite-strings
 #else
-CCOPTIONS = -O2 -pipe -ansi -Wall -fno-common
+CCOPTIONS = -pipe -ansi -Wall -fno-common
 #endif
 #endif
 
@@ -103,7 +103,7 @@
 ALLTARGETS = username combine showscore mergescores $(MYPROG)
 DEFINES = $(HELP_OPTION) $(SOUND_OPTION) $(XPMINCLUDE) $(NET_DEFINE) \
    $(PIPE_DEFINE) -DXSOKDIR=\"$(XSOKLIBDIR)\" -DXSOKSAVE=\"$(XSOKSAVEDIR)\" \
-   $(SLEEP_DEFINE)
+   $(SLEEP_DEFINE) -DDEBIAN
 
 # Dependencies:
 # *.c  require  version.h xsok.h
@@ -133,15 +133,15 @@
 # the install targets require that make has been run in the lib directory
 install:: $(MYPROGS)
 	(umask 022 && mkdirhier $(XSOKLIBDIR))
-	# chmod 755 $(XSOKLIBDIR)
+#	chmod 755 $(XSOKLIBDIR)
 	(umask 022 && mkdirhier $(XSOKSAVEDIR))
 	chmod 777 $(XSOKSAVEDIR)
 	(cd ../lib; tar cf - $(LIBCONTS) | (cd $(XSOKLIBDIR); tar xf -))
 	chown -R root $(XSOKLIBDIR) $(XSOKSAVEDIR)
 	chmod -R a+r $(XSOKLIBDIR)
-	(cd ../lib && ../src/mergescores $(XSOKSAVEDIR)/Xsok.score \
-	   $(XSOKSAVEDIR)/Sokoban.score $(XSOKSAVEDIR)/Cyberbox.score)
-	chmod 666 $(XSOKSAVEDIR)/[A-z]*.score
+#	(cd ../lib && ../src/mergescores $(XSOKSAVEDIR)/Xsok.score \
+#	   $(XSOKSAVEDIR)/Sokoban.score $(XSOKSAVEDIR)/Cyberbox.score)
+#	chmod 666 $(XSOKSAVEDIR)/[A-z]*.score
 	(umask 022 && mkdirhier $(XSOKDOCDIR))
 	if [ -r ../doc/xsok.dvi ]; then cp ../doc/xsok.dvi $(XSOKDOCDIR); fi
 	cp ../doc/cyberbox.doc $(XSOKDOCDIR)
@@ -173,6 +173,6 @@
 	chmod 755 $(LXSOKBINDIR)/xsok
 	cp xsok.man $(LXSOKMANDIR)/xsok.6x
 	chmod 644 $(LXSOKMANDIR)/xsok.6x
-	(cd ../lib && ../src/mergescores $(XSOKSAVEDIR)/Xsok.score \
-	   $(XSOKSAVEDIR)/Sokoban.score $(XSOKSAVEDIR)/Cyberbox.score)
-	chmod 666 $(XSOKSAVEDIR)/[A-z]*.score
+#	(cd ../lib && ../src/mergescores $(XSOKSAVEDIR)/Xsok.score \
+#	   $(XSOKSAVEDIR)/Sokoban.score $(XSOKSAVEDIR)/Cyberbox.score)
+#	chmod 666 $(XSOKSAVEDIR)/[A-z]*.score
diff -urNad xsok-1.02/src/X-gfx.c xsok-1.02/src/X-gfx.c
--- xsok-1.02/src/X-gfx.c
+++ xsok-1.02/src/X-gfx.c
@@ -13,7 +13,7 @@
 #include "X-sok.h"
 
 /*#include <X11/X.h>*/
-#include <xpm.h>
+#include <X11/xpm.h>
 
 #ifndef DELAY
 #define DELAY 50 /* time to sleep (in ms) between auto-moves & replay */
diff -urNad xsok-1.02/src/Xaw-help.c xsok-1.02/src/Xaw-help.c
--- xsok-1.02/src/Xaw-help.c
+++ xsok-1.02/src/Xaw-help.c
@@ -59,7 +59,7 @@
     {   const char **rp;
 	for (rp = rulepool; *rp; ++rp) {
 	    char n[8], s[40];
-	    sprintf(n, "Help%d", rp-rulepool+1);
+	    sprintf(n, "Help%u", (unsigned int)(rp-rulepool+1));
 	    XtSetArg(Args[0], XtNlabel, s);
 	    sprintf(s, TXT_HELP_RULES, *rp);
 	    w = XtCreateManagedWidget(n, smeBSBObjectClass, topicsmenu, Args, 1);
diff -urNad xsok-1.02/src/move.c xsok-1.02/src/move.c
--- xsok-1.02/src/move.c
+++ xsok-1.02/src/move.c
@@ -116,9 +116,9 @@
     int dirbits, power;
 #ifdef SELECTOR_HACK
     static struct objects *sel_ip = NULL;
-    struct objects *new_sel_ip;
+    struct objects *sel_enter_ip = NULL;
     int forbidden = 0;
-    int sel_enter = 0, sel_leave = 0;
+    int sel_leave = 0;
 
     if (obj[y][x]->pic == 7)
 	sel_leave = 1;
@@ -154,8 +154,7 @@
 	    case 0:	/* man: */
 	    case 7:	/* man in selector */
 		if (ip->mask == 0x30010) {	/* walkable selector */
-		    sel_enter = 1;
-		    new_sel_ip = ip;
+		    sel_enter_ip = ip;
 		    goto move_ok;
 		}
 	    }
@@ -194,8 +193,8 @@
 	} else {
 	    obj[ty][tx] = NULL;
 	}
-	if (sel_enter) {
-	    sel_ip = new_sel_ip;
+	if (sel_enter_ip) {
+	    sel_ip = sel_enter_ip;
 	    obj[ty+n*dy][tx+n*dx]->pic = 7;	/* man in a box */
 	}
 	DOPAINT(x, y, x+n*dx, y+n*dy);
diff -urNad xsok-1.02/src/score.c xsok-1.02/src/score.c
--- xsok-1.02/src/score.c
+++ xsok-1.02/src/score.c
@@ -35,11 +35,12 @@
 		else
 		    game.score += obj[y][x]->score;
 	    }
-	    if (c == E_DEST)
+	    if (c == E_DEST) {
 		if (!obj[y][x] || !(obj[y][x]->mask & ~1))
 		    retval = 0;	/* player doesn't score! */
 		else
 		    game.score += obj[y][x]->score;
+	    }
 	}
     if (retval && !objects->score)
 	game.score += 10000;	/* finished-score if no special EXIT square */