View | Details | Raw Unified | Return to bug 170147 | Differences between
and this patch

Collapse All | Expand All

(-)games/bastet/Makefile (-4 / +30 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	bastet
8
PORTNAME=	bastet
9
PORTVERSION=	0.41
9
PORTVERSION=	0.43
10
PORTREVISION=	1
11
CATEGORIES=	games
10
CATEGORIES=	games
12
MASTER_SITES=	http://fph.altervista.org/prog/files/
11
MASTER_SITES=	http://fph.altervista.org/prog/files/
13
EXTRACT_SUFX=	.tgz
12
EXTRACT_SUFX=	.tgz
Lines 15-21 Link Here
15
MAINTAINER=	ports@FreeBSD.org
14
MAINTAINER=	ports@FreeBSD.org
16
COMMENT=	An ncurses Tetris clone which is harder than every other Tetris
15
COMMENT=	An ncurses Tetris clone which is harder than every other Tetris
17
16
17
LICENSE=	GPLv3 # (or later)
18
19
LIB_DEPENDS=	boost_program_options:${PORTSDIR}/devel/boost-libs
20
21
USE_NCURSES=	yes
18
USE_GMAKE=	yes
22
USE_GMAKE=	yes
19
MAKE_ENV=	DATADIR=${DATADIR}
23
MAKE_JOBS_SAFE=	yes
24
25
CPPFLAGS+=	-I${LOCALBASE}/include
26
LDFLAGS+=	-L${LOCALBASE}/lib
27
28
MAN6=		bastet.6
29
PLIST_FILES=	bin/bastet
30
31
.include <bsd.port.pre.mk>
32
33
.if ${ARCH} != "i386"
34
USE_GCC=	4.6+
35
.endif
36
37
post-patch:
38
	@${REINPLACE_CMD} -e \
39
		's|^CXXFLAGS+=-D|CXXFLAGS+=$$(CPPFLAGS) -D| ; \
40
		 s|$$(CXX) -MM|$$(CXX) $$(CPPFLAGS) -MM| ; \
41
		 s| -ggdb | |' ${WRKSRC}/Makefile
42
43
do-install:
44
	${INSTALL_PROGRAM} ${WRKSRC}/bastet ${PREFIX}/bin
45
	${INSTALL_MAN} ${WRKSRC}/bastet.6 ${MAN6PREFIX}/man/man6
20
46
21
.include <bsd.port.mk>
47
.include <bsd.port.post.mk>
(-)games/bastet/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (bastet-0.41.tgz) = 32e58210499d4c525a2b2c82e08e1bbbc53de455b74922c94ac25a1fb7e17463
1
SHA256 (bastet-0.43.tgz) = e208c68684cc9b818a08b0d3f5f1e7ef381b1e4d8bc801a90b5ff6a8f00d8168
2
SIZE (bastet-0.41.tgz) = 24195
2
SIZE (bastet-0.43.tgz) = 29115
(-)games/bastet/files/patch-Makefile (-21 lines)
Lines 1-21 Link Here
1
--- Makefile.orig	Tue Oct 19 19:54:58 2004
2
+++ Makefile	Thu Oct 21 20:43:02 2004
3
@@ -1,8 +1,8 @@
4
 #makefile for bastet (c) 2004 Federico Poloni
5
 
6
 #default paths
7
-BIN_PREFIX=/usr/bin/
8
-DATA_PREFIX=/var/games/
9
+BIN_PREFIX=$(PREFIX)/bin/
10
+DATA_PREFIX=$(PREFIX)/share/bastet/
11
 HISCORE=bastet.scores
12
 
13
 #in order to handle highscores properly, bastet must be setuid.
14
@@ -41,6 +41,7 @@
15
 	cp $(EXNAME) $(BIN_PREFIX)
16
 	chown $(GAME_USER) $(BIN_PREFIX)$(EXNAME)
17
 	chmod u+s $(BIN_PREFIX)$(EXNAME)
18
+	mkdir -p $(DATA_PREFIX)
19
 	touch $(DATA_PREFIX)$(HISCORE)
20
 	chown $(GAME_USER) $(DATA_PREFIX)$(HISCORE)
21
 	chmod 644 $(DATA_PREFIX)$(HISCORE)
(-)games/bastet/files/patch-bast.c (-11 lines)
Lines 1-11 Link Here
1
--- bast.c.orig	Thu Oct 21 20:32:29 2004
2
+++ bast.c	Thu Oct 21 20:32:39 2004
3
@@ -1,7 +1,7 @@
4
 #include <stdlib.h>
5
 #include <stdio.h>
6
 #include <ncurses.h>
7
-#include <termio.h>
8
+#include <termios.h>
9
 #include <assert.h>
10
 #include <unistd.h>
11
 #include <string.h>
(-)games/bastet/files/patch-game.c (-67 lines)
Lines 1-67 Link Here
1
diff -ru game.c bastet-0.41/game.c
2
--- game.c	Sat Dec 18 00:28:00 2004
3
+++ bastet-0.41/game.c	Sat Dec 18 00:56:26 2004
4
@@ -12,6 +12,9 @@
5
 #include "game.h"
6
 #include "main.h"
7
 #include "bast.h"
8
+#include <sys/select.h>
9
+
10
+void bast_clear();
11
 
12
 const DOT block_data[BLOCK_TYPES][BLOCK_ORIENTS][BLOCK_DOTS] =
13
 {
14
@@ -66,7 +70,7 @@
15
 
16
 /* Delay before block drop one step down (usec).
17
    We start at one sec. and then decreases the delay by 23% at each level. */
18
-const int delay[NO_LEVELS] = {1000000, 770000, 593000, 457000, 352000, 271000, 208000, 160000, 124000, 95000};
19
+const int delay[NO_LEVELS] = {999999, 770000, 593000, 457000, 352000, 271000, 208000, 160000, 124000, 95000};
20
 
21
 /* Window in which the action takes place. */
22
 WINDOW *well_win;
23
@@ -278,6 +282,7 @@
24
         refresh();
25
 }
26
 
27
+struct timeval mytimeout;
28
 /* Drop a block in the well. When done return y-cord. of where block
29
    ended. If it's not possible to even start with a new block return -1. */
30
 int drop_block(int type, int level)
31
@@ -288,14 +293,13 @@
32
         int orient = 0;
33
         int ch;
34
         fd_set inputs, test_fds;
35
-        struct timeval timeout;
36
         int sel_ret;
37
 
38
         if (0 == check_block_pos(y, x, type, orient))
39
                 return -1;      /* Oh no, game over. */
40
 
41
-        timeout.tv_sec = 0;
42
-        timeout.tv_usec = delay[level];
43
+        mytimeout.tv_sec = 0;
44
+        mytimeout.tv_usec = delay[level];
45
 
46
         FD_ZERO(&inputs);
47
         FD_SET(0, &inputs);
48
@@ -308,7 +312,7 @@
49
         while(1) {
50
                 test_fds = inputs;
51
 
52
-                sel_ret = select(FD_SETSIZE, &test_fds, (fd_set *) 0, (fd_set *) 0, &timeout);
53
+                sel_ret = select(FD_SETSIZE, &test_fds, (fd_set *) 0, (fd_set *) 0, &mytimeout);
54
 
55
                 ch = getch();
56
 
57
@@ -391,8 +402,8 @@
58
                                 set_block(y, x, type, orient);
59
                                 return y;
60
                         }
61
-                        timeout.tv_sec = 0;
62
-                        timeout.tv_usec = delay[level];
63
+                        mytimeout.tv_sec = 0;
64
+                        mytimeout.tv_usec = delay[level];
65
                 }
66
         }
67
 }
(-)games/bastet/pkg-descr (-12 / +10 lines)
Lines 1-15 Link Here
1
Have you ever thought Tetris(R) was evil because it wouldn't send
1
Have you ever thought Tetris(R) was evil because it wouldn't send you
2
you that straight "I" brick you needed in order to clear four rows
2
that straight "I" brick you needed in order to clear four rows at the
3
at the same time? 
3
same time? 
4
4
5
Well Tetris(R) probably isn't evil, but Bastet
5
Well Tetris(R) probably isn't evil, but Bastet certainly is. Bastet
6
certainly is. Bastet stands for "bastard tetris", and is a
6
stands for "bastard tetris", and is a simple ncurses-based Tetris(R)
7
simple ncurses-based Tetris(R) clone for Linux. Unlike normal
7
clone for Linux. Unlike normal Tetris(R), however, Bastet does not
8
Tetris(R), however, Bastet does not choose your next brick at random.
8
choose your next brick at random. Instead, Bastet uses a special
9
Instead, Bastet uses a special algorithm designed to choose the
9
algorithm designed to choose the worst brick possible. 
10
worst brick possible. 
11
10
12
As you can imagine, playing Bastet can be a
11
As you can imagine, playing Bastet can be a very frustrating experience!
13
very frustrating experience!
14
12
15
WWW: http://fph.altervista.org/prog/bastet.shtml
13
WWW: http://fph.altervista.org/prog/bastet.html
(-)games/bastet/pkg-plist (-3 lines)
Lines 1-3 Link Here
1
bin/bastet
2
%%DATADIR%%/bastet.scores
3
@dirrm %%DATADIR%%

Return to bug 170147