GNU bug report logs - #32928
[PATCH] gnu: Add bastet.

Previous Next

Package: guix-patches;

Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Date: Thu, 4 Oct 2018 03:01:02 UTC

Severity: normal

Tags: patch

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32928 in the body.
You can then email your comments to 32928 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#32928; Package guix-patches. (Thu, 04 Oct 2018 03:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 04 Oct 2018 03:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add bastet.
Date: Thu,  4 Oct 2018 04:53:19 +0200
* gnu/packages/games.scm (bastet): New public variable.
* gnu/packages/patches/bastet-change-source-of-unordered_set.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---

The Chromium of tetroids.

 gnu/local.mk                                  |  1 +
 gnu/packages/games.scm                        | 64 +++++++++++++++++++
 ...astet-change-source-of-unordered_set.patch | 40 ++++++++++++
 3 files changed, 105 insertions(+)
 create mode 100644 gnu/packages/patches/bastet-change-source-of-unordered_set.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 4152696a7..101399d9b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -591,6 +591,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/awesome-reproducible-png.patch		\
   %D%/packages/patches/azr3.patch				\
   %D%/packages/patches/bash-completion-directories.patch	\
+  %D%/packages/patches/bastet-change-source-of-unordered_set.patch	\
   %D%/packages/patches/bazaar-CVE-2017-14176.patch		\
   %D%/packages/patches/beignet-correct-file-names.patch		\
   %D%/packages/patches/binutils-aarch64-symbol-relocation.patch	\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index ec92f508b..9ee22191a 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -181,6 +181,70 @@ more advanced player there are new game modes and a wide variety of physics
 settings to tweak as well.")
     (license license:gpl2+)))
 
+(define-public bastet
+  (package
+    (name "bastet")
+    (version "0.43.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/fph/bastet.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "09kamxapm9jw9przpsgjfg33n9k94bccv65w95dakj0br33a75wn"))
+       (patches
+        (search-patches "bastet-change-source-of-unordered_set.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (list (string-append "CXXFLAGS=-I"
+                            (assoc-ref %build-inputs "boost") "/include"))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ; no configure script
+         (replace 'check
+           ;; The 'Test' target builds the test, but doesn't actually run it.
+           (lambda* (#:key make-flags #:allow-other-keys)
+             (apply invoke "make" "Test" make-flags)
+             (setenv "HOME" ".")
+             (invoke "./Test")))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out     (assoc-ref outputs "out"))
+                    (share   (string-append out "/share"))
+                    (hicolor (string-append share "/icons/hicolor")))
+               (install-file "bastet"
+                             (string-append out "/bin"))
+
+               (install-file "bastet.desktop"
+                             (string-append share "/applications"))
+               (install-file "bastet.svg"
+                             (string-append hicolor "/scalable/apps"))
+
+               (install-file "bastet.appdata.xml"
+                             (string-append share "/appdata"))
+
+               (install-file "bastet.6"
+                             (string-append out "/share/man/man6"))
+               #t))))))
+    (native-inputs
+     `(("hicolor-icon-theme" ,hicolor-icon-theme)))
+    (inputs
+     `(("boost" ,boost)
+       ("ncurses" ,ncurses)))
+    (home-page "http://fph.altervista.org/prog/bastet.html")
+    (synopsis "Antagonistic Tetris-style falling brick game for text terminals")
+    (description
+     "Bastet (short for Bastard Tetris) is a simple ncurses-based falling brick
+game.  Unlike normal Tetris, Bastet does not choose the next brick at random.
+Instead, it uses a special algorithm to choose the worst brick possible.
+
+Playing bastet can be a painful experience, especially if you usually make
+canyons and wait for the long I-shaped block to clear four rows at a time.")
+    (license license:gpl3+)))
+
 (define-public cataclysm-dda
   (let ((commit "ad3b0c3d521292d119f97a83390e7acfe9e9e7f7")
         (revision "1"))
diff --git a/gnu/packages/patches/bastet-change-source-of-unordered_set.patch b/gnu/packages/patches/bastet-change-source-of-unordered_set.patch
new file mode 100644
index 000000000..ef3970a3e
--- /dev/null
+++ b/gnu/packages/patches/bastet-change-source-of-unordered_set.patch
@@ -0,0 +1,40 @@
+From: Tobias Geerinckx-Rice <me <at> tobias.gr>
+Date: Wed, 3 Oct 2018 23:30:42 +0200
+Subject: [PATCH] bastet: Change source of unordered_set.
+
+This allows building bastet 0.43.2 with boost >=1.66.
+It was backported verbatim from the upstream master branch.
+
+From 0e03f8d4d6bc6949cf1c447e632ce0d1b98c4be1 Mon Sep 17 00:00:00 2001
+From: Federico Poloni <fpoloni <at> di.unipi.it>
+Date: Wed, 4 Oct 2017 19:35:01 +0200
+Subject: [PATCH] Changed source of unordered_set (should hopefully fix #6
+ without reopening #1)
+
+---
+ BastetBlockChooser.hpp | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/BastetBlockChooser.hpp b/BastetBlockChooser.hpp
+index 992e556..7ee3b7c 100644
+--- 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;
-- 
2.18.0





Information forwarded to guix-patches <at> gnu.org:
bug#32928; Package guix-patches. (Fri, 05 Oct 2018 02:25:02 GMT) Full text and rfc822 format available.

Message #8 received at 32928 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 32928 <at> debbugs.gnu.org
Subject: Re: [bug#32928] [PATCH] gnu: Add bastet.
Date: Thu, 4 Oct 2018 22:24:36 -0400
[Message part 1 (text/plain, inline)]
On Thu, Oct 04, 2018 at 04:53:19AM +0200, Tobias Geerinckx-Rice wrote:
> * gnu/packages/games.scm (bastet): New public variable.
> * gnu/packages/patches/bastet-change-source-of-unordered_set.patch:
> New file.
> * gnu/local.mk (dist_patch_DATA): Add it.

LGTM, thanks!
[signature.asc (application/pgp-signature, inline)]

Reply sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
You have taken responsibility. (Fri, 05 Oct 2018 17:35:02 GMT) Full text and rfc822 format available.

Notification sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
bug acknowledged by developer. (Fri, 05 Oct 2018 17:35:03 GMT) Full text and rfc822 format available.

Message #13 received at 32928-done <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Leo Famulari <leo <at> famulari.name>
Cc: 32928-done <at> debbugs.gnu.org
Subject: Re: [bug#32928] [PATCH] gnu: Add bastet.
Date: Fri, 05 Oct 2018 19:34:32 +0200
Leo,

Leo Famulari wrote:
> On Thu, Oct 04, 2018 at 04:53:19AM +0200, Tobias Geerinckx-Rice 
> wrote:
>> * gnu/packages/games.scm (bastet): New public variable.
>> * 
>> gnu/packages/patches/bastet-change-source-of-unordered_set.patch:
>> New file.
>> * gnu/local.mk (dist_patch_DATA): Add it.
>
> LGTM, thanks!

Thank you! Pushed as fc4738149f5cbaffc8e0b37bfb61e25fac0ecd67.

Kind regards,

T G-R




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 03 Nov 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.