unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ahmad Draidi via Guix-patches via <guix-patches@gnu.org>
To: 64387@debbugs.gnu.org
Cc: Ahmad Draidi <a.r.draidi@redscript.org>
Subject: [bug#64387] [PATCH 3/6] gnu: arcan: Fix paths handling.
Date: Sat,  1 Jul 2023 02:07:08 +0400	[thread overview]
Message-ID: <88537d4db68bd306c1f3efae8b6ed52290ca66e2.1688161433.git.a.r.draidi@redscript.org> (raw)
In-Reply-To: <cover.1688161433.git.a.r.draidi@redscript.org>

This patch removes the wrapper and the propagated environment variables
(through 'native-search-paths') and instead patches the paths inside the
source code. This fixes path handling, which seems to be broken now. It
also allows us to use 'setuid', which is required for some features, and
lets the app use its internal path handling criteria, which some dependent
apps expect.

* gnu/packages/arcan.scm (arcan): Fix paths handling.
[arguments]: Add 'patch-paths' phase. Remove 'wrap-program' phase.
[native-search-paths]: Remove.
---
 gnu/packages/arcan.scm | 27 +++++----------------------
 1 file changed, 5 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm
index cfd72f6e55..159c6d2190 100644
--- a/gnu/packages/arcan.scm
+++ b/gnu/packages/arcan.scm
@@ -79,6 +79,11 @@ (define-public arcan
                              "-DDISTR_TAG='Guix'")
          #:phases
          (modify-phases %standard-phases
+           (add-after 'unpack 'patch-paths
+             (lambda* (#:key outputs #:allow-other-keys)
+               (substitute* "src/platform/posix/paths.c"
+                 (("/usr/local")
+                  (assoc-ref outputs "out")))))
            ;; Normally, it tries to fetch patched openal with git
            ;; but copying files manually in the right place seems to work too.
            (add-after 'unpack 'prepare-static-openal
@@ -94,30 +99,8 @@ (define-public arcan
            (add-before 'configure 'chdir
              (lambda _
                (chdir "src")
-               #t))
-           (add-after 'install 'wrap-program
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out")))
-                 (wrap-program (string-append out "/bin/arcan")
-                   `("ARCAN_RESOURCEPATH" ":" suffix
-                     (,(string-append out "/share/arcan/resources")))
-                   `("ARCAN_STATEBASEPATH" ":" =
-                     ("$HOME/.arcan/resources/savestates"))
-                   `("ARCAN_STATEPATH" ":" =
-                     ("$HOME/.arcan/resources/savestates"))
-                   `("ARCAN_BINPATH" ":" =
-                     (,(string-append out "/bin/arcan_frameserver")))))
                #t)))
          #:tests? #f))
-      (native-search-paths
-       (list (search-path-specification
-              (variable "ARCAN_APPLBASEPATH")
-              (separator #f)
-              (files '("share/arcan/appl")))
-             (search-path-specification
-              (variable "ARCAN_SCRIPTPATH")
-              (separator #f)
-              (files '("share/arcan/scripts")))))
       (inputs
        `(("bash-minimal" ,bash-minimal)
          ("espeak" ,espeak)
-- 
2.40.1





  parent reply	other threads:[~2023-06-30 22:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 22:01 [bug#64387] [PATCH 0/6] Update and rework arcan Ahmad Draidi via Guix-patches via
2023-06-30 22:07 ` [bug#64387] [PATCH 1/6] gnu: arcan: Update to 0.6.2.1 Ahmad Draidi via Guix-patches via
2023-06-30 22:07 ` [bug#64387] [PATCH 2/6] gnu: arcan: Build all features Ahmad Draidi via Guix-patches via
2023-06-30 22:07 ` Ahmad Draidi via Guix-patches via [this message]
2023-06-30 22:07 ` [bug#64387] [PATCH 4/6] gnu: arcan: Use new style arguments Ahmad Draidi via Guix-patches via
2023-06-30 22:07 ` [bug#64387] [PATCH 5/6] gnu: arcan: Restyle format Ahmad Draidi via Guix-patches via
2023-06-30 22:07 ` [bug#64387] [PATCH 6/6] gnu: Remove arcan-wayland Ahmad Draidi via Guix-patches via
2023-08-10 18:16 ` [bug#64387] [PATCH v2 0/6] Update and rework arcan Ahmad Draidi via Guix-patches via
2023-08-10 18:16   ` [bug#64387] [PATCH v2 1/6] gnu: arcan: Update to 0.6.2.1 Ahmad Draidi via Guix-patches via
2023-08-10 18:16   ` [bug#64387] [PATCH v2 2/6] gnu: arcan: Build all features Ahmad Draidi via Guix-patches via
2023-08-10 18:16   ` [bug#64387] [PATCH v2 3/6] gnu: arcan: Fix paths handling Ahmad Draidi via Guix-patches via
2023-08-10 18:16   ` [bug#64387] [PATCH v2 4/6] gnu: arcan: Use new style arguments Ahmad Draidi via Guix-patches via
2023-08-10 18:16   ` [bug#64387] [PATCH v2 5/6] gnu: arcan: Restyle format Ahmad Draidi via Guix-patches via
2023-08-10 18:16   ` [bug#64387] [PATCH v2 6/6] gnu: arcan-wayland: Deprecate in favor of "arcan" Ahmad Draidi via Guix-patches via
2023-09-06  0:40     ` bug#64387: [PATCH 0/6] Update and rework arcan Maxim Cournoyer

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=88537d4db68bd306c1f3efae8b6ed52290ca66e2.1688161433.git.a.r.draidi@redscript.org \
    --to=guix-patches@gnu.org \
    --cc=64387@debbugs.gnu.org \
    --cc=a.r.draidi@redscript.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 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).