[packages/bastet] - updated to 0.43.2 - added boost patch (fix build with recent boost)

qboosh qboosh at pld-linux.org
Wed Jul 29 21:35:19 CEST 2020


commit 330f64e3a39ef3095cc203242ec030e93af5a83b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Jul 29 21:37:08 2020 +0200

    - updated to 0.43.2
    - added boost patch (fix build with recent boost)

 bastet-boost.patch | 20 ++++++++++++++++++++
 bastet.spec        | 33 ++++++++++++++++++---------------
 2 files changed, 38 insertions(+), 15 deletions(-)
---
diff --git a/bastet.spec b/bastet.spec
index e639591..c4a59be 100644
--- a/bastet.spec
+++ b/bastet.spec
@@ -2,15 +2,17 @@ Summary:	Tetris game
 Summary(hu.UTF-8):	Egy Tetris-klón
 Summary(pl.UTF-8):	Gra typu tetris
 Name:		bastet
-Version:	0.43
-Release:	22
+Version:	0.43.2
+Release:	1
 License:	GPL v3+
 Group:		X11/Applications/Games
-Source0:	http://fph.altervista.org/prog/files/%{name}-%{version}.tgz
-# Source0-md5:	b47090daa7b6d89b98b5b477cf155733
+#Source0Download: https://github.com/fph/bastet/releases
+Source0:	https://github.com/fph/bastet/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	aee009b77b8cf9516d686bd24673800e
+Patch0:		%{name}-boost.patch
 URL:		http://fph.altervista.org/prog/bastet.html
 BuildRequires:	boost-devel
-BuildRequires:	ncurses-devel
+BuildRequires:	ncurses-devel >= 6
 BuildRequires:	sed >= 4.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -26,26 +28,27 @@ Bastet a "bastard tetris" rövidítése, és egy egyszerű ncurses-alapú
 Tetris(R)-klón Linux-ra. A hagyományos Tetris(R)-szel ellentétben a
 Bastet a következő elemet nem véletlenszerűen választja, hanem egy
 speciális algoritmust használ, amellyel a lehető legrosszabb elemet
-választja ki. Gondolhatod, hogy a Bastet-tel való játék nagyon mennyire
-frusztráló lehet!
+választja ki. Gondolhatod, hogy a Bastet-tel való játék nagyon
+mennyire frusztráló lehet!
 
 %description -l pl.UTF-8
-Bastet oznacza "bastard tetris". Jest to prosty klon gry tetris z tekstowym
-interfejsem użytkownika opartym o bibliotekę ncurses. W odróżnieniu od innych
-implementacji gry tetris Bastet używa wyrafinowanego algorytmu, który dobiera
-zawsze najgorszy klocek do aktualnej sytuacji. Można się zatem domyślić, że
-granie w Bastet jest bardzo frustrującym przeżyciem.
+Bastet oznacza "bastard tetris". Jest to prosty klon gry tetris z
+tekstowym interfejsem użytkownika opartym o bibliotekę ncurses. W
+odróżnieniu od innych implementacji gry tetris Bastet używa
+wyrafinowanego algorytmu, który dobiera zawsze najgorszy klocek do
+aktualnej sytuacji. Można się zatem domyślić, że granie w Bastet jest
+bardzo frustrującym przeżyciem.
 
 %prep
 %setup -q
-%{__sed} -i 's at curses.h@ncurses/curses.h@' *.?pp
+%patch0 -p1
 
 %build
 NCURSES_LIBS=$(ncurses6-config --libs)
 %{__make} \
 	CXX="%{__cxx}" \
 	CXXFLAGS="%{rpmcxxflags}" \
-	LDFLAGS="%{rpmldflags} $NCURSES_LIBS"
+	LDFLAGS="%{rpmldflags} $NCURSES_LIBS -lboost_program_options"
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -59,4 +62,4 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS NEWS README
-%attr(755,root,root) %{_bindir}/%{name}
+%attr(755,root,root) %{_bindir}/bastet
diff --git a/bastet-boost.patch b/bastet-boost.patch
new file mode 100644
index 0000000..1b1d8ca
--- /dev/null
+++ b/bastet-boost.patch
@@ -0,0 +1,20 @@
+--- bastet-0.43.2/BastetBlockChooser.hpp.orig	2015-08-30 09:04:24.000000000 +0200
++++ bastet-0.43.2/BastetBlockChooser.hpp	2020-07-29 21:32:35.650073713 +0200
+@@ -23,7 +23,7 @@
+ 
+ #include "Well.hpp"
+ 
+-#include <boost/tr1/tr1/unordered_set>
++#include <boost/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_set<Vertex> _visited;
+     //std::set<Vertex> _visited; ^^ the above is more efficient, we need to do many inserts
+     BlockType _block;
+     const Well *_well;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/bastet.git/commitdiff/330f64e3a39ef3095cc203242ec030e93af5a83b



More information about the pld-cvs-commit mailing list