mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-26 09:46:09 +00:00
- Update to 0.43.2
- Take maintainership - Install desktop entry, icon, appdata file, documentation - Add support for global highscore table
This commit is contained in:
parent
166b8f5011
commit
3aa2f28b93
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=518095
@ -2,12 +2,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= bastet
|
||||
PORTVERSION= 0.43
|
||||
PORTREVISION= 14
|
||||
PORTVERSION= 0.43.2
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= http://fph.altervista.org/prog/files/
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= amdmi3@FreeBSD.org
|
||||
COMMENT= Ncurses Tetris clone which is harder than every other Tetris
|
||||
|
||||
LICENSE= GPLv3+
|
||||
@ -17,18 +16,27 @@ BROKEN_powerpc64= does not build
|
||||
|
||||
LIB_DEPENDS= libboost_program_options.so:devel/boost-libs
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= fph
|
||||
|
||||
USES= gmake localbase:ldflags ncurses tar:tgz
|
||||
|
||||
PLIST_FILES= bin/bastet man/man6/bastet.6.gz
|
||||
PORTDOCS= AUTHORS README NEWS
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e \
|
||||
's|^CXXFLAGS+=-D|CXXFLAGS+=$$(CPPFLAGS) -D| ; \
|
||||
s|$$(CXX) -MM|$$(CXX) $$(CXXFLAGS) -MM| ; \
|
||||
s| -ggdb | |' ${WRKSRC}/Makefile
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/bastet ${STAGEDIR}${PREFIX}/bin
|
||||
${INSTALL_MAN} ${WRKSRC}/bastet.6 ${STAGEDIR}${MAN6PREFIX}/man/man6
|
||||
${INSTALL_MAN} ${WRKSRC}/bastet.6 ${STAGEDIR}${MAN6PREFIX}/man/man6/
|
||||
@${MKDIR} ${STAGEDIR}/var/games
|
||||
${TOUCH} ${STAGEDIR}/var/games/bastet.scores2.sample
|
||||
${INSTALL_DATA} ${WRKSRC}/bastet.png ${STAGEDIR}${PREFIX}/share/pixmaps/
|
||||
${INSTALL_DATA} ${WRKSRC}/bastet.desktop ${STAGEDIR}${PREFIX}/share/applications/
|
||||
@${MKDIR} ${STAGEDIR}${PREFIX}/share/appdata/
|
||||
${INSTALL_DATA} ${WRKSRC}/bastet.appdata.xml ${STAGEDIR}${PREFIX}/share/appdata/
|
||||
|
||||
do-install-DOCS-on:
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,3 @@
|
||||
SHA256 (bastet-0.43.tgz) = e208c68684cc9b818a08b0d3f5f1e7ef381b1e4d8bc801a90b5ff6a8f00d8168
|
||||
SIZE (bastet-0.43.tgz) = 29115
|
||||
TIMESTAMP = 1574284007
|
||||
SHA256 (fph-bastet-0.43.2_GH0.tar.gz) = f219510afc1d83e4651fbffd5921b1e0b926d5311da4f8fa7df103dc7f2c403f
|
||||
SIZE (fph-bastet-0.43.2_GH0.tar.gz) = 87496
|
||||
|
@ -1,47 +1,20 @@
|
||||
--- BastetBlockChooser.hpp.orig 2009-03-21 06:49:31.000000000 +0900
|
||||
+++ BastetBlockChooser.hpp 2013-11-29 22:35:48.000000000 +0900
|
||||
@@ -23,19 +23,32 @@
|
||||
--- BastetBlockChooser.hpp.orig 2015-08-30 07:04:24 UTC
|
||||
+++ BastetBlockChooser.hpp
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "Well.hpp"
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
#include <tr1/unordered_set>
|
||||
+#else
|
||||
+#include <unordered_set>
|
||||
+#endif
|
||||
-#include <boost/tr1/tr1/unordered_set>
|
||||
+#include <boost/unordered_set.hpp>
|
||||
#include <set>
|
||||
#include <boost/functional/hash.hpp>
|
||||
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
//boilerplate to use boost::hash as std::tr1::hash
|
||||
namespace std{namespace tr1{
|
||||
+#else
|
||||
+//boilerplate to use boost::hash as std::hash
|
||||
+namespace std{
|
||||
+#endif
|
||||
template<> struct hash<Bastet::BlockPosition>{
|
||||
size_t operator()(const Bastet::BlockPosition &fb) const{
|
||||
static boost::hash<Bastet::BlockPosition> h;
|
||||
return h(fb);
|
||||
}
|
||||
};
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
}}
|
||||
+#else
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
namespace Bastet{
|
||||
|
||||
@@ -83,7 +96,11 @@
|
||||
@@ -75,7 +75,7 @@ namespace Bastet{
|
||||
public:
|
||||
Searcher(BlockType b, const Well *well, Vertex v, WellVisitor *visitor);
|
||||
private:
|
||||
+#if !defined(_LIBCPP_VERSION)
|
||||
std::tr1::unordered_set<Vertex> _visited;
|
||||
+#else
|
||||
+ std::unordered_set<Vertex> _visited;
|
||||
+#endif
|
||||
- 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;
|
||||
|
28
games/bastet/files/patch-Makefile
Normal file
28
games/bastet/files/patch-Makefile
Normal file
@ -0,0 +1,28 @@
|
||||
--- Makefile.orig 2015-08-30 07:04:24 UTC
|
||||
+++ Makefile
|
||||
@@ -5,22 +5,17 @@ PROGNAME=bastet
|
||||
BOOST_PO?=-lboost_program_options
|
||||
LDFLAGS+=-lncurses $(BOOST_PO)
|
||||
#CXXFLAGS+=-ggdb -Wall
|
||||
-CXXFLAGS+=-DNDEBUG -Wall
|
||||
+CXXFLAGS+=-Wall
|
||||
#CXXFLAGS+=-pg
|
||||
#LDFLAGS+=-pg
|
||||
|
||||
all: $(PROGNAME) $(TESTS:.cpp=)
|
||||
|
||||
Test: $(SOURCES:.cpp=.o) $(TESTS:.cpp=.o)
|
||||
- $(CXX) -ggdb -o $(TESTS:.cpp=) $(SOURCES:.cpp=.o) $(TESTS:.cpp=.o) $(LDFLAGS)
|
||||
+ $(CXX) -o $(TESTS:.cpp=) $(SOURCES:.cpp=.o) $(TESTS:.cpp=.o) $(LDFLAGS)
|
||||
|
||||
-depend: *.hpp $(SOURCES) $(MAIN) $(TESTS)
|
||||
- $(CXX) -MM $(SOURCES) $(MAIN) $(TESTS)> depend
|
||||
-
|
||||
-include depend
|
||||
-
|
||||
$(PROGNAME): $(SOURCES:.cpp=.o) $(MAIN:.cpp=.o)
|
||||
- $(CXX) -ggdb -o $(PROGNAME) $(SOURCES:.cpp=.o) $(MAIN:.cpp=.o) $(LDFLAGS)
|
||||
+ $(CXX) -o $(PROGNAME) $(SOURCES:.cpp=.o) $(MAIN:.cpp=.o) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f $(SOURCES:.cpp=.o) $(TESTS:.cpp=.o) $(MAIN:.cpp=.o) $(PROGNAME)
|
@ -1,49 +0,0 @@
|
||||
Ui.cpp:174:18: error: non-constant-expression cannot be narrowed from type 'unsigned long' to 'int' in initializer list [-Wc++11-narrowing]
|
||||
return (Dot){maxlen+1,splits.size()};
|
||||
^~~~~~~~
|
||||
Ui.cpp:174:18: note: insert an explicit cast to silence this issue
|
||||
return (Dot){maxlen+1,splits.size()};
|
||||
^~~~~~~~
|
||||
static_cast<int>( )
|
||||
Ui.cpp:174:27: error: non-constant-expression cannot be narrowed from type 'std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >::size_type' (aka 'unsigned long') to 'int' in initializer list [-Wc++11-narrowing]
|
||||
return (Dot){maxlen+1,splits.size()};
|
||||
^~~~~~~~~~~~~
|
||||
Ui.cpp:174:27: note: insert an explicit cast to silence this issue
|
||||
return (Dot){maxlen+1,splits.size()};
|
||||
^~~~~~~~~~~~~
|
||||
static_cast<int>( )
|
||||
Ui.cpp:236:12: error: non-constant-expression cannot be narrowed from type 'unsigned long' to 'int' in initializer list [-Wc++11-narrowing]
|
||||
Dot d={width+5,choices.size()};
|
||||
^~~~~~~
|
||||
Ui.cpp:236:12: note: insert an explicit cast to silence this issue
|
||||
Dot d={width+5,choices.size()};
|
||||
^~~~~~~
|
||||
static_cast<int>( )
|
||||
Ui.cpp:236:20: error: non-constant-expression cannot be narrowed from type 'std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >::size_type' (aka 'unsigned long') to 'int' in initializer list [-Wc++11-narrowing]
|
||||
Dot d={width+5,choices.size()};
|
||||
^~~~~~~~~~~~~~
|
||||
Ui.cpp:236:20: note: insert an explicit cast to silence this issue
|
||||
Dot d={width+5,choices.size()};
|
||||
^~~~~~~~~~~~~~
|
||||
static_cast<int>( )
|
||||
|
||||
--- Ui.cpp.orig 2009-03-20 21:49:31 UTC
|
||||
+++ Ui.cpp
|
||||
@@ -171,7 +171,7 @@ namespace Bastet{
|
||||
BOOST_FOREACH(string &s, splits){
|
||||
maxlen=max(maxlen,s.size());
|
||||
}
|
||||
- return (Dot){maxlen+1,splits.size()};
|
||||
+ return (Dot){(int)(maxlen+1),(int)splits.size()};
|
||||
}
|
||||
|
||||
void Ui::MessageDialog(const std::string &message){
|
||||
@@ -233,7 +233,7 @@ namespace Bastet{
|
||||
width=max(width,s.size());
|
||||
}
|
||||
|
||||
- Dot d={width+5,choices.size()};
|
||||
+ Dot d={(int)(width+5),(int)choices.size()};
|
||||
BorderedWindow w(d.y,d.x);
|
||||
wattrset((WINDOW *)w,COLOR_PAIR(20));
|
||||
for(size_t i=0;i<choices.size();++i){
|
6
games/bastet/pkg-plist
Normal file
6
games/bastet/pkg-plist
Normal file
@ -0,0 +1,6 @@
|
||||
@(,games,2555) bin/bastet
|
||||
man/man6/bastet.6.gz
|
||||
share/appdata/bastet.appdata.xml
|
||||
share/applications/bastet.desktop
|
||||
share/pixmaps/bastet.png
|
||||
@sample(,games,664) /var/games/bastet.scores2.sample
|
Loading…
Reference in New Issue
Block a user