Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / xdisorg.scm
index ce8f6b5..ed801d6 100644 (file)
 ;;; Copyright © 2016 Petter <petter@mykolab.ch>
 ;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com>
 ;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
-;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Marek Benc <dusxmt@gmx.com>
 ;;; Copyright © 2017 Mike Gerwitz <mtg@gnu.org>
 ;;; Copyright © 2018 Thomas Sigurdsen <tonton@riseup.net>
 ;;; Copyright © 2018, 2019 Rutger Helling <rhelling@mykolab.com>
-;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2018 Nam Nguyen <namn@berkeley.edu>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -69,6 +69,7 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages icu4c)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages ncurses)
@@ -132,6 +133,60 @@ are saved as executable shell scripts which can be loaded without using this
 program.")
     (license license:gpl3+)))
 
+(define-public autorandr
+  ;; Use latest commit since 1.7 lacks many new features such as the
+  ;; autorandr_launcher.
+  (let ((commit "b484c0ea9c9a4838278bbd661a7cc384333c1df8"))
+    (package
+      (name "autorandr")
+      (version (git-version "1.7" "1" commit))
+      (home-page "https://github.com/phillipberndt/autorandr")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url home-page)
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0da17kzsisjv3s993j5idkk1n2d2cvjdn7pngs2b0ic1r2h5z02h"))))
+      (build-system python-build-system)
+      (native-inputs
+       `(("man-db" ,man-db)))
+      (inputs
+       `(("xrandr" ,xrandr)
+         ("libxcb" ,libxcb)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-before 'build 'configure
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "autorandr.py"
+                 (("popen\\(\"xrandr") (string-append "popen(\""
+                                                      (assoc-ref inputs "xrandr")
+                                                      "/bin/xrandr"))
+                 (("\\[\"xrandr") (string-append "[\""
+                                                 (assoc-ref inputs "xrandr")
+                                                 "/bin/xrandr")))
+               #t))
+           (add-after 'install 'install-contrib
+             (lambda* (#:key outputs #:allow-other-keys)
+               (invoke "make"
+                       (string-append "DESTDIR=" (assoc-ref outputs "out"))
+                       "PREFIX="
+                       "BASH_COMPLETIONS_DIR=etc/bash_completiond.d"
+                       "install_manpage"
+                       "install_bash_completion"
+                       "install_launcher"))))))
+      (synopsis "Auto-detect connected displays and load appropiate setup")
+      (description "Autorandr wraps around xrandr to help with X11
+multi-screen configuration management.  It allows the user to create profiles
+for various multi-screen setups.  Autorandr automatically detects the profiles
+that can be activated based on the connected hardware.  Hook scripts can be
+used to further tweak the behaviour of the different profiles.")
+      (license license:gpl3+))))
+
 (define-public xclip
   (package
     (name "xclip")
@@ -164,14 +219,14 @@ avoiding password prompts when X11 forwarding has already been setup.")
 (define-public libxkbcommon
   (package
     (name "libxkbcommon")
-    (version "0.8.3")
+    (version "0.8.4")
     (source (origin
              (method url-fetch)
-             (uri (string-append "https://xkbcommon.org/download/" name "-"
+             (uri (string-append "https://xkbcommon.org/download/libxkbcommon-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0h2mh8j21xvf1h3kz81q1pvkd9j9nzb9kbd46ncap5wshhlwcmdq"))))
+               "12vc91ydhphd5sddz15560r41l7k0i7mq6nma8kkbzdp6bwwzpb0"))))
     (build-system gnu-build-system)
     (inputs
      `(("libx11" ,libx11)
@@ -455,39 +510,24 @@ move windows, switch between desktops, etc.).")
 (define-public scrot
   (package
     (name "scrot")
-    (version "0.8")
-    (source (origin
-              (method url-fetch)
-              (uri (list (string-append
-                           "http://linuxbrit.co.uk/downloads/scrot-"
-                           version ".tar.gz")
-                         (string-append
-                           "https://fossies.org/linux/privat/old/scrot-"
-                           version ".tar.gz")))
-              (sha256
-               (base32
-                "1wll744rhb49lvr2zs6m93rdmiq59zm344jzqvijrdn24ksiqgb1"))))
+    (version "0.9")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/resurrecting-open-source-projects/scrot.git")
+         (commit version)))
+       (sha256
+        (base32 "1dg0pnmk09p7zlbyxv7d40vf54amrv73y976ds5p7096x6lmlndy"))))
     (build-system gnu-build-system)
-    (arguments
-     ;; By default, man and doc are put in PREFIX/{man,doc} instead of
-     ;; PREFIX/share/{man,doc}.
-     '(#:configure-flags
-       (list (string-append "--mandir="
-                            (assoc-ref %outputs "out")
-                            "/share/man"))
-       #:phases
-       (modify-phases %standard-phases
-         (replace 'install
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (doc (string-append out "/share/doc/scrot")))
-               (mkdir-p doc)
-               (invoke "make" "install"
-                       (string-append "docsdir=" doc))))))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)))
     (inputs
-     `(("libx11" ,libx11)
-       ("giblib" ,giblib)))
-    (home-page "http://linuxbrit.co.uk/software/")
+     `(("giblib" ,giblib)
+       ("libx11" ,libx11)))
+    (home-page "https://github.com/resurrecting-open-source-projects/scrot")
     (synopsis "Command-line screen capture utility for X Window System")
     (description
      "Scrot allows to save a screenshot of a full screen, a window or a part
@@ -917,15 +957,15 @@ Escape key when Left Control is pressed and released on its own.")
 (define-public libwacom
   (package
     (name "libwacom")
-    (version "0.31")
+    (version "0.32")
     (source (origin
               (method url-fetch)
               (uri (string-append
                     "https://github.com/linuxwacom/libwacom/releases/download/"
-                    name "-" version "/" name "-" version ".tar.bz2"))
+                    "libwacom-" version "/libwacom-" version ".tar.bz2"))
               (sha256
                (base32
-                "00xzkxhm0s9bvhbf27hscjbh17wa8lcgvxjqbmzm527f9cjqrm8q"))))
+                "102kz0q7i0bjsnl6yy83vcj2rpir12rs2d4xr0wvhw84rs5sp7bb"))))
     (build-system glib-or-gtk-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))