new package: bastet

From https://github.com/termux/termux-packages/pull/1543.
This commit is contained in:
Leonid Plyushch 2019-03-05 20:32:32 +02:00 committed by Henrik Grimler
parent b298ef84fc
commit 1e63194f86
4 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,20 @@
--- ../cache/bastet-0.43.2/BastetBlockChooser.hpp 2015-08-30 07:04:24.000000000 +0000
+++ ./BastetBlockChooser.hpp 2017-09-25 03:10:40.601198625 +0000
@@ -23,7 +23,7 @@
#include "Well.hpp"
-#include <boost/tr1/tr1/unordered_set>
+#include <boost/unordered/unordered_set.hpp>
#include <set>
#include <boost/functional/hash.hpp>
@@ -75,7 +75,7 @@
public:
Searcher(BlockType b, const Well *well, Vertex v, WellVisitor *visitor);
private:
- std::tr1::unordered_set<Vertex> _visited;
+ boost::unordered::unordered_set<Vertex> _visited;
//std::set<Vertex> _visited; ^^ the above is more efficient, we need to do many inserts
BlockType _block;
const Well *_well;

View File

@ -0,0 +1,11 @@
--- ../cache/bastet-0.43.2/Config.cpp 2015-08-30 07:04:24.000000000 +0000
+++ ./Config.cpp 2017-09-19 08:56:50.122235753 +0000
@@ -38,7 +38,7 @@
const size_t HowManyHighScores=10;
const std::string RcFileName="/.bastetrc";
const std::string LocalHighScoresFileName="/.bastetscores";
- const std::string GlobalHighScoresFileName="/var/games/bastet.scores2";
+ const std::string GlobalHighScoresFileName="/data/data/com.termux/files/usr/var/games/bastet.scores2";
bool HighScores::Qualifies(int score){
stable_sort(begin(),end());

10
packages/bastet/build.sh Normal file
View File

@ -0,0 +1,10 @@
TERMUX_PKG_HOMEPAGE=http://fph.altervista.org/prog/bastet.html
TERMUX_PKG_DESCRIPTION="Tetris clone with 'bastard' block-choosing AI"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
TERMUX_PKG_VERSION=0.43.2
TERMUX_PKG_SRCURL=https://github.com/fph/bastet/archive/$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=f219510afc1d83e4651fbffd5921b1e0b926d5311da4f8fa7df103dc7f2c403f
TERMUX_PKG_DEPENDS="boost, ncurses"
TERMUX_PKG_FOLDERNAME=bastet-$TERMUX_PKG_VERSION
TERMUX_PKG_BUILD_IN_SRC=yes

View File

@ -0,0 +1,24 @@
--- ../cache/bastet-0.43.2/Makefile 2015-08-30 07:04:24.000000000 +0000
+++ ./Makefile 2017-09-19 09:09:21.992227135 +0000
@@ -17,11 +17,19 @@
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)
-
+install:
+ cp bastet $(PREFIX)/bin
+ chmod +x $(PREFIX)/bin/bastet
+ mkdir -p $(PREFIX)/var/games
+ touch $(PREFIX)/var/games/bastet.scores2
+ chmod +w $(PREFIX)/var/games/bastet.scores2
+ mkdir -p $(PREFIX)/share/man/man6/
+ cp bastet.6 $(PREFIX)/share/man/man6/
+
clean:
rm -f $(SOURCES:.cpp=.o) $(TESTS:.cpp=.o) $(MAIN:.cpp=.o) $(PROGNAME)