all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oleg Pykhalov <go.wigust@gmail.com>
To: 27691@debbugs.gnu.org
Subject: [bug#27691] Tabs and patches names
Date: Mon, 17 Jul 2017 18:58:16 +0300	[thread overview]
Message-ID: <87poczcaxz.fsf@magnolia.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <20170714124108.24997-1-go.wigust@gmail.com> (Oleg Pykhalov's message of "Fri, 14 Jul 2017 15:41:07 +0300")

[-- 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


  parent reply	other threads:[~2017-07-17 15:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2017-07-20  9:19   ` [bug#27691] Tabs and patches names 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87poczcaxz.fsf@magnolia.i-did-not-set--mail-host-address--so-tickle-me \
    --to=go.wigust@gmail.com \
    --cc=27691@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.