New package: bastet-0.43.2

Close: #39558
This commit is contained in:
Alaisdair West 2022-10-03 20:37:25 +10:00 committed by Đoàn Trần Công Danh
parent e246559767
commit 584e806ba6
5 changed files with 71 additions and 0 deletions

9
srcpkgs/bastet/INSTALL Normal file
View file

@ -0,0 +1,9 @@
case "${ACTION}" in
post)
if [ ! -f ./var/games/bastet.scores2 ]; then
mkdir -p var/games
touch var/games/bastet.scores2
chmod 0666 var/games/bastet.scores2
fi
;;
esac

View file

@ -0,0 +1,10 @@
--- a/Ui.cpp
+++ b/Ui.cpp
@@ -27,6 +27,7 @@
#include <boost/format.hpp>
#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
+#include <sys/select.h>
using namespace std;
using namespace boost;

View file

@ -0,0 +1,21 @@
--- a/BastetBlockChooser.hpp
+++ b/BastetBlockChooser.hpp
@@ -23,8 +23,7 @@
#include "Well.hpp"
-#include <boost/tr1/tr1/unordered_set>
-#include <set>
+#include <boost/unordered_set.hpp>
#include <boost/functional/hash.hpp>
namespace Bastet{
@@ -75,7 +74,7 @@ namespace Bastet{
public:
Searcher(BlockType b, const Well *well, Vertex v, WellVisitor *visitor);
private:
- std::tr1::unordered_set<Vertex> _visited;
+ boost::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 @@
--- a/Config.cpp
+++ b/Config.cpp
@@ -187,7 +187,7 @@ namespace Bastet{
for(int difficulty=0;difficulty<num_difficulties;++difficulty){
int i=0;
BOOST_FOREACH(const HighScore &hs, _hs[difficulty]){
- ofs2<<str(scorer % difficulty % i) << " = \"" << hs.Scorer << "\"\n";
+ ofs2<<str(scorer % difficulty % i) << " = " << hs.Scorer << "\n";
ofs2<<str(score % difficulty % i) << " = " << hs.Score <<"\n";
i++;
}

20
srcpkgs/bastet/template Normal file
View file

@ -0,0 +1,20 @@
# Template file for 'bastet'
pkgname=bastet
version=0.43.2
revision=1
build_style=gnu-makefile
make_use_env=yes
makedepends="boost-devel ncurses-devel"
short_desc="Evil falling block game"
maintainer="Alaisdair West <alaisdair.west2@outlook.com>"
license="GPL-3.0-or-later"
homepage="http://fph.altervista.org/prog/bastet.html"
changelog="https://raw.githubusercontent.com/fph/bastet/master/NEWS"
distfiles="https://github.com/fph/${pkgname}/archive/refs/tags/${version}.tar.gz"
checksum=f219510afc1d83e4651fbffd5921b1e0b926d5311da4f8fa7df103dc7f2c403f
do_install() {
vbin ${pkgname}
vinstall ${pkgname}.desktop 0644 usr/share/applications
vinstall ${pkgname}.png 0644 usr/share/pixmaps
}