gnu: Use 'modify-phases' syntax.
[jackhill/guix/guix.git] / gnu / packages / xorg.scm
index 2ae87a6..8554060 100644 (file)
@@ -41,6 +41,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
         ("xproto" ,xproto)))
     (arguments
      `(#:phases
-       (alist-cons-after
-        'install 'install-data
-        (lambda* (#:key inputs outputs #:allow-other-keys)
-          (let ((cf-files (assoc-ref inputs "xorg-cf-files"))
-                (out (assoc-ref outputs "out"))
-                (unpack (assoc-ref %standard-phases 'unpack))
-                (patch-source-shebangs
-                 (assoc-ref %standard-phases 'patch-source-shebangs)))
-            (mkdir "xorg-cf-files")
-            (with-directory-excursion "xorg-cf-files"
-              (apply unpack (list #:source cf-files))
-              (apply patch-source-shebangs (list #:source cf-files))
-              (substitute* '("mingw.cf" "Imake.tmpl" "nto.cf" "os2.cf"
-                             "linux.cf" "Amoeba.cf" "cygwin.cf")
-                (("/bin/sh") (which "bash")))
-              (and (zero? (system* "./configure"
-                                   (string-append "SHELL=" (which "bash"))
-                                   (string-append "--prefix=" out)))
-                   (zero? (system* "make" "install"))))))
-        %standard-phases)))
+       (modify-phases %standard-phases
+         (add-after 'install 'install-data
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((cf-files (assoc-ref inputs "xorg-cf-files"))
+                   (out (assoc-ref outputs "out"))
+                   (unpack (assoc-ref %standard-phases 'unpack))
+                   (patch-source-shebangs
+                    (assoc-ref %standard-phases 'patch-source-shebangs)))
+               (mkdir "xorg-cf-files")
+               (with-directory-excursion "xorg-cf-files"
+                 (apply unpack (list #:source cf-files))
+                 (apply patch-source-shebangs (list #:source cf-files))
+                 (substitute* '("mingw.cf" "Imake.tmpl" "nto.cf" "os2.cf"
+                                "linux.cf" "Amoeba.cf" "cygwin.cf")
+                   (("/bin/sh") (which "bash")))
+                 (and (zero? (system* "./configure"
+                                      (string-append "SHELL=" (which "bash"))
+                                      (string-append "--prefix=" out)))
+                      (zero? (system* "make" "install"))))))))))
     (home-page "http://www.x.org")
     (synopsis "Source code configuration and build system")
     (description
@@ -1979,11 +1979,8 @@ server.")
         ("libxau" ,libxau)
         ("libx11" ,libx11)))
     (native-inputs
-      `(("pkg-config" ,pkg-config)))
-
-    ;; FIXME: The test suite needs http://liw.fi/cmdtest/
-    (arguments `(#:tests? #f))
-
+     `(("cmdtest" ,cmdtest)
+       ("pkg-config" ,pkg-config)))
     (home-page "https://www.x.org/wiki/")
     (synopsis "X authority file utility")
     (description
@@ -2420,7 +2417,7 @@ including most mice, keyboards, tablets and touchscreens.")
 (define-public xf86-input-libinput
   (package
     (name "xf86-input-libinput")
-    (version "0.25.1")
+    (version "0.26.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2428,7 +2425,7 @@ including most mice, keyboards, tablets and touchscreens.")
                     name "-" version ".tar.bz2"))
               (sha256
                (base32
-                "1q67hjd67ni1nq7kgxdrrdgkyhzaqvvn2vlnsiiq9w4y3icpv7s8"))))
+                "0yrqs88b7yn9nljwlxzn76jfmvf0sh939kzij5b2jvr2qa7mbjmb"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags
@@ -2648,7 +2645,7 @@ as USB mice.")
 (define-public xf86-video-ati
   (package
     (name "xf86-video-ati")
-    (version "7.9.0")
+    (version "7.10.0")
     (source
       (origin
         (method url-fetch)
@@ -2658,7 +2655,7 @@ as USB mice.")
                ".tar.bz2"))
         (sha256
           (base32
-            "0xcq0lncb5p4sas5866qpkjyp1v8ksalw7m1gmqb3brhccp8gb9w"))))
+            "0yafix56vkqglw243cwb94nv91vbjv12sqh29x1bap0hwd1dclgf"))))
     (build-system gnu-build-system)
     (inputs `(("mesa" ,mesa)
               ("xxf86driproto" ,xf86driproto)
@@ -2749,7 +2746,8 @@ framebuffer device.")
        `(("libdrm" ,libdrm)
          ("mesa" ,mesa)
          ("udev" ,eudev)
-         ("xorg-server" ,xorg-server)))
+         ("xorg-server" ,xorg-server)
+         ("zlib" ,zlib)))
       (native-inputs
        `(("pkg-config" ,pkg-config)
          ("autoconf" ,autoconf)
@@ -2886,8 +2884,8 @@ X server.")
 
 
 (define-public xf86-video-intel
-  (let ((commit "2100efa105e8c9615eda867d39471d78e500b1bb")
-        (revision "7"))
+  (let ((commit "c89905754b929f0421db7ea6d60b8942ccdbd8af")
+        (revision "8"))
     (package
       (name "xf86-video-intel")
       (version (string-append "2.99.917-" revision "-"
@@ -2901,7 +2899,7 @@ X server.")
                (commit commit)))
          (sha256
           (base32
-           "15fg844msmixsvlxcd5wm2awmns652sxcxj2wmp6819lr32lc4ir"))
+           "1xiyxhlq88vvgjavhxdkk933b5q7vm4jn6db144a6sqzifwaj672"))
          (file-name (string-append name "-" version))))
       (build-system gnu-build-system)
       (inputs `(("mesa" ,mesa)
@@ -5074,8 +5072,21 @@ over Xlib, including:
          (base32
           "162s1v901djr57gxmmk4airk8hiwcz79dqyz72972x1lw1k82yk7"))
         (patches
-         (search-patches "xorg-server-CVE-2017-10971.patch"
-                         "xorg-server-CVE-2017-10972.patch"))))
+         (cons
+          ;; See:
+          ;;   https://lists.fedoraproject.org/archives/list/devel@lists.
+          ;;      fedoraproject.org/message/JU655YB7AM4OOEQ4MOMCRHJTYJ76VFOK/
+          (origin
+            (method url-fetch)
+            (uri (string-append
+                  "http://pkgs.fedoraproject.org/cgit/rpms/xorg-x11-server.git"
+                  "/plain/06_use-intel-only-on-pre-gen4.diff"))
+            (sha256
+             (base32
+              "0mm70y058r8s9y9jiv7q2myv0ycnaw3iqzm7d274410s0ik38w7q"))
+            (file-name "xorg-server-use-intel-only-on-pre-gen4.diff"))
+          (search-patches "xorg-server-CVE-2017-10971.patch"
+                          "xorg-server-CVE-2017-10972.patch")))))
     (build-system gnu-build-system)
     (propagated-inputs
       `(("dri2proto" ,dri2proto)
@@ -5766,6 +5777,12 @@ programs that cannot use the window system directly.")
        #:parallel-build? #f
        #:phases
        (modify-phases %standard-phases
+         (add-before 'configure 'set-perl-search-path
+           (lambda _
+             (setenv "PERL5LIB"
+                     (string-append (getcwd) ":"
+                                    (getenv "PERL5LIB")))
+             #t))
          (add-before 'build 'patch-Makefile
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "Makefile"