Import bastet, like tetris but harder.

From Solene Rapenne, maybe with bits from my old attempt, input from
Rafael Sadowski.

ok sthen@

cat pkg/DESCR:
Have you ever thought that Tetris is evil because it never sends you
that straight "I" brick you need to clear four rows?  Well, Tetris(R)
probably is not so malevolent, but Bastet certainly is.  >:-> Bastet
stands for "bastard tetris", and is a simple ncurses-based Tetris(R)
clone for Linux.  Instead of choosing the next block randomly, this
fiendish program uses a special algorithm to give you the worst
possible brick.  Playing Bastet can be a very frustrating experience!

Bonus points for presenting it to your friends as "just another Tetris
clone"
This commit is contained in:
jca 2016-06-08 17:48:44 +00:00
parent 83e128ed33
commit 3c645319ff
6 changed files with 106 additions and 0 deletions

39
games/bastet/Makefile Normal file
View File

@ -0,0 +1,39 @@
# $OpenBSD: Makefile,v 1.1.1.1 2016/06/08 17:48:44 jca Exp $
COMMENT = bastard tetris
DISTNAME = bastet-0.43.1.2015083000
GH_ACCOUNT = fph
GH_PROJECT = bastet
GH_COMMIT = 5037e410fde6fafe8e6bc4cf17a12ad98e01c17e
CATEGORIES = games
HOMEPAGE = http://fph.altervista.org/prog/bastet.html
# GPLv3
PERMIT_PACKAGE_CDROM = Yes
WANTLIB = boost_program_options-mt c curses m
MODULES = lang/clang
MODCLANG_ARCHS = *
MODCLANG_LANGS = c++
LIB_DEPENDS = devel/boost
NO_TEST = Yes
do-configure:
${SUBST_CMD} ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bastet ${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/bastet.6 ${PREFIX}/man/man6
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/bastet/
cd ${WRKSRC}; ${INSTALL_DATA} AUTHORS LICENSE NEWS README \
${PREFIX}/share/doc/bastet
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/bastet/
${INSTALL_DATA} /dev/null \
${PREFIX}/share/examples/bastet/bastet.scores2
.include <bsd.port.mk>

2
games/bastet/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (bastet-0.43.1.2015083000.tar.gz) = gFrGd6OLhRzbktMFoGtlEdugQ4CL7ybIYTZVJOmbxa8=
SIZE (bastet-0.43.1.2015083000.tar.gz) = 87567

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2016/06/08 17:48:44 jca Exp $
--- Makefile.orig Sun Aug 30 09:04:24 2015
+++ Makefile Tue May 24 19:46:56 2016
@@ -3,9 +3,9 @@ MAIN=main.cpp
TESTS=Test.cpp
PROGNAME=bastet
BOOST_PO?=-lboost_program_options
-LDFLAGS+=-lncurses $(BOOST_PO)
+LDFLAGS+=-lncurses $(BOOST_PO) -L${LOCALBASE}/lib -DLOCALSTATEDIR=${LOCALSTATEDIR}
#CXXFLAGS+=-ggdb -Wall
-CXXFLAGS+=-DNDEBUG -Wall
+CXXFLAGS+=-DNDEBUG -Wall -Wno-unused-local-typedef -I${LOCALBASE}/include
#CXXFLAGS+=-pg
#LDFLAGS+=-pg
@@ -17,7 +17,7 @@ Test: $(SOURCES:.cpp=.o) $(TESTS:.cpp=.o)
depend: *.hpp $(SOURCES) $(MAIN) $(TESTS)
$(CXX) -MM $(SOURCES) $(MAIN) $(TESTS)> depend
-include depend
+#include depend
$(PROGNAME): $(SOURCES:.cpp=.o) $(MAIN:.cpp=.o)
$(CXX) -ggdb -o $(PROGNAME) $(SOURCES:.cpp=.o) $(MAIN:.cpp=.o) $(LDFLAGS)

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-Ui_cpp,v 1.1.1.1 2016/06/08 17:48:44 jca Exp $
unistd.h needed for usleep(3)
--- Ui.cpp.orig Sun Aug 30 09:04:24 2015
+++ Ui.cpp Fri May 27 00:19:26 2016
@@ -24,6 +24,7 @@
#include <cstdio>
#include <cstdlib>
+#include <unistd.h>
#include <boost/format.hpp>
#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>

10
games/bastet/pkg/DESCR Normal file
View File

@ -0,0 +1,10 @@
Have you ever thought that Tetris is evil because it never sends you
that straight "I" brick you need to clear four rows? Well, Tetris(R)
probably is not so malevolent, but Bastet certainly is. >:-> Bastet
stands for "bastard tetris", and is a simple ncurses-based Tetris(R)
clone for Linux. Instead of choosing the next block randomly, this
fiendish program uses a special algorithm to give you the worst
possible brick. Playing Bastet can be a very frustrating experience!
Bonus points for presenting it to your friends as "just another Tetris
clone"

17
games/bastet/pkg/PLIST Normal file
View File

@ -0,0 +1,17 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2016/06/08 17:48:44 jca Exp $
@mode g+s
@group games
@bin bin/bastet
@mode
@group
@man man/man6/bastet.6
share/doc/bastet/
share/doc/bastet/AUTHORS
share/doc/bastet/LICENSE
share/doc/bastet/NEWS
share/doc/bastet/README
share/examples/bastet/
share/examples/bastet/bastet.scores2
@mode 664
@group games
@sample /var/games/bastet.scores2