View | Details | Raw Unified | Return to bug 86269
Collapse All | Expand All

(-)games/xshisen/Makefile (-19 / +28 lines)
Lines 6-46 Link Here
6
#
6
#
7
7
8
PORTNAME=	xshisen
8
PORTNAME=	xshisen
9
PORTVERSION=	1.36
9
PORTVERSION=	1.51
10
PORTREVISION=	1
11
CATEGORIES=	games
10
CATEGORIES=	games
12
MASTER_SITES=	http://www.techfirm.co.jp/~masaoki/
11
MASTER_SITES=	http://www.techfirm.co.jp/~masaoki/
13
12
14
MAINTAINER=	ports@FreeBSD.org
13
MAINTAINER=	ports@FreeBSD.org
15
COMMENT=	Shisen-sho puzzle game for X11
14
COMMENT=	Shisen-sho puzzle game for X11
16
15
17
BUILD_DEPENDS=	nkf:${PORTSDIR}/japanese/nkf
18
19
# runs fine on ssh connection
20
#IS_INTERACTIVE=	YES	# Has to create an app-defaults file
21
USE_X_PREFIX=	yes
16
USE_X_PREFIX=	yes
22
USE_XPM=	yes
17
USE_XPM=	yes
18
USE_REINPLACE=	yes
23
GNU_CONFIGURE=	yes
19
GNU_CONFIGURE=	yes
24
CONFIGURE_ARGS=	--datadir="${X11BASE}/lib/X11" \
20
CONFIGURE_ARGS=	--sharedstatedir="${DATADIR}"
25
		--enable-japanese=euc	#Japanese char set euc, jis sjis
21
INSTALL_TARGET=	install-prog
26
27
.include <bsd.port.pre.mk>
28
22
29
MANLANG=	"" ja
23
MANLANG=	"" ja
30
MAN6=		xshisen.6
24
MAN6=		xshisen.6
31
25
26
.if !defined(WITHOUT_MOTIF)
27
USE_MOTIF=	yes
28
CONFIGURE_ARGS+=	--with-motif
29
.endif
30
31
post-patch:
32
	@${REINPLACE_CMD} -e \
33
		's|XSHISEN_VERSION|${PORTVERSION}|g' ${WRKSRC}/lang/XShisen.ad*
34
32
post-install:
35
post-install:
33
	@${CHOWN} root:games ${PREFIX}/bin/xshisen
36
	@${CHOWN} root:games ${PREFIX}/bin/xshisen
34
	@${CHMOD} 2555 ${PREFIX}/bin/xshisen
37
	@${CHMOD} 2555 ${PREFIX}/bin/xshisen
35
	@${CHOWN} root:games ${PREFIX}/lib/X11/xshisen/xshisen-scores
38
	@${CHOWN} root:games ${DATADIR}/xshisen.scores
36
	@${CHMOD} 0660 ${PREFIX}/lib/X11/xshisen/xshisen-scores
39
	@${CHMOD} 0660 ${DATADIR}/xshisen.scores
37
	${INSTALL_MAN} ${WRKSRC}/xshisen.man ${PREFIX}/man/man6/xshisen.6
40
	${INSTALL_MAN} ${WRKSRC}/man/xshisen.6 \
38
	@nkf -e < ${WRKSRC}/xshisen.jman-jis \
41
		${MAN6PREFIX}/man/man6/xshisen.6
39
	  > ${WRKSRC}/xshisen.jman
42
	${INSTALL_MAN} ${WRKSRC}/man/xshisen.6.ja_JP.eucJP \
40
	${INSTALL_MAN} ${WRKSRC}/xshisen.jman ${PREFIX}/man/ja/man6/xshisen.6
43
		${MAN6PREFIX}/man/ja/man6/xshisen.6
41
	-test -d ${PREFIX}/lib/X11/ja_JP.EUC/ -a \
44
	@${MKDIR} ${PREFIX}/lib/X11/app-defaults
45
	${INSTALL_DATA} ${WRKSRC}/lang/XShisen.ad \
46
		${PREFIX}/lib/X11/app-defaults/XShisen
47
	@${MKDIR} ${PREFIX}/lib/X11/ja_JP.eucJP/app-defaults
48
	${INSTALL_DATA} ${WRKSRC}/lang/XShisen.ad.ja_JP.eucJP \
49
		${PREFIX}/lib/X11/ja_JP.eucJP/app-defaults/XShisen
50
	-${TEST} -d ${PREFIX}/lib/X11/ja_JP.EUC/ -a \
42
	      -d ${PREFIX}/lib/X11/ja_JP.EUC/app-defaults && \
51
	      -d ${PREFIX}/lib/X11/ja_JP.EUC/app-defaults && \
43
		${LN} -s ${PREFIX}/lib/X11/ja_JP.eucJP/app-defaults/XShisen \
52
		${LN} -s ${PREFIX}/lib/X11/ja_JP.eucJP/app-defaults/XShisen \
44
			${PREFIX}/lib/X11/ja_JP.EUC/app-defaults && \
53
			${PREFIX}/lib/X11/ja_JP.EUC/app-defaults || ${TRUE}
45
54
46
.include <bsd.port.post.mk>
55
.include <bsd.port.mk>
(-)games/xshisen/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (xshisen-1.36.tar.gz) = 3c3904ff99075012201a2f6a8d6a5beb
1
MD5 (xshisen-1.51.tar.gz) = 5f0ef1d7811401876de717fd6771fe47
2
SIZE (xshisen-1.36.tar.gz) = 62768
2
SIZE (xshisen-1.51.tar.gz) = 85350
(-)games/xshisen/files/patch-aa (-11 lines)
Lines 1-11 Link Here
1
--- configure.orig	Tue Feb 27 21:29:29 1996
2
+++ configure	Sun Oct 10 17:49:35 1999
3
@@ -1593,7 +1593,7 @@
4
 CPPFLAGS="${CPPFLAGS} -DLIB_DIR=\\\"\$(XSHISENLIB)\\\""
5
 
6
 for i in ${mandir} /usr/share/man /usr/man /usr/local/man; do
7
-  for j in japanese japan ja ja_JP ja_JP.eucJP ja_JP.SJIS; do
8
+  for j in a_JP.EUC ja_JP.SJIS ja_JP.JIS7; do
9
     if [ -d "$i/$j" ]; then
10
       JAPANESE="$j"
11
       break 2;
(-)games/xshisen/files/patch-ac (-21 lines)
Lines 1-21 Link Here
1
--- Makefile.in.orig	Tue Jan 23 17:35:21 1996
2
+++ Makefile.in	Sat Nov  9 17:18:47 2002
3
@@ -39,7 +39,7 @@
4
 SCF   = xshisen-scores
5
 
6
 LIBS      = @LIBS@ 
7
-CODECONV  = ./$(exec_name) -KCONV jis
8
+CODECONV  = (nkf -e | sed 's/XSHISEN_VERSION/1.36/')
9
 
10
 all: $(PROGS)
11
 
12
@@ -64,6 +64,9 @@
13
 		$(INSTALLD) $$file $(XSHISENLIB)/`basename $$file`; \
14
 	done
15
 	$(INSTALLD) $(AD) $(XAD_DIR)/$(class_name)
16
+	@if [ ! -f $(JXAD_DIR) ]; then \
17
+	$(MKDIR) $(JXAD_DIR); \
18
+	fi
19
 	$(INSTALLD) $(ADJ) $(JXAD_DIR)/$(class_name)
20
 
21
 install.man: $(exec_name).jman $(exec_name).man
(-)games/xshisen/files/patch-ad (-95 lines)
Lines 1-95 Link Here
1
2
$FreeBSD: ports/games/xshisen/files/patch-ad,v 1.2 2005/01/11 21:31:48 naddy Exp $
3
4
--- main.C.orig
5
+++ main.C
6
@@ -44,53 +44,53 @@
7
 
8
 static XtResource gres[] = {
9
     { "aboutString", "AboutString", XtRString, sizeof (char *),
10
-      0, XtRString, "XShisen " XSHISEN_VERSION " by Masaoki Kobayashi" },
11
+      0, XtRString, (XtPointer)"XShisen " XSHISEN_VERSION " by Masaoki Kobayashi" },
12
     { "tedumari", "Tedumari", XtRString, sizeof (char *),
13
-      offsetof(GlobRes, tedumari), XtRString, "You can get no more pieces." },
14
+      offsetof(GlobRes, tedumari), XtRString, (XtPointer)"You can get no more pieces." },
15
     { "width", "Width", XtRInt, sizeof (int),
16
-      offsetof(GlobRes, Width), XtRString, "640" },
17
+      offsetof(GlobRes, Width), XtRString, (XtPointer)"640" },
18
     { "height", "Height", XtRInt, sizeof (int),
19
-      offsetof(GlobRes, Height), XtRString, "400" },
20
+      offsetof(GlobRes, Height), XtRString, (XtPointer)"400" },
21
     { "timeFormat", "TimeFormat", XtRString, sizeof (char *),
22
-      offsetof(GlobRes, timeFormat), XtRString, "Your time is %2.2d:%2.2d." },
23
+      offsetof(GlobRes, timeFormat), XtRString, (XtPointer)"Your time is %2.2d:%2.2d." },
24
     { "displayFormat1", "DisplayFormat1", XtRString, sizeof (char *),
25
-      offsetof(GlobRes, displayFormat1), XtRString, "Rest: " },
26
+      offsetof(GlobRes, displayFormat1), XtRString, (XtPointer)"Rest: " },
27
     { "displayFormat2", "DisplayFormat2", XtRString, sizeof (char *),
28
-      offsetof(GlobRes, displayFormat2), XtRString, "Time: " },
29
+      offsetof(GlobRes, displayFormat2), XtRString, (XtPointer)"Time: " },
30
     { "scoreFile", "ScoreFile", XtRString, sizeof (char *),
31
-      offsetof(GlobRes, scoreFile), XtRString, "%s/xshisen-scores" },
32
+      offsetof(GlobRes, scoreFile), XtRString, (XtPointer)"%s/xshisen-scores" },
33
     { "personalScore", "PersonalScore", XtRString, sizeof (char *),
34
-      offsetof(GlobRes, personalScoreFile), XtRString, ".xshisen-scores" },
35
+      offsetof(GlobRes, personalScoreFile), XtRString, (XtPointer)".xshisen-scores" },
36
     { "scoreOnly", "ScoreOnly", XtRBoolean, sizeof (Boolean),
37
-      offsetof(GlobRes, scoreOnly), XtRString, "False" },
38
+      offsetof(GlobRes, scoreOnly), XtRString, (XtPointer)"False" },
39
     { "connectLineColor", "ConnectLineColor", XtRPixel, sizeof (Pixel),
40
-      offsetof(GlobRes, connLineColor), XtRString, "blue" },
41
+      offsetof(GlobRes, connLineColor), XtRString, (XtPointer)"blue" },
42
     { "connectLineTime", "ConnectLineTime", XtRInt, sizeof (int),
43
-      offsetof(GlobRes, connLineTime), XtRString, "1000" },
44
+      offsetof(GlobRes, connLineTime), XtRString, (XtPointer)"1000" },
45
     { "connectLineWidth", "ConnectLineWidth", XtRInt, sizeof (int),
46
-      offsetof(GlobRes, connLineWidth), XtRString, "6" },
47
+      offsetof(GlobRes, connLineWidth), XtRString, (XtPointer)"6" },
48
     { "autoDemo", "AutoDemo", XtRBoolean, sizeof (Boolean),
49
-      offsetof(GlobRes, autoDemo), XtRString, "False" },
50
+      offsetof(GlobRes, autoDemo), XtRString, (XtPointer)"False" },
51
     { "libraryDirectory", "LibraryDirectory", XtRString, sizeof (char *),
52
-      offsetof(GlobRes, libDir), XtRString, LIB_DIR },
53
+      offsetof(GlobRes, libDir), XtRString, (XtPointer)LIB_DIR },
54
     { "magnifyFactor", "MagnifyFactor", XtRFloat, sizeof (float),
55
-      offsetof(GlobRes, magFactor), XtRString, "1.0" },
56
+      offsetof(GlobRes, magFactor), XtRString, (XtPointer)"1.0" },
57
     { "fitPixmap", "FitPixmap", XtRBoolean, sizeof (Boolean),
58
-      offsetof(GlobRes, fitPixmap), XtRString, "True" },
59
+      offsetof(GlobRes, fitPixmap), XtRString, (XtPointer)"True" },
60
     { "colorCloseness", "ColorCloseness", XtRInt, sizeof (int),
61
-      offsetof(GlobRes, colorCloseness), XtRString, "40000" },
62
+      offsetof(GlobRes, colorCloseness), XtRString, (XtPointer)"40000" },
63
     { "gameSize", "GameSize", XtRInt, sizeof (int),
64
-      offsetof(GlobRes, gameSize), XtRString, "0" },
65
+      offsetof(GlobRes, gameSize), XtRString, (XtPointer)"0" },
66
     { "trialMode", "TrialMode", XtRBoolean, sizeof (Boolean),
67
-      offsetof(GlobRes, trialMode), XtRString, "False" },
68
+      offsetof(GlobRes, trialMode), XtRString, (XtPointer)"False" },
69
     { "gravityMode", "GravityMode", XtRBoolean, sizeof (Boolean),
70
-      offsetof(GlobRes, gravityMode), XtRString, "False" },
71
+      offsetof(GlobRes, gravityMode), XtRString, (XtPointer)"False" },
72
     { "idleTime", "IdleTime", XtRInt, sizeof (int),
73
-      offsetof(GlobRes, idleTime), XtRString, "100000" },
74
+      offsetof(GlobRes, idleTime), XtRString, (XtPointer)"100000" },
75
     { "kanjiCode", "KanjiCode", XtRString, sizeof (char *),
76
-      offsetof(GlobRes, kanjiCode), XtRString, KANJICODE },
77
+      offsetof(GlobRes, kanjiCode), XtRString, (XtPointer)KANJICODE },
78
     { "kanjiConvert", "KanjiConvert", XtRBoolean, sizeof (Boolean),
79
-      offsetof(GlobRes, kanjiConv), XtRString, "False" }
80
+      offsetof(GlobRes, kanjiConv), XtRString, (XtPointer)"False" }
81
 };
82
 GlobRes globRes;
83
 
84
@@ -194,9 +194,9 @@
85
     char buffer[100], *p;
86
     char *(*codeconv)(const char*);
87
 
88
-    strcpy(buffer, operation);
89
+    strlcpy(buffer, operation, sizeof(buffer));
90
     if (strchr(buffer, '-') == NULL) {
91
-        strcat(buffer, "-" KANJICODE);
92
+        strlcat(buffer, "-" KANJICODE, sizeof(buffer));
93
     }
94
     if (strncasecmp(buffer, "jis-euc", 7) == 0)
95
         codeconv = jis_to_euc;
(-)games/xshisen/files/patch-ae (-11 lines)
Lines 1-11 Link Here
1
--- body.C.orig	Sun Dec 12 14:40:15 1999
2
+++ body.C	Sun Dec 12 14:40:55 1999
3
@@ -224,7 +224,7 @@
4
     int   max_c;
5
 
6
     max_c = xsize*ysize*(xsize*ysize/PKIND - 1)/2;
7
-    p = new (Point [max_c][2]);
8
+    p = new Point[max_c][2];
9
     t = new Point[xsize*ysize/PKIND];
10
 
11
     if (hintNum == 0)
(-)games/xshisen/files/patch-af (-159 lines)
Lines 1-159 Link Here
1
2
$FreeBSD: ports/games/xshisen/files/patch-af,v 1.3 2005/01/11 21:31:48 naddy Exp $
3
4
--- score.C.orig
5
+++ score.C
6
@@ -4,31 +4,31 @@
7
 
8
 XtResource Score::resources[] = {
9
     { "scoreTitle",  "ScoreTitle",  XtRString, sizeof(char *),
10
-      0*sizeof(char *), XtRString, "XShisen High Score\n\n" },
11
+      0*sizeof(char *), XtRString, (XtPointer)"XShisen High Score\n\n" },
12
     { "scoreFormat", "ScoreFormat", XtRString, sizeof(char *),
13
-      1*sizeof(char *), XtRString, "%2d  %2.2d:%2.2d:%2.2d  %-28s  %s %s\n" },
14
+      1*sizeof(char *), XtRString, (XtPointer)"%2d  %2.2d:%2.2d:%2.2d  %-28s  %s %s\n" },
15
     { "strPeriod", "StrPeriod", XtRString, sizeof(char *),
16
-      2*sizeof(char *), XtRString, "Last %d days" },
17
+      2*sizeof(char *), XtRString, (XtPointer)"Last %d days" },
18
     { "averagePeriod", "AveragePeriod", XtRString, sizeof(char *),
19
-      3*sizeof(char *), XtRString, "14" },
20
+      3*sizeof(char *), XtRString, (XtPointer)"14" },
21
     { "strPlayed", "StrPlayed", XtRString, sizeof(char *),
22
-      4*sizeof(char *), XtRString, "Played" },
23
+      4*sizeof(char *), XtRString, (XtPointer)"Played" },
24
     { "strCompleted", "StrCompleted", XtRString, sizeof(char *),
25
-      5*sizeof(char *), XtRString, "Completed" },
26
+      5*sizeof(char *), XtRString, (XtPointer)"Completed" },
27
     { "strTedumari", "StrTedumari", XtRString, sizeof(char *),
28
-      6*sizeof(char *), XtRString, "Deadlocked" },
29
+      6*sizeof(char *), XtRString, (XtPointer)"Deadlocked" },
30
     { "strSearched", "StrSearched", XtRString, sizeof(char *),
31
-      7*sizeof(char *), XtRString, "Seach used" },
32
+      7*sizeof(char *), XtRString, (XtPointer)"Search used" },
33
     { "strGiveUp", "StrGiveUp", XtRString, sizeof(char *),
34
-      8*sizeof(char *), XtRString, "Gaven up" },
35
+      8*sizeof(char *), XtRString, (XtPointer)"Given up" },
36
     { "strTotal", "StrTotal", XtRString, sizeof(char *),
37
-      9*sizeof(char *), XtRString, "Total" },
38
+      9*sizeof(char *), XtRString, (XtPointer)"Total" },
39
     { "strAverage", "StrAverage", XtRString, sizeof(char *),
40
-      10*sizeof(char *), XtRString, "Whole Average" },
41
+      10*sizeof(char *), XtRString, (XtPointer)"Whole Average" },
42
     { "strGames", "StrGames", XtRString, sizeof(char *),
43
-      11*sizeof(char *), XtRString, "games" },
44
+      11*sizeof(char *), XtRString, (XtPointer)"games" },
45
     { "personalTitle", "PersonalTitle", XtRString, sizeof(char *),
46
-      12*sizeof(char *), XtRString, "Personal Statistics for %s" }
47
+      12*sizeof(char *), XtRString, (XtPointer)"Personal Statistics for %s" }
48
 };
49
 
50
 void
51
@@ -73,6 +73,12 @@
52
     date[8] = '\0';
53
     strncpy(time, &buffer[53], 8);
54
     time[8] = '\0';
55
+    if (date[0] == '1') {
56
+        for(int i=1; i<8; i++) {
57
+            date[i-1] = date[i];
58
+        }
59
+        date[7] = date[6] == '0' ? '1' : '0';
60
+    }
61
 }
62
 
63
 void
64
@@ -371,10 +377,10 @@
65
     s1 = scoreToRegister / 1000;
66
     ms_to_hms(scoreToRegister, h, m, s);
67
     pw = getpwuid(getuid());
68
-    strcpy(gecos, pw->pw_gecos);
69
+    strlcpy(gecos, pw->pw_gecos, sizeof(gecos));
70
     if ((po = strchr(gecos, ',')) != NULL)
71
         *po = 0;
72
-    sprintf(namebuf, "%-8.8s (%s)", pw->pw_name, gecos);
73
+    snprintf(namebuf, sizeof(namebuf), "%-8.8s (%s)", pw->pw_name, gecos);
74
     sprintf(myname, "%-28.28s", namebuf);
75
     // Always read the latest high score
76
     readfile();
77
@@ -414,7 +420,7 @@
78
     strcpy(rec[inspos].name, myname);
79
     time(&t);
80
     tp = localtime(&t);
81
-    sprintf(rec[i].date, "%2.2d-%2.2d-%2.2d", tp->tm_year, tp->tm_mon+1, tp->tm_mday);
82
+    sprintf(rec[i].date, "%2.2d-%2.2d-%2.2d", tp->tm_year%100, tp->tm_mon+1, tp->tm_mday);
83
     sprintf(rec[i].time, "%2.2d:%2.2d:%2.2d", tp->tm_hour, tp->tm_min, tp->tm_sec);
84
     if (writefile() == 0)
85
         DisplayScore(game);
86
@@ -434,12 +440,12 @@
87
         return; /* Just do not record, no notifying */
88
     time(&t);
89
     tp = localtime(&t);
90
-    check_digit = flag*3 + gamesize + level*7 + tp->tm_year*3 + rest*7
91
+    check_digit = flag*3 + gamesize + level*7 + (tp->tm_year%100)*3 + rest*7
92
         + tp->tm_mon*7 + tp->tm_mday*3 + tp->tm_hour*7 + tp->tm_min*3 + tp->tm_sec;
93
     check_digit %= 857;
94
     fprintf(stream, "%2.2d%2.2d%8.8d%2.2d%1.1d%2.2d%4.4d%2.2d%3.3d%3.3d%2.2d%2.2d\n",
95
             flag,
96
-            tp->tm_sec, result, tp->tm_min, gamesize, tp->tm_year, level, tp->tm_mon,
97
+            tp->tm_sec, result, tp->tm_min, gamesize, tp->tm_year%100, level, tp->tm_mon,
98
             check_digit, rest, tp->tm_mday, tp->tm_hour);
99
     fclose(stream);
100
 }
101
@@ -492,7 +498,24 @@
102
             rest = -1;
103
             c2 = f*3 + g + l*7 + year*3 + month*7 + day*3 + hour*7 + min*3 + sec;
104
             break;
105
-        case 34:
106
+        case 32:
107
+            // Just for compatibility with xshisen 1.10, Y2K
108
+            f     = atoiSubstring(buf +  0, 2);
109
+            sec   = atoiSubstring(buf +  2, 2);
110
+            t     = atoiSubstring(buf +  4, 8);
111
+            min   = atoiSubstring(buf + 12, 2);
112
+            g     = atoiSubstring(buf + 14, 1);
113
+            year  = atoiSubstring(buf + 15, 3) - 100;
114
+            l     = atoiSubstring(buf + 18, 4);
115
+            month = atoiSubstring(buf + 22, 2);
116
+            c1    = atoiSubstring(buf + 24, 3);
117
+            day   = atoiSubstring(buf + 27, 2);
118
+            hour  = atoiSubstring(buf + 29, 2);
119
+            rest = -1;
120
+            c2 = f*3 + g + l*7 + (year+100)*3 + month*7 + day*3 + hour*7 + min*3 + sec
121
+;
122
+            break;
123
+         case 34:
124
             // This is usual format
125
             f     = atoiSubstring(buf +  0, 2);
126
             sec   = atoiSubstring(buf +  2, 2);
127
@@ -509,6 +532,23 @@
128
             c2 = f*3 + g + l*7 + year*3 + month*7 + day*3 + hour*7 + min*3
129
                 + sec + rest*7;
130
             break;
131
+         case 35: 
132
+            // This is usual format, Y2K
133
+            f     = atoiSubstring(buf +  0, 2);
134
+            sec   = atoiSubstring(buf +  2, 2);
135
+            t     = atoiSubstring(buf +  4, 8);
136
+            min   = atoiSubstring(buf + 12, 2);
137
+            g     = atoiSubstring(buf + 14, 1);
138
+            year  = atoiSubstring(buf + 15, 3) - 100;
139
+            l     = atoiSubstring(buf + 18, 4);
140
+            month = atoiSubstring(buf + 22, 2);
141
+            c1    = atoiSubstring(buf + 24, 3);
142
+            rest  = atoiSubstring(buf + 27, 3);
143
+            day   = atoiSubstring(buf + 30, 2);
144
+            hour  = atoiSubstring(buf + 32, 2);
145
+            c2 = f*3 + g + l*7 + (year+100)*3 + month*7 + day*3 + hour*7 + min*3
146
+                + sec + rest*7;
147
+            break;
148
         default:
149
             // Someone edited this file?
150
             continue;
151
@@ -537,7 +577,7 @@
152
         tb.tm_hour  = hour;
153
         tb.tm_mday  = day;
154
         tb.tm_mon   = month;
155
-        tb.tm_year  = year;
156
+        tb.tm_year  = year > 69 ? year : year + 100;
157
         tm1 = mktime(&tb);  // Time of the score
158
         w1[0][f] += t;
159
         w2[0][f]++;
(-)games/xshisen/files/patch-readxpm.C (-4 / +4 lines)
Lines 1-14 Link Here
1
1
2
$FreeBSD: ports/games/xshisen/files/patch-readxpm.C,v 1.1 2005/01/11 21:31:48 naddy Exp $
2
$FreeBSD: ports/games/xshisen/files/patch-readxpm.C,v 1.1 2005/01/11 21:31:48 naddy Exp $
3
3
4
--- readxpm.C.orig
4
--- readxpm.C.orig	Sun Jul  7 01:34:47 2002
5
+++ readxpm.C
5
+++ readxpm.C	Thu Sep 15 13:56:38 2005
6
@@ -12,7 +12,7 @@
6
@@ -12,7 +12,7 @@
7
   char buffer[1024];
7
   char buffer[1024];
8
 
8
 
9
   for(int i=0; i<PKIND; i++) {
9
   for(int i=0; i<PKIND; i++) {
10
-    sprintf(buffer, "%s/%s.xpm", directory, files[i]);
10
-    sprintf(buffer, "%s/%s/%s.xpm", directory, subdir, files[i]);
11
+    snprintf(buffer, sizeof(buffer), "%s/%s.xpm", directory, files[i]);
11
+    snprintf(buffer, sizeof(buffer), "%s/%s/%s.xpm", directory, subdir, files[i]);
12
     Mp[i].ReadFile(w, buffer, i, globRes.colorCloseness);
12
     Mp[i].ReadFile(w, buffer, i, globRes.colorCloseness);
13
   }
13
   }
14
 }
14
 }
(-)games/xshisen/pkg-plist (-38 / +76 lines)
Lines 1-45 Link Here
1
bin/xshisen
1
bin/xshisen
2
lib/X11/xshisen/xshisen-scores
3
lib/X11/xshisen/chun.xpm
4
lib/X11/xshisen/haku.xpm
5
lib/X11/xshisen/hana.xpm
6
lib/X11/xshisen/hatsu.xpm
7
lib/X11/xshisen/hishi.xpm
8
lib/X11/xshisen/m1.xpm
9
lib/X11/xshisen/m2.xpm
10
lib/X11/xshisen/m3.xpm
11
lib/X11/xshisen/m4.xpm
12
lib/X11/xshisen/m5.xpm
13
lib/X11/xshisen/m6.xpm
14
lib/X11/xshisen/m7.xpm
15
lib/X11/xshisen/m8.xpm
16
lib/X11/xshisen/m9.xpm
17
lib/X11/xshisen/nan.xpm
18
lib/X11/xshisen/p1.xpm
19
lib/X11/xshisen/p2.xpm
20
lib/X11/xshisen/p3.xpm
21
lib/X11/xshisen/p4.xpm
22
lib/X11/xshisen/p5.xpm
23
lib/X11/xshisen/p6.xpm
24
lib/X11/xshisen/p7.xpm
25
lib/X11/xshisen/p8.xpm
26
lib/X11/xshisen/p9.xpm
27
lib/X11/xshisen/pei.xpm
28
lib/X11/xshisen/s1.xpm
29
lib/X11/xshisen/s2.xpm
30
lib/X11/xshisen/s3.xpm
31
lib/X11/xshisen/s4.xpm
32
lib/X11/xshisen/s5.xpm
33
lib/X11/xshisen/s6.xpm
34
lib/X11/xshisen/s7.xpm
35
lib/X11/xshisen/s8.xpm
36
lib/X11/xshisen/s9.xpm
37
lib/X11/xshisen/sha.xpm
38
lib/X11/xshisen/ton.xpm
39
lib/X11/app-defaults/XShisen
2
lib/X11/app-defaults/XShisen
40
lib/X11/ja_JP.eucJP/app-defaults/XShisen
3
lib/X11/ja_JP.eucJP/app-defaults/XShisen
4
%%DATADIR%%/s1/chun.xpm
5
%%DATADIR%%/s1/haku.xpm
6
%%DATADIR%%/s1/hana.xpm
7
%%DATADIR%%/s1/hatsu.xpm
8
%%DATADIR%%/s1/hishi.xpm
9
%%DATADIR%%/s1/m1.xpm
10
%%DATADIR%%/s1/m2.xpm
11
%%DATADIR%%/s1/m3.xpm
12
%%DATADIR%%/s1/m4.xpm
13
%%DATADIR%%/s1/m5.xpm
14
%%DATADIR%%/s1/m6.xpm
15
%%DATADIR%%/s1/m7.xpm
16
%%DATADIR%%/s1/m8.xpm
17
%%DATADIR%%/s1/m9.xpm
18
%%DATADIR%%/s1/nan.xpm
19
%%DATADIR%%/s1/p1.xpm
20
%%DATADIR%%/s1/p2.xpm
21
%%DATADIR%%/s1/p3.xpm
22
%%DATADIR%%/s1/p4.xpm
23
%%DATADIR%%/s1/p5.xpm
24
%%DATADIR%%/s1/p6.xpm
25
%%DATADIR%%/s1/p7.xpm
26
%%DATADIR%%/s1/p8.xpm
27
%%DATADIR%%/s1/p9.xpm
28
%%DATADIR%%/s1/pei.xpm
29
%%DATADIR%%/s1/s1.xpm
30
%%DATADIR%%/s1/s2.xpm
31
%%DATADIR%%/s1/s3.xpm
32
%%DATADIR%%/s1/s4.xpm
33
%%DATADIR%%/s1/s5.xpm
34
%%DATADIR%%/s1/s6.xpm
35
%%DATADIR%%/s1/s7.xpm
36
%%DATADIR%%/s1/s8.xpm
37
%%DATADIR%%/s1/s9.xpm
38
%%DATADIR%%/s1/sha.xpm
39
%%DATADIR%%/s1/ton.xpm
40
%%DATADIR%%/s2/chun.xpm
41
%%DATADIR%%/s2/haku.xpm
42
%%DATADIR%%/s2/hana.xpm
43
%%DATADIR%%/s2/hatsu.xpm
44
%%DATADIR%%/s2/hishi.xpm
45
%%DATADIR%%/s2/m1.xpm
46
%%DATADIR%%/s2/m2.xpm
47
%%DATADIR%%/s2/m3.xpm
48
%%DATADIR%%/s2/m4.xpm
49
%%DATADIR%%/s2/m5.xpm
50
%%DATADIR%%/s2/m6.xpm
51
%%DATADIR%%/s2/m7.xpm
52
%%DATADIR%%/s2/m8.xpm
53
%%DATADIR%%/s2/m9.xpm
54
%%DATADIR%%/s2/nan.xpm
55
%%DATADIR%%/s2/p1.xpm
56
%%DATADIR%%/s2/p2.xpm
57
%%DATADIR%%/s2/p3.xpm
58
%%DATADIR%%/s2/p4.xpm
59
%%DATADIR%%/s2/p5.xpm
60
%%DATADIR%%/s2/p6.xpm
61
%%DATADIR%%/s2/p7.xpm
62
%%DATADIR%%/s2/p8.xpm
63
%%DATADIR%%/s2/p9.xpm
64
%%DATADIR%%/s2/pei.xpm
65
%%DATADIR%%/s2/s1.xpm
66
%%DATADIR%%/s2/s2.xpm
67
%%DATADIR%%/s2/s3.xpm
68
%%DATADIR%%/s2/s4.xpm
69
%%DATADIR%%/s2/s5.xpm
70
%%DATADIR%%/s2/s6.xpm
71
%%DATADIR%%/s2/s7.xpm
72
%%DATADIR%%/s2/s8.xpm
73
%%DATADIR%%/s2/s9.xpm
74
%%DATADIR%%/s2/sha.xpm
75
%%DATADIR%%/s2/ton.xpm
76
%%DATADIR%%/xshisen.scores
77
@dirrm %%DATADIR%%/s2
78
@dirrm %%DATADIR%%/s1
79
@dirrm %%DATADIR%%
41
@unexec rmdir %D/lib/X11/ja_JP.eucJP/app-defaults 2>/dev/null || true
80
@unexec rmdir %D/lib/X11/ja_JP.eucJP/app-defaults 2>/dev/null || true
42
@unexec rmdir %D/lib/X11/ja_JP.eucJP 2>/dev/null || true
81
@unexec rmdir %D/lib/X11/ja_JP.eucJP 2>/dev/null || true
43
@dirrm lib/X11/xshisen
44
@exec [ -d %D/lib/X11/ja_JP.EUC/ -a -d %D/lib/X11/ja_JP.EUC/app-defaults ] && ln -s %D/lib/X11/ja_JP.eucJP/app-defaults/XShisen %D/lib/X11/ja_JP.EUC/app-defaults || true
82
@exec [ -d %D/lib/X11/ja_JP.EUC/ -a -d %D/lib/X11/ja_JP.EUC/app-defaults ] && ln -s %D/lib/X11/ja_JP.eucJP/app-defaults/XShisen %D/lib/X11/ja_JP.EUC/app-defaults || true
45
@unexec rm %D/lib/X11/ja_JP.EUC/app-defaults/XShisen 2>/dev/null || true
83
@unexec rm %D/lib/X11/ja_JP.EUC/app-defaults/XShisen 2>/dev/null || true

Return to bug 86269