unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#46378] [PATCH] gnu: Add instead.
@ 2021-02-08  7:23 Dmitry Polyakov
  2021-02-08 12:46 ` Leo Prikler
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Dmitry Polyakov @ 2021-02-08  7:23 UTC (permalink / raw)
  To: 46378

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


hope this work

From b0693f72129958c7d9e18cd5efb5d83902dee8f3 Mon Sep 17 00:00:00 2001
From: Dmitry Polyakov <liltechdude@gmail.com>
Subject: [PATCH] gnu: Add instead.

* gnu/local.mk (instead): New variable.
---
 gnu/local.mk                                  |  2 +
 gnu/packages/game-development.scm             | 45 
 +++++++++++++++++++
 .../patches/instead-use-games-path.patch      | 28 ++++++++++++
 3 files changed, 75 insertions(+)
 create mode 100644 gnu/packages/patches/instead-use-games-path.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index b9b4b66..923231f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -40,6 +40,7 @@
 # Copyright © 2020 Malte Frank Gerdes <mate.f.gerdes@gmail.com>
 # Copyright © 2020 Vinicius Monego <monego@posteo.net>
 # Copyright © 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
+# Copyright © 2021 Dmitry Polyakov <polyakov@liltechdude.xyz>
 #
 # This file is part of GNU Guix.
 #
@@ -1187,6 +1188,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ilmbase-fix-tests.patch			\
   %D%/packages/patches/inetutils-hurd.patch			\
   %D%/packages/patches/inkscape-poppler-0.76.patch		\
+  %D%/packages/patches/instead-use-games-path.patch		\
   %D%/packages/patches/intel-xed-fix-nondeterminism.patch	\
   %D%/packages/patches/intltool-perl-compatibility.patch	\
   %D%/packages/patches/iputils-libcap-compat.patch		\
diff --git a/gnu/packages/game-development.scm 
b/gnu/packages/game-development.scm
index 92c3da9..a117058 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2021 Dmitry Polyakov <polyakov@liltechdude.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1961,6 +1962,50 @@ all modern computing platforms.  Each library 
component is fairly independent
 of the others")
     (license license:lgpl2.0+)))

+(define-public instead
+  (package
+    (name "instead")
+    (version "3.3.2")
+    (build-system cmake-build-system)
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/instead-hub/instead")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 
"014wfz5z5x72rhnakczpgfyw8s6bq510bxfmn4gv66jahkh4b65f"))
+       (patches
+        (search-patches
+         "instead-use-games-path.patch"))))
+    (arguments
+     '(#:configure-flags
+       (list (string-append
+              "-DLUA_INCLUDE_DIR="
+              (assoc-ref %build-inputs "luajit") 
"/include/luajit-2.1/")
+             "-DWITH_LUAJIT=1"
+             "-DWITH_GTK3=1")
+       #:tests? #f))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("sdl2-images" ,sdl2-image)
+       ("sdl2-ttf" ,sdl2-ttf)
+       ("lua" ,lua)
+       ("sdl2-mixer" ,sdl2-mixer)
+       ("luajit" ,luajit)
+       ("gtk+",gtk+)))
+    (home-page "https://instead3.syscall.ru/")
+    (synopsis "Simple text adventure interpreter for Unix and 
Windows")
+    (description "Simple text adventure interpreter for Unix and 
Windows.")
+    (license (list license:gpl2 license:zlib))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "INSTEAD_GAMES_PATH")
+            (separator #f)              ;single entry
+            (files '("share/instead/games")))))))
+
 (define-public ioquake3
   ;; We follow master since it seems that there won't be releases 
   after 1.3.6.
   (let ((commit "95b9cab4d644fa3bf757cfff821cc4f7d76e38b0"))
diff --git a/gnu/packages/patches/instead-use-games-path.patch 
b/gnu/packages/patches/instead-use-games-path.patch
new file mode 100644
index 0000000..2e460bf
--- /dev/null
+++ b/gnu/packages/patches/instead-use-games-path.patch
@@ -0,0 +1,28 @@
+From eba79afc957b9dc89cfd5c21434bd8ad5e0363bb Mon Sep 17 00:00:00 
2001
+From: Dmitry Polyakov <liltechdude@gmail.com>
+Date: Wed, 3 Feb 2021 14:33:37 -0500
+Subject: [PATCH] add custom gamedir support
+
+---
+ src/main.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/main.c b/src/main.c
+index 9e6e2c3b..860bd3aa 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -366,6 +366,12 @@ int instead_main(int argc, char *argv[])
+ 	setdir(game_cwd);
+ 	profile_load(NULL);
+
++    char *gamespath_env = NULL;
++
++    if (gamespath_env = getenv("INSTEAD_GAMES_PATH"), gamespath_env 
!= NULL) {
++      games_sw = strdup(gamespath_env);
++    }
++
+ 	for (i = 1; i < argc; i++) {
+ 		if (lua_sw) /* during load profile */
+ 			break;
+--
+2.30.0
--
2.30.0


--
魔法少女リルテチヅデですよ。

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 869 bytes --]

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

end of thread, other threads:[~2021-08-04 13:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08  7:23 [bug#46378] [PATCH] gnu: Add instead Dmitry Polyakov
2021-02-08 12:46 ` Leo Prikler
2021-02-08 13:04   ` Dmitry Polyakov
2021-02-08 14:11 ` polyakov
2021-02-08 15:46   ` Leo Prikler
2021-02-08 17:15     ` Dmitry Polyakov
2021-02-08 17:43       ` Leo Prikler
2021-08-04 12:29 ` polyakov
2021-08-04 13:50   ` bug#46378: " Leo Prikler

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).