diff mbox series

[bug#40980] gnu: xfe: Fix configuration and icons. (v2)

Message ID 20200501034703.685faec8.raghavgururajan@disroot.org
State Accepted
Headers show
Series [bug#40980] gnu: xfe: Fix configuration and icons. (v2) | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

Raghav Gururajan May 1, 2020, 7:47 a.m. UTC

Comments

Danny Milosavljevic May 1, 2020, 11:55 a.m. UTC | #1
Hi Raghav,

On Fri, 1 May 2020 03:47:03 -0400
Raghav Gururajan <raghavgururajan@disroot.org> wrote:

> * gnu/packages/disk.scm (xfe): Fix configuration and icons.

Please mention the phases and arguments you changed.

>       (origin
>         (method url-fetch)
>         (uri
> -        (string-append "https://sourceforge.net/projects/xfe/files/xfe/"
> -                       version
> -                       "/xfe-" version ".tar.gz"))
> +        (string-append "https://sourceforge.net/projects/" name "/files/" name
> +                       "/" version "/" name "-" version ".tar.gz"))

Please don't do that without a good reason because it makes us unable to rename
our package later.

> -         (add-after 'unpack 'patch-xferc-path
> +         (add-after 'unpack 'patch-xfe-paths

Please mention this in the commit log.

> -       #:make-flags
> -       (let ((out (assoc-ref %outputs "out")))
> -         (list (string-append "BASH_COMPLETION_DIR=" out
> -                              "/share/bash-completion/completions")))))

Please mention the removal of make-flags in the commit log.
diff mbox series

Patch

From c29163895fd4c7aa4c2e448272e987ac6ff9ceed Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Fri, 1 May 2020 03:43:04 -0400
Subject: [PATCH] gnu: xfe: Fix configuration and icons.

Changed paths to datadir, xferc and icons, to load them correctly.
Removed bash-completions, as the directory does not exist.
Cosmetic changes to source uri.

* gnu/packages/disk.scm (xfe): Fix configuration and icons.
---
 gnu/packages/disk.scm | 35 +++++++++++++++++++++++------------
 1 file changed, 23 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index b7d3b9d954..fad07d60f6 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -917,9 +917,8 @@  since they are better handled by external tools.")
      (origin
        (method url-fetch)
        (uri
-        (string-append "https://sourceforge.net/projects/xfe/files/xfe/"
-                       version
-                       "/xfe-" version ".tar.gz"))
+        (string-append "https://sourceforge.net/projects/" name "/files/" name
+                       "/" version "/" name "-" version ".tar.gz"))
        (sha256
         (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs"))))
     (build-system gnu-build-system)
@@ -937,17 +936,29 @@  since they are better handled by external tools.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-xferc-path
+         (add-after 'unpack 'patch-xfe-paths
            (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out     (assoc-ref outputs "out"))
-                    (xferc   (string-append out "/share/xfe/xferc")))
+             (let*
+                 ((out     (assoc-ref outputs "out"))
+                  (share   (string-append out "/share"))
+                  (xferc   (string-append out "/share/xfe/xferc"))
+                  (xfe-theme   (string-append out "/share/xfe/icons/xfe-theme")))
+               ;; Correct path for xfe registry.
+               (substitute* "src/foxhacks.cpp"
+                 (("/etc:/usr/share:/usr/local/share") share))
+               ;; Correct path for xfe configuration.
                (substitute* "src/XFileExplorer.cpp"
-                 (("/usr/share/xfe/xferc") xferc))
-               #t))))
-       #:make-flags
-       (let ((out (assoc-ref %outputs "out")))
-         (list (string-append "BASH_COMPLETION_DIR=" out
-                              "/share/bash-completion/completions")))))
+                 (("/usr/share/xfe/xferc") xferc)
+                 (("/usr/local/share/xfe/xferc") xferc)
+                 (("/opt/local/share/xfe/xferc") xferc))
+               ;; Correct path for xfe icons.
+               (substitute* "src/xfedefs.h"
+                 (((string-append
+                    "~/.config/xfe/icons/xfe-theme:"
+                    "/usr/local/share/xfe/icons/xfe-theme:"
+                    "/usr/share/xfe/icons/xfe-theme"))
+                  xfe-theme))
+               #t))))))
     (synopsis "File Manager for X-Based Graphical Systems")
     (description"XFE (X File Explorer) is a file manager for X.  It is based on
 the popular but discontinued, X Win Commander.  It aims to be the file manager
-- 
2.26.2