From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX8QM-0004wb-4s for guix-patches@gnu.org; Mon, 17 Jul 2017 11:59:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dX8QI-0000Nt-Tq for guix-patches@gnu.org; Mon, 17 Jul 2017 11:59:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:42022) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dX8QI-0000Nn-O5 for guix-patches@gnu.org; Mon, 17 Jul 2017 11:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dX8QI-0003Gt-GD for guix-patches@gnu.org; Mon, 17 Jul 2017 11:59:02 -0400 Subject: [bug#27691] Tabs and patches names Resent-Message-ID: From: Oleg Pykhalov References: <20170714124108.24997-1-go.wigust@gmail.com> Date: Mon, 17 Jul 2017 18:58:16 +0300 In-Reply-To: <20170714124108.24997-1-go.wigust@gmail.com> (Oleg Pykhalov's message of "Fri, 14 Jul 2017 15:41:07 +0300") Message-ID: <87poczcaxz.fsf@magnolia.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27691@debbugs.gnu.org --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-tome4.patch Content-Transfer-Encoding: quoted-printable Content-Description: Tabs and patches names >From 39f61dbcc0b7b09a325536149eee6c69c7526b4e Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov 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-launch= ing.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 las= t 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.pat= ch" + "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=3Dgcc" "config=3Drelease") + #: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=3D/usr") + (string-append "Exec=3D" + (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/unzi= p"))) + ;; 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 "/gam= e")) + ;; launcher + (install-file "tome4" bin) + (chmod (string-append bin "/tome4") #o555) + (install-file "tome4.desktop" (string-append + share "/application= s"))) + #t))))) + (home-page "https://te4.org") + (synopsis "Roguelike RPG") + (description "Tales of Maj=E2=80=99Eyal (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 E= yal, +exploring random dungeons, facing challenging battles, and developing +characters with your own tailored mix of abilities and powers. With a mod= ern +graphical and customisable interface, intuitive mouse control, streamlined +mechanics and deep, challenging combat, Tales of Maj=E2=80=99Eyal offers e= ngaging +roguelike gameplay for the 21st century.") + (license license:gpl3+))) diff --git a/gnu/packages/patches/tome4-add-desktop-file.patch b/gnu/packag= es/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 +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=3DToME4 ++Comment=3DAn open-source, single-player, role-playing roguelike game set = in the world of Eyal. ++Exec=3D/usr/bin/tome4 ++Icon=3Dtome4.png ++Terminal=3Dfalse ++Type=3DApplication ++Categories=3DGame;RolePlaying; +--=20 +2.13.2 + diff --git a/gnu/packages/patches/tome4-add-shell-wrapper-for-launching.pat= ch 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 +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 +--=20 +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 +Date: Mon, 3 Apr 2017 16:20:48 +0300 +Subject: [PATCH] Fix make -k config=3Drelease 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 + #include + #include +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__GNUC__) + #include + #include + #include +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 + //#include + #include +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__GNUC__) + #include + #include + //#include +--=20 +2.13.2 + --=20 2.13.2 --=-=-=--