gnu: Add wine-staging.
[jackhill/guix/guix.git] / gnu / packages / wine.scm
index 9a1bd56..9c99dfd 100644 (file)
@@ -1,6 +1,8 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,6 +26,7 @@
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages openldap)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages mp3)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages samba)
   #:use-module (gnu packages scanner)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
 (define-public wine
   (package
     (name "wine")
-    (version "1.9.15")
+    (version "2.0.3")
     (source (origin
               (method url-fetch)
-              (uri (string-append "https://dl.winehq.org/wine/source/"
-                                  (version-major+minor version)
-                                  "/wine-" version ".tar.bz2"))
+              (uri (string-append "https://dl.winehq.org/wine/source/2.0"
+                                  "/wine-" version ".tar.xz"))
               (sha256
                (base32
-                "1nmd65knzyh8b0yhxlqqvzai5rpnmhhm0c46n789zr5hj74jm6fg"))))
+                "0mmyc94r5drffir8zr8jx6iawhgfzjk96fj494aa18vhz1jcc4d8"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("gettext" ,gettext-minimal)
      `(("alsa-lib" ,alsa-lib)
        ("dbus" ,dbus)
        ("cups" ,cups)
+       ("eudev" ,eudev)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
        ("glu" ,glu)
        ("gnutls" ,gnutls)
+       ("gst-plugins-base" ,gst-plugins-base)
        ("lcms" ,lcms)
        ("libxml2" ,libxml2)
        ("libxslt" ,libxslt)
@@ -83,6 +90,7 @@
        ("libldap" ,openldap)
        ("libnetapi" ,samba)
        ("libsane" ,sane-backends)
+       ("libpcap" ,libpcap)
        ("libpng" ,libpng)
        ("libjpeg" ,libjpeg)
        ("libtiff" ,libtiff)
        ("libXcomposite" ,libxcomposite)
        ("ncurses" ,ncurses)
        ("openal" ,openal)
+       ("pulseaudio" ,pulseaudio)
        ("unixodbc" ,unixodbc)
+       ("v4l-utils" ,v4l-utils)
        ("zlib" ,zlib)))
     (arguments
-     `(;; The 64-bit build of Wine is reportedly less useful or even usable,
-       ;; so force a 32-bit build (under the assumption that this package is
+     `(;; Force a 32-bit build (under the assumption that this package is
        ;; being used on an IA32-compatible architecture.)
        #:system "i686-linux"
 
        (list "SHELL=bash")
 
        #:phases
-       (alist-cons-after
-        'configure 'patch-dlopen-paths
-        ;; Hardcode dlopened sonames to absolute paths.
-        (lambda _
-          (let* ((library-path (search-path-as-string->list
-                                (getenv "LIBRARY_PATH")))
-                 (find-so (lambda (soname)
-                            (search-path library-path soname))))
-            (substitute* "include/config.h"
-              (("(#define SONAME_.* )\"(.*)\"" _ defso soname)
-               (format #f "~a\"~a\"" defso (find-so soname))))))
-        %standard-phases)))
-    (home-page "http://www.winehq.org/")
+       (modify-phases %standard-phases
+         (add-after 'configure 'patch-dlopen-paths
+           ;; Hardcode dlopened sonames to absolute paths.
+           (lambda _
+             (let* ((library-path (search-path-as-string->list
+                                   (getenv "LIBRARY_PATH")))
+                    (find-so (lambda (soname)
+                               (search-path library-path soname))))
+               (substitute* "include/config.h"
+                 (("(#define SONAME_.* )\"(.*)\"" _ defso soname)
+                  (format #f "~a\"~a\"" defso (find-so soname))))
+               #t))))))
+    (home-page "https://www.winehq.org/")
     (synopsis "Implementation of the Windows API")
     (description
      "Wine (originally an acronym for \"Wine Is Not an Emulator\") is a
@@ -143,3 +152,62 @@ integrate Windows applications into your desktop.")
     ;; It really only supports IA32, but building on x86_64 will have the same
     ;; effect as building on i686 anyway.
     (supported-systems '("i686-linux" "x86_64-linux"))))
+
+(define-public wine64
+  (package
+    (inherit wine)
+    (name "wine64")
+    (arguments
+     `(#:make-flags
+       (list "SHELL=bash"
+             (string-append "libdir=" %output "/lib"))
+       #:configure-flags
+       (list "--enable-win64"
+             (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
+       ,@(strip-keyword-arguments '(#:configure-flags #:make-flags #:system)
+                                  (package-arguments wine))))
+    (synopsis "Implementation of the Windows API (64-bit version)")
+    (supported-systems '("x86_64-linux" "aarch64-linux"))))
+
+;; TODO: This is wine development version, provided for historical reasons.
+;; We can remove it as soon as a new stable release is out.
+(define-public wine-next
+  (package (inherit wine)
+    (name "wine-next")
+    (version "2.11")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://dl.winehq.org/wine/source/2.x"
+                                  "/wine-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0g6cwjyqwc660w33453aklh3hpc0b8rrb88dryn23ah6wannvagg"))))))
+
+(define-public wine-staging
+  (package
+    (inherit wine)
+    (name "wine-staging")
+    (version "2.21")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/wine-compholio/wine-patched/archive/"
+                    "staging-" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1pjaxj7h3q6y356np908fvsx0bf7yx5crqvgl4hza6gfssdmsr5r"))))
+    (synopsis "Implementation of the Windows API (staging branch)")
+    (description "Wine-Staging is the testing area of Wine.  It
+contains bug fixes and features, which have not been integrated into
+the development branch yet.  The idea of Wine-Staging is to provide
+experimental features faster to end users and to give developers the
+possibility to discuss and improve their patches before they are
+integrated into the main branch.")
+    (home-page "https://wine-staging.com")
+    ;; In addition to the regular Wine license (lgpl2.1+), Wine-Staging
+    ;; provides Liberation and WenQuanYi Micro Hei fonts.  Those use
+    ;; different licenses.  In particular, the latter is licensed under
+    ;; both GPL3+ and Apache 2 License.
+    (license
+     (list license:lgpl2.1+ license:silofl1.1 license:gpl3+ license:asl2.0))))