gnu: fbreader: Fix build failure.
[jackhill/guix/guix.git] / gnu / packages / lxde.scm
index bf70bd6..38dcd0e 100644 (file)
@@ -1,8 +1,14 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
+;;; Copyright © 2017 ng0 <ng0@n0.is>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017 Brendan Tildesley <mail@brendan.scot>
+;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 ison <ison@airmail.cc>
+;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 
 (define-module (gnu packages lxde)
   #:use-module (gnu packages)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
+  #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages file-systems)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image-viewers)
+  #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages lsof)
   #:use-module (gnu packages openbox)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages polkit)
   #:use-module (gnu packages text-editors)
+  #:use-module (gnu packages video)
+  #:use-module (gnu packages wget)
   #:use-module (gnu packages wm)
+  #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils))
@@ -46,7 +65,7 @@
 (define-public libfm
   (package
     (name "libfm")
-    (version "1.2.5")
+    (version "1.3.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/pcmanfm/"
@@ -54,7 +73,7 @@
                                   "%29/LibFM/" name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0nlvfwh09gbq8bkbvwnw6iqr918rrs9gc9ljb9pjspyg408bn1n7"))))
+                "1r6gl49xrykldwz8y4h2s7gjarxigg3bbkrj0gphxjj1vr5j9ccn"))))
     (build-system gnu-build-system)
     (inputs `(("glib" ,glib)
               ("gtk+" ,gtk+-2)))
@@ -67,7 +86,7 @@
     (synopsis "File management support (core library)")
     (description "LibFM provides file management functions built on top of
 Glib/GIO giving a higher-level API.")
-    (home-page "http://lxde.org")
+    (home-page "https://lxde.org")
     (license license:gpl2+)))
 
 (define-public libfm-extra
@@ -100,7 +119,7 @@ libFM file management library.")))
     (synopsis "LXDE GTK+ theme switcher")
     (description "LXAppearance is a desktop-independent GTK+ theme switcher
 able to change themes, icons, and fonts used by GTK+ applications.")
-    (home-page "http://lxde.org")
+    (home-page "https://lxde.org")
     (license license:gpl2+)))
 
 (define-public lxrandr
@@ -126,22 +145,22 @@ relies on the X11 resize-and-rotate (RandR) extension but doesn't aim to be a
 full frontend of it.  LXRandR only gives you some easy and quick options which
 are intuitive.  It's suitable for laptop users who frequently uses projectors
 or external monitor.")
-    (home-page "http://lxde.org")
+    (home-page "https://lxde.org")
     (license license:gpl2+)))
 
 (define-public lxtask
   (package
     (name "lxtask")
-    (version "0.1.7")
+    (version "0.1.9")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/lxde/LXTask"
                                   "%20%28task%20manager%29/LXTask%20"
                                   (version-major+minor version) ".x/"
-                                  name "-" version ".tar.xz"))
+                                  "lxtask-" version ".tar.xz"))
               (sha256
                (base32
-                "1zihhvzsg9bl6k0gv7jwx6cgsi3rmcagvnmshc1h0mjq2immmdph"))))
+                "0cv4hx5dg01hbyi5p10pl78n0a40xajpq4wx9c7886pkmpq8isj1"))))
     (build-system gnu-build-system)
     (inputs `(("gtk+" ,gtk+-2)))
     (native-inputs `(("intltool"   ,intltool)
@@ -150,27 +169,22 @@ or external monitor.")
     (description "LXTask is a lightweight task manager derived from Xfce task
 manager with all dependencies on Xfce removed.  LXTask is based on the GTK+
 toolkit.  It allows users to monitor and control of running processes.")
-    (home-page "http://lxde.org")
+    (home-page "https://lxde.org")
     (license license:gpl2+)))
 
 (define-public lxterminal
   (package
     (name "lxterminal")
-    (version "0.3.0")
+    (version "0.3.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/lxde/LXTerminal"
                                   "%20%28terminal%20emulator%29/LXTerminal%20"
                                   version "/" name "-" version ".tar.xz"))
-              (patches (search-patches "lxterminal-CVE-2016-10369.patch"))
               (sha256
                (base32
-                "1yf76s15zvfw0h42b0ay1slpq47khgjmcry8ki2z812zar9lchia"))))
+                "1124pghrhnx6q4391ri8nvi6bsmvbj1dx81an08mird8jf2b2rii"))))
     (build-system gnu-build-system)
-    (arguments
-     `(;; Tests for "po" fail with "No rule to make target '../src/encoding.c'
-       ;; needed by 'lxterminal.pot'. Stop."
-       #:tests? #f))
     (inputs `(("gtk+" ,gtk+-2)
               ("vte"  ,vte/gtk+-2)))
     (native-inputs `(("intltool"   ,intltool)
@@ -180,13 +194,13 @@ toolkit.  It allows users to monitor and control of running processes.")
 multiple tabs and has only minimal dependencies thus being completely
 desktop-independent.  In order to reduce memory usage and increase the
 performance, all instances of the terminal are sharing a single process.")
-    (home-page "http://lxde.org")
+    (home-page "https://lxde.org")
     (license license:gpl2+)))
 
 (define-public menu-cache
   (package
     (name "menu-cache")
-    (version "1.0.2")
+    (version "1.1.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/lxde/" name "/"
@@ -194,7 +208,7 @@ performance, all instances of the terminal are sharing a single process.")
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1m8j40npykfcfqs43kc0fmksal2jfmfi8lnb3mq3xy1lvvrfv0vg"))))
+                "1iry4zlpppww8qai2cw4zid4081hh7fz8nzsp5lqyffbkm2yn0pd"))))
     (build-system gnu-build-system)
     (inputs `(("glib"  ,glib)
               ("libfm" ,libfm-extra)))
@@ -202,36 +216,197 @@ performance, all instances of the terminal are sharing a single process.")
     (synopsis "LXDE implementation of the freedesktop menu's cache")
     (description "Menu-cache is a library creating and utilizing caches to
 speed up the access to freedesktop.org defined application menus.")
-    (home-page "http://lxde.org")
+    (home-page "https://lxde.org")
     (license license:lgpl2.1+)))
 
 (define-public pcmanfm
   (package
     (name "pcmanfm")
-    (version "1.2.5")
+    (version "1.3.1")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://sourceforge/" name "/"
+              (uri (string-append "mirror://sourceforge/pcmanfm/"
                                   "PCManFM%20%2B%20Libfm%20%28tarball%20release"
-                                  "%29/PCManFM/" name "-" version ".tar.xz"))
+                                  "%29/PCManFM/pcmanfm-" version ".tar.xz"))
               (sha256
                (base32
-                "0rxdh0dfzc84l85c54blq42gczygq8adhr3l9hqzy1dp530cm1hc"))))
+                "0mb8hg76x1z0szdyl0w7jpz0bdblc6a29is1vvnh79z37qxh8138"))))
     (build-system gnu-build-system)
-    ;; (#:configure-flags '("--sysconfdir=/etc")) suggested in README.
     (inputs `(("gtk+"   ,gtk+-2)
-              ;; TODO: add ("gvfs" ,gvfs).
+              ("gvfs"   ,gvfs)          ; for trash and mount support
               ("libfm"  ,libfm)
               ("libx11" ,libx11)))
     (native-inputs `(("intltool"   ,intltool)
                      ("libtool"    ,libtool)
                      ("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     `(("lxmenu-data" ,lxmenu-data)))   ; for "Open With..." application list
     (synopsis "LXDE file manager")
     (description "PCMan is a lightweight GTK+ based file manager, compliant
 with freedesktop.org standard.")
-    (home-page "http://lxde.org")
+    (home-page "https://lxde.org")
     (license license:gpl2+)))
 
+(define-public spacefm
+  ;; SpaceFM is based on PCManFM.
+  (package
+    (name "spacefm")
+    (version "1.0.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/IgnorantGuru/spacefm.git")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "193mdcv73cfc2bnm4bzmnf1wmkzgj1ya64y0lgyxn3ww36ghcsx9"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (substitute* "src/main.c"
+             (("#include <sys/types\\.h>" all)
+              ;; Add missing include for 'major' and 'minor' with glibc
+              ;; >= 2.28.
+              (string-append all "\n"
+                             "#include <sys/sysmacros.h>\n")))
+           #t))))
+    (build-system glib-or-gtk-build-system)
+    (native-inputs
+     `(("desktop-file-utils" ,desktop-file-utils)
+       ("glib:bin" ,glib "bin")
+       ("gtk+:bin" ,gtk+ "bin")
+       ("intltool" ,intltool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("bash" ,bash)
+       ("btrfs-progs" ,btrfs-progs)
+       ("cairo" ,cairo)
+       ("coreutils" ,coreutils)
+       ("curlftpfs" ,curlftpfs)
+       ("e2fsprogs" ,e2fsprogs)
+       ("eudev" ,eudev)
+       ("fakeroot" ,fakeroot)
+       ("ffmpegthumbnailer" ,ffmpegthumbnailer)
+       ("fsarchiver" ,fsarchiver)
+       ("fuseiso" ,fuseiso)
+       ("glib" ,glib)
+       ("gphotofs" ,gphotofs)
+       ("gtk+" ,gtk+)
+       ("ifuse" ,ifuse)
+       ("jmtpfs" ,jmtpfs)
+       ("ktsuss" ,ktsuss)
+       ("libx11" ,libx11)
+       ("lsof" ,lsof)
+       ("ntfs-3g" ,ntfs-3g)
+       ("pango" ,pango)
+       ("procps" ,procps)
+       ("shared-mime-info" ,shared-mime-info)
+       ("startup-notification" ,startup-notification)
+       ("udevil" ,udevil)
+       ("util-linux" ,util-linux)
+       ("wget" ,wget)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-bin-dirs
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((bash (assoc-ref inputs "bash"))
+                    (coreutils (assoc-ref inputs "coreutils"))
+                    (util-linux (assoc-ref inputs "util-linux"))
+                    (procps (assoc-ref inputs "procps"))
+                    (e2fsprogs (assoc-ref inputs "e2fsprogs"))
+                    (btrfs-progs (assoc-ref inputs "btrfs-progs"))
+                    (ntfs-3g (assoc-ref inputs "ntfs-3g"))
+                    (lsof (assoc-ref inputs "lsof"))
+                    (fsarchiver (assoc-ref inputs "fsarchiver"))
+                    (ktsuss (assoc-ref inputs "ktsuss")))
+               (with-directory-excursion "src"
+                 (substitute* '("ptk/ptk-file-task.c" "ptk/ptk-handler.h"
+                                "ptk/ptk-location-view.c" "spacefm-auth"
+                                "spacefm-auth.bash" "vfs/vfs-file-task.c"
+                                "settings.c" "../data/ui/prefdlg.ui"
+                                "../data/ui/prefdlg2.ui")
+                   (("/bin/sh" file) (string-append bash file))
+                   (("/bin/bash" file) (string-append bash file))
+                   (("/bin/kill" file) (string-append coreutils file))
+                   (("/bin/ls" file) (string-append coreutils file))
+                   (("/usr(/bin/sha256sum)" _ file) (string-append coreutils file))
+                   (("/usr(/bin/sha512sum)" _ file) (string-append coreutils file))
+                   (("/sbin/fsck" file) (string-append util-linux file))
+                   (("/sbin/mkfs" file) (string-append util-linux file))
+                   (("/sbin/mkswap" file) (string-append util-linux file))
+                   (("/bin/ps" file) (string-append procps file))
+                   (("/sbin/tune2fs" file) (string-append e2fsprogs file))
+                   (("/sbin/btrfs") (string-append btrfs-progs "/bin/btrfs"))
+                   (("/sbin/ntfslabel" file) (string-append ntfs-3g file))
+                   (("/usr(/bin/lsof)" _ file) (string-append lsof file))
+                   (("(/usr)?/(sbin|bin)/fsarchiver") (string-append fsarchiver
+                                                                     "/sbin/fsarchiver"))
+                   (("/usr(/bin/ktsuss)" _ file) (string-append ktsuss file))))
+               #t)))
+         (add-after 'patch-bin-dirs 'patch-share-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (share (string-append out "/share")))
+               (with-directory-excursion "src"
+                 (substitute* '("main-window.c" "settings.c"
+                                "ptk/ptk-app-chooser.c")
+                   (("/usr(/local)?/share") share)))
+               #t)))
+         (add-after 'patch-share-dirs 'patch-mime-dirs
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((mime (string-append (assoc-ref inputs "shared-mime-info")
+                                         "/share/mime")))
+               (with-directory-excursion "src"
+                 (substitute* '("mime-type/mime-type.c" "ptk/ptk-file-menu.c")
+                   (("/usr(/local)?/share/mime") mime)))
+               #t)))
+         (add-after 'patch-mime-dirs 'patch-setuid-progs
+           (lambda _
+             (let* ((su "/run/setuid-programs/su")
+                    (mount "/run/setuid-programs/mount")
+                    (umount "/run/setuid-programs/umount")
+                    (udevil "/run/setuid-programs/udevil"))
+               (with-directory-excursion "src"
+                 (substitute* '("settings.c" "settings.h" "vfs/vfs-file-task.c"
+                                "vfs/vfs-volume-hal.c" "../data/ui/prefdlg.ui"
+                                "../data/ui/prefdlg2.ui")
+                   (("(/usr)?/bin/su") su)
+                   (("/(bin|sbin)/mount") mount)
+                   (("/(bin|sbin)/umount") umount)
+                   (("/usr/bin/udevil") udevil)))
+               #t)))
+         (add-after 'patch-setuid-progs 'patch-spacefm-conf
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "etc/spacefm.conf"
+               (("#terminal_su=/bin/su")
+                "terminal_su=/run/setuid-programs/su")
+               (("#graphical_su=/usr/bin/gksu")
+                (string-append "graphical_su="
+                               (string-append (assoc-ref inputs "ktsuss")
+                                              "/bin/ktsuss"))))
+             #t)))
+       #:configure-flags (list
+                          (string-append "--with-preferable-sudo="
+                                         (assoc-ref %build-inputs "ktsuss")
+                                         "/bin/ktsuss")
+                          (string-append "--with-bash-path="
+                                         (assoc-ref %build-inputs "bash")
+                                         "/bin/bash")
+                          (string-append "--sysconfdir="
+                                         (assoc-ref %outputs "out")
+                                         "/etc"))))
+    (home-page "https://ignorantguru.github.io/spacefm/")
+    (synopsis "Multi-panel tabbed file manager")
+    (description "SpaceFM is a graphical, multi-panel, tabbed file manager
+based on PCManFM with built-in virtual file system, udev-based device manager,
+customizable menu system, and Bash integration.")
+
+    ;; The combination is GPLv3+ but src/exo is under LGPLv3+.
+    (license license:gpl3+)))
+
 (define-public lxmenu-data
   (package
     (name "lxmenu-data")
@@ -252,7 +427,7 @@ with freedesktop.org standard.")
     (description
      "Lxmenu-data provides files required to build freedesktop.org
 menu spec-compliant desktop menus for LXDE.")
-    (home-page "http://lxde.org")
+    (home-page "https://lxde.org")
     (license license:lgpl2.1+)))
 
 (define-public lxde-icon-theme
@@ -273,7 +448,7 @@ menu spec-compliant desktop menus for LXDE.")
     (synopsis "LXDE default icon theme based on nuoveXT2")
     (description
      "Lxde-icon-theme provides an default icon theme for LXDE.")
-    (home-page "http://lxde.org")
+    (home-page "https://lxde.org")
     (license license:lgpl3)))
 
 (define-public lxde-common
@@ -312,7 +487,7 @@ menu spec-compliant desktop menus for LXDE.")
     (synopsis "Common files of the LXDE Desktop")
     (description
      "Lxde-common provides common files of the LXDE Desktop.")
-    (home-page "http://lxde.org")
+    (home-page "https://lxde.org")
     (license license:gpl2+)))
 
 (define-public lxinput
@@ -337,7 +512,7 @@ menu spec-compliant desktop menus for LXDE.")
     (description
      "Lxinput provides a small program to configure keyboard and mouse
 in LXDE.")
-    (home-page "http://lxde.org")
+    (home-page "https://lxde.org")
     (license license:gpl2+)))
 
 (define-public lxsession
@@ -365,17 +540,18 @@ in LXDE.")
                    (and (string-suffix? ".c" file)
                         (file-exists? (c->vala file))))))
            (for-each delete-file
-                     (find-files "." generated-c-file?))))))
+                     (find-files "." generated-c-file?))
+           #t))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'rm-stamp
            (lambda _
-             (for-each delete-file (find-files "." "\\.stamp$"))))
-         (add-after 'rm-stamp 'autoreconf
-           (lambda _
-             (zero? (system* "autoreconf" "-vfi")))))))
+             (for-each delete-file (find-files "." "\\.stamp$"))
+             ;; Force regeneration of configure script.
+             (delete-file "configure")
+             #t)))))
     (inputs
      `(("gtk+-2" ,gtk+-2)
        ("polkit" ,polkit)))
@@ -389,7 +565,7 @@ in LXDE.")
     (synopsis "Lightweight X11 session manager")
     (description
      "Lxsession provides an lightweight X11 session manager.")
-    (home-page "http://lxde.org")
+    (home-page "https://lxde.org")
     (license license:gpl2+)))
 
 (define-public lxpanel
@@ -440,7 +616,7 @@ in LXDE.")
     (synopsis "X11 Desktop panel for LXDE")
     (description
      "Lxpanel provides an X11 desktop panel for LXDE.")
-    (home-page "http://lxde.org")
+    (home-page "https://lxde.org")
     (license license:gpl2+)))
 
 (define-public lxde
@@ -449,7 +625,7 @@ in LXDE.")
     (version (package-version lxde-common))
     (source #f)
     (build-system trivial-build-system)
-    (arguments '(#:builder (mkdir %output)))
+    (arguments '(#:builder (begin (mkdir %output) #t)))
     (propagated-inputs
      ;; TODO:
      ;; lxshortcut, lxsession-edit