all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#27691] [PATCH 1/2] gnu: Add premake4.
@ 2017-07-14 12:41 Oleg Pykhalov
  2017-07-14 12:41 ` [bug#27691] [PATCH 2/2] gnu: Add t-engine Oleg Pykhalov
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Oleg Pykhalov @ 2017-07-14 12:41 UTC (permalink / raw)
  To: 27691

* gnu/packages/build-tools.scm (premake4): New variable.
---
 gnu/packages/build-tools.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 66f46433f..995d77698 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -23,6 +23,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (gnu packages)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages python)
   #:use-module (gnu packages ninja)
   #:use-module (guix build-system gnu)
@@ -90,3 +91,36 @@ Autoconf/Automake/make combo.  Build specifications, also known as @dfn{Meson
 files}, are written in a custom domain-specific language (DSL) that resembles
 Python.")
     (license license:asl2.0)))
+
+(define-public premake4
+  (package
+    (name "premake4")
+    (version "4.3")
+    (source (origin
+	      (method url-fetch)
+	      (uri (string-append "http://downloads.sourceforge.net/project/premake/Premake/"
+				  version "/premake-" version "-src.zip"))
+	      (sha256
+	       (base32
+		"1017rd0wsjfyq2jvpjjhpszaa7kmig6q1nimw76qx3cjz2868lrn"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("unzip" ,unzip))) ; for unpacking the source
+    (arguments
+     `(#:make-flags '("CC=gcc")
+       #:tests? #f ; No test suite
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+	 (add-after 'unpack 'enter-source
+           (lambda _ (chdir "build/gmake.unix") #t))
+	 (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "../../bin/release/premake4"
+                           (string-append (assoc-ref outputs "out") "/bin"))
+             #t)))))
+    (synopsis "A makefile generation tool")
+    (description "@code{premake4} is a command line utility which reads a
+scripted definition of a software project.")
+    (home-page "https://premake.github.io")
+    (license license:bsd-3)))
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#27691] [PATCH 2/2] gnu: Add t-engine.
  2017-07-14 12:41 [bug#27691] [PATCH 1/2] gnu: Add premake4 Oleg Pykhalov
@ 2017-07-14 12:41 ` Oleg Pykhalov
  2017-07-14 12:50 ` [bug#27691] Specify version Oleg Pykhalov
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 16+ messages in thread
From: Oleg Pykhalov @ 2017-07-14 12:41 UTC (permalink / raw)
  To: 27691

* gnu/packages/games.scm (t-engine): New variable.
---
 gnu/packages/games.scm                             | 90 ++++++++++++++++++++++
 .../patches/t-engine-add-desktop-file.patch        | 27 +++++++
 .../t-engine-add-shell-wrapper-for-launching.patch | 23 ++++++
 gnu/packages/patches/t-engine-fix-sdl-h-path.patch | 39 ++++++++++
 4 files changed, 179 insertions(+)
 create mode 100644 gnu/packages/patches/t-engine-add-desktop-file.patch
 create mode 100644 gnu/packages/patches/t-engine-add-shell-wrapper-for-launching.patch
 create mode 100644 gnu/packages/patches/t-engine-fix-sdl-h-path.patch

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 2bef92b93..fe08ffe5d 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4578,3 +4578,93 @@ computer-hosted roleplaying games.  This is the last version released by
 Crowther & Woods, its original authors, in 1995.  It has been known as
 \"adventure 2.5\" and \"430-point adventure\".")
       (license license:bsd-2))))
+
+(define-public tome4
+  (package
+    (name "tome4")
+    (version "1.5.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://te4.org/dl/t-engine/t-engine4-src-"
+			   version ".tar.bz2"))
+       (sha256
+	(base32
+	 "0v2qgdfpvdzd1bcbp9v8pfahj1bgczsq2d4xfhh5wg11jgjcwz03"))
+       (patches (search-patches "t-engine-fix-sdl-h-path.patch"
+				"t-engine-add-shell-wrapper-for-launching.patch"
+				"t-engine-add-desktop-file.patch"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (inputs
+     `(("sdl-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
+       ("glu" ,glu)
+       ("premake4" ,premake4)
+       ("openal" ,openal)
+       ("vorbis" ,libvorbis)
+       ("luajit" ,luajit)))
+    (arguments
+     `(#:make-flags '("CC=gcc" "config=release")
+       #:phases (modify-phases %standard-phases
+		  (replace 'configure
+		    (lambda _
+		      (zero? (system* "premake4" "gmake"))))
+		  (add-after 'set-paths 'set-sdl-paths
+		    (lambda* (#:key inputs #:allow-other-keys)
+		      (setenv "CPATH"
+			      (string-append (assoc-ref inputs "sdl-union")
+					     "/include/SDL2"))))
+		  (add-after 'unpack 'fix-path
+		    (lambda* (#:key inputs outputs #:allow-other-keys)
+		      (substitute* "tome4"
+			(("cd \"/opt")
+			 (string-append "cd \"" (assoc-ref outputs "out") "/usr/games")))
+		      (substitute* "tome4.desktop"
+			(("Exec=/usr")
+			 (string-append "Exec=" (assoc-ref outputs "out") "/usr")))
+		      #t))
+		  (delete 'check)
+		  ;; premake4 doesn't provide install target
+		  (replace 'install
+		    (lambda* (#:key inputs outputs #:allow-other-keys)
+		      (let* ((out (assoc-ref outputs "out"))
+			     (usr (string-append out "/usr"))
+			     (bin (string-append out "/bin"))
+			     (share (string-append usr "/share"))
+			     (pixmaps (string-append share "/pixmaps"))
+			     (data (string-append usr "/games/tome4"))
+			     (unzip (string-append (assoc-ref inputs "unzip") "/bin/unzip")))
+			;; icon
+			(mkdir-p pixmaps)
+			(system* unzip "-j" "game/engines/te4-1.5.5.teae"
+				 "data/gfx/te4-icon.png" "-d" pixmaps)
+			;; game executable
+			(install-file "t-engine" data)
+			;; licenses
+			(for-each (lambda (file)
+				    (install-file file (string-append share "/licenses")))
+				  '("COPYING" "COPYING-MEDIA"))
+			;; documents
+			(for-each (lambda (file)
+				    (install-file file (string-append share "/doc")))
+				  '("CONTRIBUTING" "CREDITS"))
+			;; data
+			(copy-recursively "bootstrap" (string-append data "/bootstrap"))
+			(copy-recursively "game" (string-append data "/game"))
+			;; launcher
+			(install-file "tome4" bin)
+			(chmod (string-append bin "/tome4") #o555)
+			(install-file "tome4.desktop" (string-append share "/applications")))
+		      #t)))))
+    (home-page "https://te4.org")
+    (synopsis "Roguelike RPG")
+    (description "Tales of Maj’Eyal (ToME) is a free, open source roguelike
+RPG, featuring tactical turn-based combat and advanced character building.
+Play as one of many unique races and classes in the lore-filled world of Eyal,
+exploring random dungeons, facing challenging battles, and developing
+characters with your own tailored mix of abilities and powers.  With a modern
+graphical and customisable interface, intuitive mouse control, streamlined
+mechanics and deep, challenging combat, Tales of Maj’Eyal offers engaging
+roguelike gameplay for the 21st century.")
+    (license license:gpl3+)))
diff --git a/gnu/packages/patches/t-engine-add-desktop-file.patch b/gnu/packages/patches/t-engine-add-desktop-file.patch
new file mode 100644
index 000000000..80fd82478
--- /dev/null
+++ b/gnu/packages/patches/t-engine-add-desktop-file.patch
@@ -0,0 +1,27 @@
+From b8e207e145938f7a0f23d1c5107d532ebb9de720 Mon Sep 17 00:00:00 2001
+From: Oleg Pykhalov <go.wigust@gmail.com>
+Date: Fri, 14 Jul 2017 11:19:37 +0300
+Subject: [PATCH] Add desktop file.
+
+---
+ tome4.desktop | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 tome4.desktop
+
+diff --git a/tome4.desktop b/tome4.desktop
+new file mode 100644
+index 000000000..c5d67f0cf
+--- /dev/null
++++ b/tome4.desktop
+@@ -0,0 +1,8 @@
++[Desktop Entry]
++Name=ToME4
++Comment=An open-source, single-player, role-playing roguelike game set in the world of Eyal.
++Exec=/usr/bin/tome4
++Icon=tome4.png
++Terminal=false
++Type=Application
++Categories=Game;RolePlaying;
+-- 
+2.13.2
+
diff --git a/gnu/packages/patches/t-engine-add-shell-wrapper-for-launching.patch b/gnu/packages/patches/t-engine-add-shell-wrapper-for-launching.patch
new file mode 100644
index 000000000..4df93c057
--- /dev/null
+++ b/gnu/packages/patches/t-engine-add-shell-wrapper-for-launching.patch
@@ -0,0 +1,23 @@
+From f10d89912989e0f071855ab2c20d62b318d313fc Mon Sep 17 00:00:00 2001
+From: Oleg Pykhalov <go.wigust@gmail.com>
+Date: Fri, 14 Jul 2017 11:17:26 +0300
+Subject: [PATCH] Add shell wrapper for launching.
+
+---
+ tome4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 tome4
+
+diff --git a/tome4 b/tome4
+new file mode 100644
+index 000000000..2b623e467
+--- /dev/null
++++ b/tome4
+@@ -0,0 +1,4 @@
++#!/usr/bin/sh
++cd "/opt/tome4"
++./t-engine &
++exit
+-- 
+2.13.2
+
diff --git a/gnu/packages/patches/t-engine-fix-sdl-h-path.patch b/gnu/packages/patches/t-engine-fix-sdl-h-path.patch
new file mode 100644
index 000000000..dd550632d
--- /dev/null
+++ b/gnu/packages/patches/t-engine-fix-sdl-h-path.patch
@@ -0,0 +1,39 @@
+From 2c3eedcccf2da85cffa08baefa6e437c819276e6 Mon Sep 17 00:00:00 2001
+From: Oleg Pykhalov <go.wigust@gmail.com>
+Date: Mon, 3 Apr 2017 16:20:48 +0300
+Subject: [PATCH] Fix make -k config=release for GNUC
+
+---
+ src/music.h | 2 +-
+ src/tSDL.h  | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/music.h b/src/music.h
+index 894426cb8..c8490e456 100644
+--- a/src/music.h
++++ b/src/music.h
+@@ -27,7 +27,7 @@
+ #include <vorbis/vorbisfile.h>
+ #include <SDL2/SDL.h>
+ #include <SDL2/SDL_thread.h>
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__GNUC__)
+ #include <AL/al.h>
+ #include <AL/alc.h>
+ #include <vorbis/vorbisfile.h>
+diff --git a/src/tSDL.h b/src/tSDL.h
+index a7d36c92f..4f7690255 100644
+--- a/src/tSDL.h
++++ b/src/tSDL.h
+@@ -3,7 +3,7 @@
+ #include <SDL2_ttf/SDL_ttf.h>
+ //#include <SDL2_mixer/SDL_mixer.h>
+ #include <SDL2_image/SDL_image.h>
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__GNUC__)
+ #include <SDL2/SDL.h>
+ #include <SDL2/SDL_ttf.h>
+ //#include <SDL2/SDL_mixer.h>
+-- 
+2.13.2
+
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#27691] Specify version
  2017-07-14 12:41 [bug#27691] [PATCH 1/2] gnu: Add premake4 Oleg Pykhalov
  2017-07-14 12:41 ` [bug#27691] [PATCH 2/2] gnu: Add t-engine Oleg Pykhalov
@ 2017-07-14 12:50 ` Oleg Pykhalov
  2017-07-17 15:58 ` [bug#27691] Tabs and patches names Oleg Pykhalov
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 16+ messages in thread
From: Oleg Pykhalov @ 2017-07-14 12:50 UTC (permalink / raw)
  To: 27691

I'm not sure how to specify version (instead 1.5.5) of package inside
'install phase.  :-(

;; icon
(mkdir-p pixmaps)
(system* unzip "-j" "game/engines/te4-1.5.5.teae"
	 "data/gfx/te4-icon.png" "-d" pixmaps)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27691] Tabs and patches names
  2017-07-14 12:41 [bug#27691] [PATCH 1/2] gnu: Add premake4 Oleg Pykhalov
  2017-07-14 12:41 ` [bug#27691] [PATCH 2/2] gnu: Add t-engine Oleg Pykhalov
  2017-07-14 12:50 ` [bug#27691] Specify version Oleg Pykhalov
@ 2017-07-17 15:58 ` Oleg Pykhalov
  2017-07-20  9:19   ` Ludovic Courtès
  2017-07-17 16:02 ` [bug#27691] Fix spaces Oleg Pykhalov
  2017-07-28 23:06 ` [bug#27691] Clean up tome4 Oleg Pykhalov
  4 siblings, 1 reply; 16+ messages in thread
From: Oleg Pykhalov @ 2017-07-17 15:58 UTC (permalink / raw)
  To: 27691

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]

I replaced tabs with spaces (emacs via tramp ignores .dir-locals.el) and
renamed patches as package name.  Will try to find a way to specify
version.  If somewhere I did wrong let me know, please.


[-- Attachment #2: Tabs and patches names --]
[-- Type: text/x-patch, Size: 9509 bytes --]

From 39f61dbcc0b7b09a325536149eee6c69c7526b4e Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Fri, 14 Jul 2017 15:34:33 +0300
Subject: [PATCH] gnu: Add tome4.

* gnu/packages/games.scm (tome4): New variable.
---
 gnu/packages/games.scm                             | 99 ++++++++++++++++++++++
 gnu/packages/patches/tome4-add-desktop-file.patch  | 27 ++++++
 .../tome4-add-shell-wrapper-for-launching.patch    | 23 +++++
 gnu/packages/patches/tome4-fix-sdl-h-path.patch    | 39 +++++++++
 4 files changed, 188 insertions(+)
 create mode 100644 gnu/packages/patches/tome4-add-desktop-file.patch
 create mode 100644 gnu/packages/patches/tome4-add-shell-wrapper-for-launching.patch
 create mode 100644 gnu/packages/patches/tome4-fix-sdl-h-path.patch

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 2dec9a395..834008be7 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4579,3 +4579,102 @@ computer-hosted roleplaying games.  This is the last version released by
 Crowther & Woods, its original authors, in 1995.  It has been known as
 \"adventure 2.5\" and \"430-point adventure\".")
       (license license:bsd-2))))
+
+(define-public tome4
+  (package
+    (name "tome4")
+    (version "1.5.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://te4.org/dl/t-engine/t-engine4-src-"
+                           version ".tar.bz2"))
+       (sha256
+        (base32
+         "0v2qgdfpvdzd1bcbp9v8pfahj1bgczsq2d4xfhh5wg11jgjcwz03"))
+       (patches (search-patches "tome4-fix-sdl-h-path.patch"
+                                "tome4-add-shell-wrapper-for-launching.patch"
+                                "tome4-add-desktop-file.patch"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (inputs
+     `(("sdl-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
+       ("glu" ,glu)
+       ("premake4" ,premake4)
+       ("openal" ,openal)
+       ("vorbis" ,libvorbis)
+       ("luajit" ,luajit)))
+    (arguments
+     `(#:make-flags '("CC=gcc" "config=release")
+       #:phases (modify-phases %standard-phases
+                  (replace 'configure
+                    (lambda _
+                      (zero? (system* "premake4" "gmake"))))
+                  (add-after 'set-paths 'set-sdl-paths
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (setenv "CPATH"
+                              (string-append (assoc-ref inputs "sdl-union")
+                                             "/include/SDL2"))))
+                  (add-after 'unpack 'fix-path
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (substitute* "tome4"
+                        (("cd \"/opt")
+                         (string-append "cd \""
+                                        (assoc-ref outputs "out")
+                                        "/usr/games")))
+                      (substitute* "tome4.desktop"
+                        (("Exec=/usr")
+                         (string-append "Exec="
+                                        (assoc-ref outputs "out")
+                                        "/usr")))
+                      #t))
+                  (delete 'check)
+                  ;; premake4 doesn't provide install target
+                  (replace 'install
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (usr (string-append out "/usr"))
+                             (bin (string-append out "/bin"))
+                             (share (string-append usr "/share"))
+                             (pixmaps (string-append share "/pixmaps"))
+                             (data (string-append usr "/games/tome4"))
+                             (unzip (string-append
+                                     (assoc-ref inputs "unzip") "/bin/unzip")))
+                        ;; icon
+                        (mkdir-p pixmaps)
+                        (system* unzip "-j" "game/engines/te4-1.5.5.teae"
+                                 "data/gfx/te4-icon.png" "-d" pixmaps)
+                        ;; game executable
+                        (install-file "t-engine" data)
+                        ;; licenses
+                        (for-each (lambda (file)
+                                    (install-file file (string-append
+                                                        share "/licenses")))
+                                  '("COPYING" "COPYING-MEDIA"))
+                        ;; documents
+                        (for-each (lambda (file)
+                                    (install-file file (string-append
+                                                        share "/doc")))
+                                  '("CONTRIBUTING" "CREDITS"))
+                        ;; data
+                        (copy-recursively "bootstrap" (string-append
+                                                       data "/bootstrap"))
+                        (copy-recursively "game" (string-append data "/game"))
+                        ;; launcher
+                        (install-file "tome4" bin)
+                        (chmod (string-append bin "/tome4") #o555)
+                        (install-file "tome4.desktop" (string-append
+                                                       share "/applications")))
+                      #t)))))
+    (home-page "https://te4.org")
+    (synopsis "Roguelike RPG")
+    (description "Tales of Maj’Eyal (ToME) is a free, open source roguelike
+RPG, featuring tactical turn-based combat and advanced character building.
+Play as one of many unique races and classes in the lore-filled world of Eyal,
+exploring random dungeons, facing challenging battles, and developing
+characters with your own tailored mix of abilities and powers.  With a modern
+graphical and customisable interface, intuitive mouse control, streamlined
+mechanics and deep, challenging combat, Tales of Maj’Eyal offers engaging
+roguelike gameplay for the 21st century.")
+    (license license:gpl3+)))
diff --git a/gnu/packages/patches/tome4-add-desktop-file.patch b/gnu/packages/patches/tome4-add-desktop-file.patch
new file mode 100644
index 000000000..80fd82478
--- /dev/null
+++ b/gnu/packages/patches/tome4-add-desktop-file.patch
@@ -0,0 +1,27 @@
+From b8e207e145938f7a0f23d1c5107d532ebb9de720 Mon Sep 17 00:00:00 2001
+From: Oleg Pykhalov <go.wigust@gmail.com>
+Date: Fri, 14 Jul 2017 11:19:37 +0300
+Subject: [PATCH] Add desktop file.
+
+---
+ tome4.desktop | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+ create mode 100644 tome4.desktop
+
+diff --git a/tome4.desktop b/tome4.desktop
+new file mode 100644
+index 000000000..c5d67f0cf
+--- /dev/null
++++ b/tome4.desktop
+@@ -0,0 +1,8 @@
++[Desktop Entry]
++Name=ToME4
++Comment=An open-source, single-player, role-playing roguelike game set in the world of Eyal.
++Exec=/usr/bin/tome4
++Icon=tome4.png
++Terminal=false
++Type=Application
++Categories=Game;RolePlaying;
+-- 
+2.13.2
+
diff --git a/gnu/packages/patches/tome4-add-shell-wrapper-for-launching.patch b/gnu/packages/patches/tome4-add-shell-wrapper-for-launching.patch
new file mode 100644
index 000000000..4df93c057
--- /dev/null
+++ b/gnu/packages/patches/tome4-add-shell-wrapper-for-launching.patch
@@ -0,0 +1,23 @@
+From f10d89912989e0f071855ab2c20d62b318d313fc Mon Sep 17 00:00:00 2001
+From: Oleg Pykhalov <go.wigust@gmail.com>
+Date: Fri, 14 Jul 2017 11:17:26 +0300
+Subject: [PATCH] Add shell wrapper for launching.
+
+---
+ tome4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+ create mode 100644 tome4
+
+diff --git a/tome4 b/tome4
+new file mode 100644
+index 000000000..2b623e467
+--- /dev/null
++++ b/tome4
+@@ -0,0 +1,4 @@
++#!/usr/bin/sh
++cd "/opt/tome4"
++./t-engine &
++exit
+-- 
+2.13.2
+
diff --git a/gnu/packages/patches/tome4-fix-sdl-h-path.patch b/gnu/packages/patches/tome4-fix-sdl-h-path.patch
new file mode 100644
index 000000000..dd550632d
--- /dev/null
+++ b/gnu/packages/patches/tome4-fix-sdl-h-path.patch
@@ -0,0 +1,39 @@
+From 2c3eedcccf2da85cffa08baefa6e437c819276e6 Mon Sep 17 00:00:00 2001
+From: Oleg Pykhalov <go.wigust@gmail.com>
+Date: Mon, 3 Apr 2017 16:20:48 +0300
+Subject: [PATCH] Fix make -k config=release for GNUC
+
+---
+ src/music.h | 2 +-
+ src/tSDL.h  | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/music.h b/src/music.h
+index 894426cb8..c8490e456 100644
+--- a/src/music.h
++++ b/src/music.h
+@@ -27,7 +27,7 @@
+ #include <vorbis/vorbisfile.h>
+ #include <SDL2/SDL.h>
+ #include <SDL2/SDL_thread.h>
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__GNUC__)
+ #include <AL/al.h>
+ #include <AL/alc.h>
+ #include <vorbis/vorbisfile.h>
+diff --git a/src/tSDL.h b/src/tSDL.h
+index a7d36c92f..4f7690255 100644
+--- a/src/tSDL.h
++++ b/src/tSDL.h
+@@ -3,7 +3,7 @@
+ #include <SDL2_ttf/SDL_ttf.h>
+ //#include <SDL2_mixer/SDL_mixer.h>
+ #include <SDL2_image/SDL_image.h>
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__GNUC__)
+ #include <SDL2/SDL.h>
+ #include <SDL2/SDL_ttf.h>
+ //#include <SDL2/SDL_mixer.h>
+-- 
+2.13.2
+
-- 
2.13.2


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#27691] Fix spaces
  2017-07-14 12:41 [bug#27691] [PATCH 1/2] gnu: Add premake4 Oleg Pykhalov
                   ` (2 preceding siblings ...)
  2017-07-17 15:58 ` [bug#27691] Tabs and patches names Oleg Pykhalov
@ 2017-07-17 16:02 ` Oleg Pykhalov
  2017-07-20  9:08   ` Ludovic Courtès
  2017-07-28 23:06 ` [bug#27691] Clean up tome4 Oleg Pykhalov
  4 siblings, 1 reply; 16+ messages in thread
From: Oleg Pykhalov @ 2017-07-17 16:02 UTC (permalink / raw)
  To: bug#27691

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Fix spaces --]
[-- Type: text/x-patch, Size: 2335 bytes --]

From fa62d236c25fd50116e21fe8924d0a0edeed603a Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Fri, 14 Jul 2017 13:04:15 +0300
Subject: [PATCH] gnu: Add premake4.

* gnu/packages/build-tools.scm (premake4): New variable.
---
 gnu/packages/build-tools.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 66f46433f..da4966bc7 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -23,6 +23,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (gnu packages)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages python)
   #:use-module (gnu packages ninja)
   #:use-module (guix build-system gnu)
@@ -90,3 +91,37 @@ Autoconf/Automake/make combo.  Build specifications, also known as @dfn{Meson
 files}, are written in a custom domain-specific language (DSL) that resembles
 Python.")
     (license license:asl2.0)))
+
+(define-public premake4
+  (package
+    (name "premake4")
+    (version "4.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://downloads.sourceforge.net/project/premake/Premake/"
+                    version "/premake-" version "-src.zip"))
+              (sha256
+               (base32
+                "1017rd0wsjfyq2jvpjjhpszaa7kmig6q1nimw76qx3cjz2868lrn"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("unzip" ,unzip))) ; for unpacking the source
+    (arguments
+     `(#:make-flags '("CC=gcc")
+       #:tests? #f ; No test suite
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'enter-source
+           (lambda _ (chdir "build/gmake.unix") #t))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "../../bin/release/premake4"
+                           (string-append (assoc-ref outputs "out") "/bin"))
+             #t)))))
+    (synopsis "A makefile generation tool")
+    (description "@code{premake4} is a command line utility which reads a
+scripted definition of a software project.")
+    (home-page "https://premake.github.io")
+    (license license:bsd-3)))
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#27691] Fix spaces
  2017-07-17 16:02 ` [bug#27691] Fix spaces Oleg Pykhalov
@ 2017-07-20  9:08   ` Ludovic Courtès
  0 siblings, 0 replies; 16+ messages in thread
From: Ludovic Courtès @ 2017-07-20  9:08 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: bug#27691

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

Oleg Pykhalov <go.wigust@gmail.com> skribis:

>>From fa62d236c25fd50116e21fe8924d0a0edeed603a Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust@gmail.com>
> Date: Fri, 14 Jul 2017 13:04:15 +0300
> Subject: [PATCH] gnu: Add premake4.
>
> * gnu/packages/build-tools.scm (premake4): New variable.

I made the following changes (please make sure to run ‘guix lint’ before
submitting a patch) and committed.

Note that I changed the name to “premake” because that’s what they call
the project.

Thanks,
Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1340 bytes --]

diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 936f733ba..353c9c8ef 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -94,12 +94,11 @@ Python.")
 
 (define-public premake4
   (package
-    (name "premake4")
+    (name "premake")
     (version "4.3")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "http://downloads.sourceforge.net/project/premake/Premake/"
+              (uri (string-append "mirror://sourceforge/premake/Premake/"
                                   version "/premake-" version "-src.zip"))
               (sha256
                (base32
@@ -120,8 +119,9 @@ Python.")
              (install-file "../../bin/release/premake4"
                            (string-append (assoc-ref outputs "out") "/bin"))
              #t)))))
-    (synopsis "A makefile generation tool")
-    (description "@code{premake4} is a command line utility which reads a
-scripted definition of a software project.")
+    (synopsis "Portable software build tool")
+    (description "@code{premake4} is a command line utility that reads a
+scripted definition of a software project and outputs @file{Makefile}s or
+other lower-level build files.")
     (home-page "https://premake.github.io")
     (license license:bsd-3)))

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#27691] Tabs and patches names
  2017-07-17 15:58 ` [bug#27691] Tabs and patches names Oleg Pykhalov
@ 2017-07-20  9:19   ` Ludovic Courtès
  2017-07-25 16:41     ` Oleg Pykhalov
  0 siblings, 1 reply; 16+ messages in thread
From: Ludovic Courtès @ 2017-07-20  9:19 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 27691

Hi Oleg,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

>>From 39f61dbcc0b7b09a325536149eee6c69c7526b4e Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust@gmail.com>
> Date: Fri, 14 Jul 2017 15:34:33 +0300
> Subject: [PATCH] gnu: Add tome4.
>
> * gnu/packages/games.scm (tome4): New variable.

Please add the patches to gnu/local.mk.

> +                      (substitute* "tome4.desktop"
> +                        (("Exec=/usr")
> +                         (string-append "Exec="
> +                                        (assoc-ref outputs "out")
> +                                        "/usr")))

Is it needed?  I would expect the ‘patch-dot-desktop-files’ to do the
right thing.

> +    (synopsis "Roguelike RPG")
> +    (description "Tales of Maj’Eyal (ToME) is a free, open source roguelike

Please remove “free, open source”: that’s always the case in Guix.  :-)

> diff --git a/gnu/packages/patches/tome4-add-desktop-file.patch b/gnu/packages/patches/tome4-add-desktop-file.patch
> new file mode 100644
> index 000000000..80fd82478
> --- /dev/null
> +++ b/gnu/packages/patches/tome4-add-desktop-file.patch
> @@ -0,0 +1,27 @@
> +From b8e207e145938f7a0f23d1c5107d532ebb9de720 Mon Sep 17 00:00:00 2001
> +From: Oleg Pykhalov <go.wigust@gmail.com>
> +Date: Fri, 14 Jul 2017 11:19:37 +0300
> +Subject: [PATCH] Add desktop file.
> +
> +---
> + tome4.desktop | 8 ++++++++
> + 1 file changed, 8 insertions(+)
> + create mode 100644 tome4.desktop
> +
> +diff --git a/tome4.desktop b/tome4.desktop
> +new file mode 100644
> +index 000000000..c5d67f0cf
> +--- /dev/null
> ++++ b/tome4.desktop
> +@@ -0,0 +1,8 @@
> ++[Desktop Entry]
> ++Name=ToME4
> ++Comment=An open-source, single-player, role-playing roguelike game set in the world of Eyal.
> ++Exec=/usr/bin/tome4
> ++Icon=tome4.png
> ++Terminal=false
> ++Type=Application
> ++Categories=Game;RolePlaying;

For each patch, could you write a line explaining whether they are
upstream patches, to simplify future updates?

Also, please remove “open-source” from the comment.  (BTW I recommend
<https://www.gnu.org/philosophy/open-source-misses-the-point.html>.)

> @@ -0,0 +1,23 @@
> +From f10d89912989e0f071855ab2c20d62b318d313fc Mon Sep 17 00:00:00 2001
> +From: Oleg Pykhalov <go.wigust@gmail.com>
> +Date: Fri, 14 Jul 2017 11:17:26 +0300
> +Subject: [PATCH] Add shell wrapper for launching.
> +
> +---
> + tome4 | 4 ++++
> + 1 file changed, 4 insertions(+)
> + create mode 100644 tome4
> +
> +diff --git a/tome4 b/tome4
> +new file mode 100644
> +index 000000000..2b623e467
> +--- /dev/null
> ++++ b/tome4
> +@@ -0,0 +1,4 @@
> ++#!/usr/bin/sh
> ++cd "/opt/tome4"
> ++./t-engine &
> ++exit

If this is not an upstream patch, I would find it nicer to create the
wrapper directly from the build phase, and with the right directory name
instead of “/opt”.

Could you send an updated patch?

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27691] Tabs and patches names
  2017-07-20  9:19   ` Ludovic Courtès
@ 2017-07-25 16:41     ` Oleg Pykhalov
  2017-07-26  8:40       ` Ludovic Courtès
  0 siblings, 1 reply; 16+ messages in thread
From: Oleg Pykhalov @ 2017-07-25 16:41 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 27691

[-- Attachment #1: Type: text/plain, Size: 273 bytes --]

Hi Ludovic,

Thank you for supporting this bug report.

I did my best:

* Move all non-upstream patches directly in package definition.
* Find a way to use version and name inside phases.
* Fix pixmap name in tome4.desktop.
* Remove open-source and free from description.


[-- Attachment #2: Worked on suggestons --]
[-- Type: text/x-patch, Size: 6674 bytes --]

From 3b92b15460fdf422d2de2ea39297a73a8dd87e19 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Tue, 25 Jul 2017 19:27:47 +0300
Subject: [PATCH] gnu: Add tome4.

* gnu/packages/games.scm (tome4): New variable.
---
 gnu/packages/games.scm | 121 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 121 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 2dec9a395..a2bf132d2 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4579,3 +4579,124 @@ computer-hosted roleplaying games.  This is the last version released by
 Crowther & Woods, its original authors, in 1995.  It has been known as
 \"adventure 2.5\" and \"430-point adventure\".")
       (license license:bsd-2))))
+
+(define-public tome4
+  (package
+    (name "tome4")
+    (version "1.5.5")
+    (synopsis "Single-player, RPG roguelike game set in the world of Eyal")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://te4.org/dl/t-engine/t-engine4-src-"
+                           version ".tar.bz2"))
+       (sha256
+        (base32
+         "0v2qgdfpvdzd1bcbp9v8pfahj1bgczsq2d4xfhh5wg11jgjcwz03"))
+       (modules '((guix build utils)))
+       (snippet
+        '(for-each (lambda (file)
+                     (substitute* file
+                       (("#elif defined(__FreeBSD__)" line)
+                        (string-append
+                         line " || defined(__GNUC__)"))))
+                   '("src/music.h" "src/tSDL.h")))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (inputs
+     `(("sdl-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
+       ("glu" ,glu)
+       ("premake4" ,premake4)
+       ("openal" ,openal)
+       ("vorbis" ,libvorbis)
+       ("luajit" ,luajit)))
+    (arguments
+     `(#:make-flags '("CC=gcc" "config=release")
+       #:phases (modify-phases %standard-phases
+                  (replace 'configure
+                    (lambda _
+                      (zero? (system* "premake4" "gmake"))
+                      #t))
+                  (add-after 'set-paths 'set-sdl-paths
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (setenv "CPATH"
+                              (string-append (assoc-ref inputs "sdl-union")
+                                             "/include/SDL2"))
+                      #t))
+                  (delete 'check)
+                  ;; premake doesn't provide install target
+                  (replace 'install
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (usr (string-append out "/usr"))
+                             (bin (string-append out "/bin"))
+                             (licenses (string-append out "/share/licenses"))
+                             (documents (string-append out "/share/doc"))
+                             (pixmaps (string-append out "/share/pixmaps"))
+                             (icon "te4-icon.png")
+                             (data (string-append out "/share/" ,name))
+                             (applications (string-append
+                                            out "/share/applications"))
+                             (unzip (string-append
+                                     (assoc-ref inputs "unzip") "/bin/unzip"))
+                             (wrapper (string-append bin "/" ,name)))
+                        ;; icon
+                        (mkdir-p pixmaps)
+                        (system* unzip "-j"
+                                 (string-append
+                                  "game/engines/te4-" ,version ".teae")
+                                 (string-append
+                                  "data/gfx/" icon) "-d" pixmaps)
+                        ;; game executable
+                        (install-file "t-engine" data)
+                        (mkdir-p bin)
+                        (with-output-to-file wrapper
+                          (lambda ()
+                            (display
+                             (string-append
+                              "#!/bin/sh\n"
+                              ;; No bootstrap code found,
+                              ;; defaulting to working directory
+                              ;; for engine code!
+                              "cd " data "\n"
+                              "./t-engine &\n"
+                              "exit\n"))))
+                        (chmod wrapper #o555)
+                        ;; licenses
+                        (for-each (lambda (file)
+                                    (install-file file licenses))
+                                  '("COPYING" "COPYING-MEDIA"))
+                        ;; documents
+                        (for-each (lambda (file)
+                                    (install-file file documents))
+                                  '("CONTRIBUTING" "CREDITS"))
+                        ;; data
+                        (copy-recursively "bootstrap" (string-append
+                                                       data "/bootstrap"))
+                        (copy-recursively "game" (string-append data "/game"))
+                        ;; launcher
+                        (mkdir-p applications)
+                        (with-output-to-file (string-append applications "/"
+                                                            ,name ".desktop")
+                          (lambda ()
+                            (display
+                             (string-append
+                              "[Desktop Entry]
+Name=ToME4
+Comment=" ,synopsis "\n"
+"Exec=" ,name "\n"
+"Icon=" icon "\n"
+"Terminal=false
+Type=Application
+Categories=Game;RolePlaying;\n")))))
+                      #t)))))
+    (home-page "https://te4.org")
+    (description "Tales of Maj’Eyal (ToME) RPG, featuring tactical turn-based
+combat and advanced character building.  Play as one of many unique races and
+classes in the lore-filled world of Eyal, exploring random dungeons, facing
+challenging battles, and developing characters with your own tailored mix of
+abilities and powers.  With a modern graphical and customisable interface,
+intuitive mouse control, streamlined mechanics and deep, challenging combat,
+Tales of Maj’Eyal offers engaging roguelike gameplay for the 21st century.")
+    (license license:gpl3+)))
-- 
2.13.3


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#27691] Tabs and patches names
  2017-07-25 16:41     ` Oleg Pykhalov
@ 2017-07-26  8:40       ` Ludovic Courtès
  2017-07-26 11:12         ` Oleg Pykhalov
  0 siblings, 1 reply; 16+ messages in thread
From: Ludovic Courtès @ 2017-07-26  8:40 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 27691

[-- Attachment #1: Type: text/plain, Size: 767 bytes --]

Hi Oleg,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

>>From 3b92b15460fdf422d2de2ea39297a73a8dd87e19 Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust@gmail.com>
> Date: Tue, 25 Jul 2017 19:27:47 +0300
> Subject: [PATCH] gnu: Add tome4.
>
> * gnu/packages/games.scm (tome4): New variable.

I had to make the change below so that ‘tome4’ would behave as one would
expect.  However, the game doesn’t work for me: it creates an X11 window
that immediately disappears; after that, the engine is running
(displaying its activity in the console), but there’s no open window.

The problem can be reproduced with:

  ./pre-inst-env guix environment --pure --ad-hoc tome4 

Could you check if it works for you?

Thanks!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 707 bytes --]

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index df6922d88..41084a2f2 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4660,8 +4660,7 @@ Crowther & Woods, its original authors, in 1995.  It has been known as
                               ;; defaulting to working directory
                               ;; for engine code!
                               "cd " data "\n"
-                              "./t-engine &\n"
-                              "exit\n"))))
+                              "exec -a tome4 ./t-engine \"$@\"\n"))))
                         (chmod wrapper #o555)
                         ;; licenses
                         (for-each (lambda (file)

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#27691] Tabs and patches names
  2017-07-26  8:40       ` Ludovic Courtès
@ 2017-07-26 11:12         ` Oleg Pykhalov
  2017-07-26 20:32           ` Ludovic Courtès
  0 siblings, 1 reply; 16+ messages in thread
From: Oleg Pykhalov @ 2017-07-26 11:12 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 27691

Hi Ludovic,

ludo@gnu.org (Ludovic Courtès) writes:

[...]
> I had to make the change below so that ‘tome4’ would behave as one would
> expect.  However, the game doesn’t work for me: it creates an X11 window
> that immediately disappears; after that, the engine is running
> (displaying its activity in the console), but there’s no open window.
>
> The problem can be reproduced with:
>
>   ./pre-inst-env guix environment --pure --ad-hoc tome4 
>
> Could you check if it works for you?
>
> Thanks!
>
> Ludo’.
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index df6922d88..41084a2f2 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -4660,8 +4660,7 @@ Crowther & Woods, its original authors, in 1995.  It has been known as
>                                ;; defaulting to working directory
>                                ;; for engine code!
>                                "cd " data "\n"
> -                              "./t-engine &\n"
> -                              "exit\n"))))
> +                              "exec -a tome4 ./t-engine \"$@\"\n"))))
>                          (chmod wrapper #o555)
>                          ;; licenses
>                          (for-each (lambda (file)

I applied your patch and ran `./pre-inst-env guix environment --pure
--ad-hoc tome4 -- tome4`.  It worked.

However I got “bash: tty: command not found” after `./pre-inst-env guix
environment --pure --ad-hoc tome4`.  `tome4` runs just fine still.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27691] Tabs and patches names
  2017-07-26 11:12         ` Oleg Pykhalov
@ 2017-07-26 20:32           ` Ludovic Courtès
  2017-07-26 21:05             ` Oleg Pykhalov
  2017-07-28  7:31             ` [bug#27691] Qemu test tome4 works for me Oleg Pykhalov
  0 siblings, 2 replies; 16+ messages in thread
From: Ludovic Courtès @ 2017-07-26 20:32 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 27691

Oleg Pykhalov <go.wigust@gmail.com> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
> [...]
>> I had to make the change below so that ‘tome4’ would behave as one would
>> expect.  However, the game doesn’t work for me: it creates an X11 window
>> that immediately disappears; after that, the engine is running
>> (displaying its activity in the console), but there’s no open window.
>>
>> The problem can be reproduced with:
>>
>>   ./pre-inst-env guix environment --pure --ad-hoc tome4 
>>
>> Could you check if it works for you?
>>
>> Thanks!
>>
>> Ludo’.
>>
>> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
>> index df6922d88..41084a2f2 100644
>> --- a/gnu/packages/games.scm
>> +++ b/gnu/packages/games.scm
>> @@ -4660,8 +4660,7 @@ Crowther & Woods, its original authors, in 1995.  It has been known as
>>                                ;; defaulting to working directory
>>                                ;; for engine code!
>>                                "cd " data "\n"
>> -                              "./t-engine &\n"
>> -                              "exit\n"))))
>> +                              "exec -a tome4 ./t-engine \"$@\"\n"))))
>>                          (chmod wrapper #o555)
>>                          ;; licenses
>>                          (for-each (lambda (file)
>
> I applied your patch and ran `./pre-inst-env guix environment --pure
> --ad-hoc tome4 -- tome4`.  It worked.

Is it on GuixSD or on another distro?  In the latter case, ‘tome4’ might
be using stuff from the host distro that’s missing on my machine.

> However I got “bash: tty: command not found” after `./pre-inst-env guix
> environment --pure --ad-hoc tome4`.  `tome4` runs just fine still.

Sounds harmless.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27691] Tabs and patches names
  2017-07-26 20:32           ` Ludovic Courtès
@ 2017-07-26 21:05             ` Oleg Pykhalov
  2017-07-28  7:31             ` [bug#27691] Qemu test tome4 works for me Oleg Pykhalov
  1 sibling, 0 replies; 16+ messages in thread
From: Oleg Pykhalov @ 2017-07-26 21:05 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 27691

ludo@gnu.org (Ludovic Courtès) writes:

> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>
>> ludo@gnu.org (Ludovic Courtès) writes:
>>
>> [...]
>>> I had to make the change below so that ‘tome4’ would behave as one would
>>> expect.  However, the game doesn’t work for me: it creates an X11 window
>>> that immediately disappears; after that, the engine is running
>>> (displaying its activity in the console), but there’s no open window.
>>>
>>> The problem can be reproduced with:
>>>
>>>   ./pre-inst-env guix environment --pure --ad-hoc tome4 
>>>
>>> Could you check if it works for you?
>>>
>>> Thanks!
>>>
>>> Ludo’.
>>>
>>> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
>>> index df6922d88..41084a2f2 100644
>>> --- a/gnu/packages/games.scm
>>> +++ b/gnu/packages/games.scm
>>> @@ -4660,8 +4660,7 @@ Crowther & Woods, its original authors, in 1995.  It has been known as
>>>                                ;; defaulting to working directory
>>>                                ;; for engine code!
>>>                                "cd " data "\n"
>>> -                              "./t-engine &\n"
>>> -                              "exit\n"))))
>>> +                              "exec -a tome4 ./t-engine \"$@\"\n"))))
>>>                          (chmod wrapper #o555)
>>>                          ;; licenses
>>>                          (for-each (lambda (file)
>>
>> I applied your patch and ran `./pre-inst-env guix environment --pure
>> --ad-hoc tome4 -- tome4`.  It worked.
>
> Is it on GuixSD or on another distro?  In the latter case, ‘tome4’ might
> be using stuff from the host distro that’s missing on my machine.

It is GuixSD.  My ~/src/guix is rebased on origin/master yesterday.  I
I think that `--pure` flag makes sure that our environments are the
same, doesn't it?

Do you able to run other games on your machine?

Maybe I need to make a `guix build vm`?  I'm not sure does qemu able to
run games though.

>> However I got “bash: tty: command not found” after `./pre-inst-env guix
>> environment --pure --ad-hoc tome4`.  `tome4` runs just fine still.
>
> Sounds harmless.

OK.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27691] Qemu test tome4 works for me
  2017-07-26 20:32           ` Ludovic Courtès
  2017-07-26 21:05             ` Oleg Pykhalov
@ 2017-07-28  7:31             ` Oleg Pykhalov
  2017-07-28 20:43               ` bug#27691: " Ludovic Courtès
  1 sibling, 1 reply; 16+ messages in thread
From: Oleg Pykhalov @ 2017-07-28  7:31 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 27691

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

Hello Ludovic,

I made a qemu machine to test tome4.  It works for me.  Could you check
for you?

I build it with:
./pre-inst-env guix system vm $HOME/dotfiles/guix/system-tome4.scm

Also I increased RAM to 2048 in generated script manually.  Can I do
this automatically when I build a vm?


[-- Attachment #2: qemu test tome4 --]
[-- Type: text/plain, Size: 2155 bytes --]

;; GuixSD configuration file for the game machine.
;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
;; Released under the GNU GPLv3 or any later version.

(use-modules (gnu))
(use-service-modules desktop xorg)
(use-package-modules certs games fonts bash xfce)

(define %custom-desktop-services
  (modify-services %desktop-services
    (special-files-service-type config => `(("/bin/sh"
                                             ,(file-append
                                               bash "/bin/sh"))
                                            ("/usr/bin/env"
                                             ,(file-append
                                               coreutils "/bin/env"))))
    (slim-service-type config => (slim-configuration
                                  (inherit config)
                                  (auto-login? #t)
                                  (auto-login-session (file-append xfce
                                                                   "/bin/startxfce4"))
                                  (default-user "alice")))))

(operating-system
  (host-name "tome4")
  (timezone "Europe/Moscow")
  (locale "en_US.utf8")

  (bootloader (grub-configuration (device "/dev/sda")))
  
  (file-systems (cons (file-system
                        (device "my-root")
                        (title 'label)
                        (mount-point "/")
                        (type "ext4"))
                      %base-file-systems))

  (users (cons (user-account
                (name "alice")
                (comment "Bob's sister")
                (group "users")
                (supplementary-groups '("wheel"
                                        "audio" "video"))
                (home-directory "/home/alice"))
               %base-user-accounts))

  (packages (cons* nss-certs
                   font-liberation
                   font-dejavu
                   tome4
                   %base-packages))
  
  (services (cons* (xfce-desktop-service)
                   %custom-desktop-services))

  (name-service-switch %mdns-host-lookup-nss))

^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#27691: Qemu test tome4 works for me
  2017-07-28  7:31             ` [bug#27691] Qemu test tome4 works for me Oleg Pykhalov
@ 2017-07-28 20:43               ` Ludovic Courtès
  0 siblings, 0 replies; 16+ messages in thread
From: Ludovic Courtès @ 2017-07-28 20:43 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 27691-done

Hi Oleg,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

> I made a qemu machine to test tome4.  It works for me.  Could you check
> for you?
>
> I build it with:
> ./pre-inst-env guix system vm $HOME/dotfiles/guix/system-tome4.scm

Indeed, it works here.  I suspect it was due to my screen resolution or
something along these lines.

Anyway, committed!

> Also I increased RAM to 2048 in generated script manually.  Can I do
> this automatically when I build a vm?

No but you can run:

  /gnu/store/…-run-vm.sh -m 2048

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27691] Clean up tome4
  2017-07-14 12:41 [bug#27691] [PATCH 1/2] gnu: Add premake4 Oleg Pykhalov
                   ` (3 preceding siblings ...)
  2017-07-17 16:02 ` [bug#27691] Fix spaces Oleg Pykhalov
@ 2017-07-28 23:06 ` Oleg Pykhalov
  2017-07-29 12:15   ` Ludovic Courtès
  4 siblings, 1 reply; 16+ messages in thread
From: Oleg Pykhalov @ 2017-07-28 23:06 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 27691

Hello Ludovic,

And again tome4 :-)

[...]

>> I made a qemu machine to test tome4.  It works for me.  Could you check
>> for you?
>>
>> I build it with:
>> ./pre-inst-env guix system vm $HOME/dotfiles/guix/system-tome4.scm
>
> Indeed, it works here.  I suspect it was due to my screen resolution or
> something along these lines.

Hm, I played this on HD and FullHD.

> Anyway, committed!
>
>> Also I increased RAM to 2048 in generated script manually.  Can I do
>> this automatically when I build a vm?
>
> No but you can run:
>
>   /gnu/store/…-run-vm.sh -m 2048

Oh, so I can pass anything what I want this way, nice!

[...]

Could you also apply from
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27691#35 ?  It's not that
needed but why not to make less code.

Absolute link to patch
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27691;filename=0001-tome4-Apply-Ricardo-suggestions.patch;msg=35;att=1

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27691] Clean up tome4
  2017-07-28 23:06 ` [bug#27691] Clean up tome4 Oleg Pykhalov
@ 2017-07-29 12:15   ` Ludovic Courtès
  0 siblings, 0 replies; 16+ messages in thread
From: Ludovic Courtès @ 2017-07-29 12:15 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 27691-done

Hi Oleg,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

>>> I made a qemu machine to test tome4.  It works for me.  Could you check
>>> for you?
>>>
>>> I build it with:
>>> ./pre-inst-env guix system vm $HOME/dotfiles/guix/system-tome4.scm
>>
>> Indeed, it works here.  I suspect it was due to my screen resolution or
>> something along these lines.
>
> Hm, I played this on HD and FullHD.

Yeah, dunno.

> Could you also apply from
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27691#35 ?  It's not that
> needed but why not to make less code.

Done, sorry for overlooking this.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-07-29 12:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-14 12:41 [bug#27691] [PATCH 1/2] gnu: Add premake4 Oleg Pykhalov
2017-07-14 12:41 ` [bug#27691] [PATCH 2/2] gnu: Add t-engine Oleg Pykhalov
2017-07-14 12:50 ` [bug#27691] Specify version Oleg Pykhalov
2017-07-17 15:58 ` [bug#27691] Tabs and patches names Oleg Pykhalov
2017-07-20  9:19   ` Ludovic Courtès
2017-07-25 16:41     ` Oleg Pykhalov
2017-07-26  8:40       ` Ludovic Courtès
2017-07-26 11:12         ` Oleg Pykhalov
2017-07-26 20:32           ` Ludovic Courtès
2017-07-26 21:05             ` Oleg Pykhalov
2017-07-28  7:31             ` [bug#27691] Qemu test tome4 works for me Oleg Pykhalov
2017-07-28 20:43               ` bug#27691: " Ludovic Courtès
2017-07-17 16:02 ` [bug#27691] Fix spaces Oleg Pykhalov
2017-07-20  9:08   ` Ludovic Courtès
2017-07-28 23:06 ` [bug#27691] Clean up tome4 Oleg Pykhalov
2017-07-29 12:15   ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.