all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ivana Drazovic <iv.dra@hotmail.com>
To: 62902@debbugs.gnu.org
Cc: Ivana Drazovic <iv.dra@hotmail.com>
Subject: [bug#62902] [PATCH 3/3] gnu: laby: Add patch for being able to execute game code.
Date: Wed, 19 Apr 2023 21:53:56 +0200	[thread overview]
Message-ID: <GV2PR03MB9449EFEC82A418E66E76A62089629@GV2PR03MB9449.eurprd03.prod.outlook.com> (raw)
In-Reply-To: <20230419195356.2418-1-iv.dra@hotmail.com>

Reported upstream at https://github.com/sgimenez/laby/pull/68

* gnu/packages/patches/laby-use-tmpdir-from-runtime.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/games.scm (laby)[source]: Use it.
---
 gnu/local.mk                                  |  2 +
 gnu/packages/games.scm                        |  3 +-
 .../laby-use-tmpdir-from-runtime.patch        | 39 +++++++++++++++++++
 3 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/laby-use-tmpdir-from-runtime.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 64a1268fbe..2d8741223b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -57,6 +57,7 @@
 # Copyright © 2022 ( <paren@disroot.org>
 # Copyright © 2022 jgart <jgart@dismail.de>
 # Copyright © 2023 Zheng Junjie <873216071@qq.com>
+# Copyright © 2023 Ivana Drazovic <iv.dra@hotmail.com>
 #
 # This file is part of GNU Guix.
 #
@@ -1417,6 +1418,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/kodi-set-libcurl-ssl-parameters.patch		\
   %D%/packages/patches/kwayland-skip-flaky-test.patch		\
   %D%/packages/patches/laby-make-install.patch			\
+  %D%/packages/patches/laby-use-tmpdir-from-runtime.patch	\
   %D%/packages/patches/ldns-drill-examples.patch		\
   %D%/packages/patches/leela-zero-gtest.patch			\
   %D%/packages/patches/less-hurd-path-max.patch			\
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index ed06a57636..79d5cb0c0c 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5775,7 +5775,8 @@ (define-public laby
              (sha256
               (base32
                "1y6nfxcjhqg9bb81hs0wijg7kcwk5kff81rgd8bsv5ps7ia9nj6b"))
-             (patches (search-patches "laby-make-install.patch"))))
+             (patches (search-patches "laby-make-install.patch"
+                                      "laby-use-tmpdir-from-runtime.patch"))))
     (build-system glib-or-gtk-build-system)
     (inputs
      (list gdk-pixbuf
diff --git a/gnu/packages/patches/laby-use-tmpdir-from-runtime.patch b/gnu/packages/patches/laby-use-tmpdir-from-runtime.patch
new file mode 100644
index 0000000000..ea6324a91b
--- /dev/null
+++ b/gnu/packages/patches/laby-use-tmpdir-from-runtime.patch
@@ -0,0 +1,39 @@
+Reported as <https://github.com/sgimenez/laby/pull/68>
+
+diff --git a/build b/build
+index 992a9e3..0df74d9 100755
+--- a/build
++++ b/build
+@@ -7,7 +7,6 @@ source build.conf || exit 1
+ 
+ export PREFIX=${PREFIX-/usr}
+ export DATADIR=${DATADIR-${PREFIX}/share}
+-export TMPDIR=${TMPDIR-/tmp}
+ 
+ export PROJECT_NAME=${PROJECT_NAME-unknown}
+ export PROJECT_VERSION=${PROJECT_VERSION-unknown}
+diff --git a/src/config.sh b/src/config.sh
+index 19d4160..9338aad 100644
+--- a/src/config.sh
++++ b/src/config.sh
+@@ -29,5 +29,4 @@ let build_ocaml = "${OCAML_VERSION}"
+ let build_lablgtk = "${BUILD_LABLGTK}"
+ let build_lablgtk_sourceview = "${BUILD_LABLGTKSV}"
+ let _ = Res.sys_data_dir := "${DATADIR}"
+-let _ = Res.sys_tmp_dir := "${TMPDIR}"
+ EOF
+diff --git a/src/laby.ml b/src/laby.ml
+index b77f2b2..e17acb9 100644
+--- a/src/laby.ml
++++ b/src/laby.ml
+@@ -48,6 +48,7 @@ let opts =
+ 
+ let _ =
+   Printexc.record_backtrace true;
++  Res.sys_tmp_dir := Filename.get_temp_dir_name ();
+   Run.init
+     ~name:Config.project_name
+     ~conf:(conf, ["conf"])
+-- 
+2.34.1
+
-- 
2.34.1





      parent reply	other threads:[~2023-04-19 19:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230419195356.2418-1-iv.dra@hotmail.com>
2023-04-19 19:53 ` [bug#62902] [PATCH 2/3] gnu: laby: Make laby function in pure environments Ivana Drazovic
2023-04-19 19:53 ` Ivana Drazovic [this message]

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=GV2PR03MB9449EFEC82A418E66E76A62089629@GV2PR03MB9449.eurprd03.prod.outlook.com \
    --to=iv.dra@hotmail.com \
    --cc=62902@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.