gnu: Add ccd2cue
[jackhill/guix/guix.git] / gnu / packages / wine.scm
CommitLineData
8f9580ca 1;;; GNU Guix --- Functional package management for GNU
d43ba6f8 2;;; Copyright © 2014, 2015 Sou Bunnbu <iyzsong@gmail.com>
eeabe5a1 3;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
658c987f 4;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
8f9580ca
SB
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages wine)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix packages)
24 #:use-module (guix download)
eeabe5a1 25 #:use-module (guix utils)
8f9580ca
SB
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages)
025cc9a1 28 #:use-module (gnu packages audio)
8f9580ca
SB
29 #:use-module (gnu packages bison)
30 #:use-module (gnu packages compression)
025cc9a1 31 #:use-module (gnu packages cups)
8f9580ca
SB
32 #:use-module (gnu packages databases)
33 #:use-module (gnu packages fontutils)
34 #:use-module (gnu packages flex)
35 #:use-module (gnu packages image)
36 #:use-module (gnu packages gettext)
37 #:use-module (gnu packages ghostscript)
38 #:use-module (gnu packages gl)
39 #:use-module (gnu packages glib)
8f9580ca
SB
40 #:use-module (gnu packages linux)
41 #:use-module (gnu packages openldap)
42 #:use-module (gnu packages perl)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages mp3)
45 #:use-module (gnu packages ncurses)
46 #:use-module (gnu packages photo)
47 #:use-module (gnu packages samba)
48 #:use-module (gnu packages scanner)
a7fd7b68 49 #:use-module (gnu packages tls)
8f9580ca
SB
50 #:use-module (gnu packages xml)
51 #:use-module (gnu packages xorg))
52
53(define-public wine
54 (package
55 (name "wine")
ec8fdd3b 56 (version "2.0")
8f9580ca
SB
57 (source (origin
58 (method url-fetch)
eeabe5a1
RW
59 (uri (string-append "https://dl.winehq.org/wine/source/"
60 (version-major+minor version)
61 "/wine-" version ".tar.bz2"))
8f9580ca
SB
62 (sha256
63 (base32
ec8fdd3b 64 "1ik6q0h3ph3jizmp7bxhf6kcm1pzrdrn2m0yf2x86slv2aigamlp"))))
8f9580ca
SB
65 (build-system gnu-build-system)
66 (native-inputs `(("pkg-config" ,pkg-config)
b94a6ca0 67 ("gettext" ,gettext-minimal)
8f9580ca
SB
68 ("flex" ,flex)
69 ("bison" ,bison)
70 ("perl" ,perl)))
71 (inputs
72 `(("alsa-lib" ,alsa-lib)
73 ("dbus" ,dbus)
025cc9a1 74 ("cups" ,cups)
8f9580ca
SB
75 ("fontconfig" ,fontconfig)
76 ("freetype" ,freetype)
025cc9a1 77 ("glu" ,glu)
8f9580ca
SB
78 ("gnutls" ,gnutls)
79 ("lcms" ,lcms)
80 ("libxml2" ,libxml2)
81 ("libxslt" ,libxslt)
82 ("libgphoto2" ,libgphoto2)
83 ("libmpg123" ,mpg123)
84 ("libldap" ,openldap)
85 ("libnetapi" ,samba)
4c928743 86 ("libsane" ,sane-backends)
8f9580ca
SB
87 ("libpng" ,libpng)
88 ("libjpeg" ,libjpeg)
89 ("libtiff" ,libtiff)
90 ("libICE" ,libice)
91 ("libX11" ,libx11)
92 ("libXi" ,libxi)
93 ("libXext" ,libxext)
94 ("libXcursor" ,libxcursor)
95 ("libXrender" ,libxrender)
96 ("libXrandr" ,libxrandr)
97 ("libXinerama" ,libxinerama)
98 ("libXxf86vm" ,libxxf86vm)
99 ("libXcomposite" ,libxcomposite)
8f9580ca 100 ("ncurses" ,ncurses)
025cc9a1 101 ("openal" ,openal)
8f9580ca
SB
102 ("unixodbc" ,unixodbc)
103 ("zlib" ,zlib)))
104 (arguments
105 `(;; The 64-bit build of Wine is reportedly less useful or even usable,
106 ;; so force a 32-bit build (under the assumption that this package is
107 ;; being used on an IA32-compatible architecture.)
108 #:system "i686-linux"
109
110 ;; XXX: There's a test suite, but it's unclear whether it's supposed to
111 ;; pass.
112 #:tests? #f
113
6c0dfb19
SB
114 #:configure-flags
115 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
116
eeabe5a1
RW
117 #:make-flags
118 (list "SHELL=bash")
119
8f9580ca 120 #:phases
07cda02c
EF
121 (modify-phases %standard-phases
122 (add-after 'configure 'patch-dlopen-paths
123 ;; Hardcode dlopened sonames to absolute paths.
124 (lambda _
125 (let* ((library-path (search-path-as-string->list
126 (getenv "LIBRARY_PATH")))
127 (find-so (lambda (soname)
128 (search-path library-path soname))))
129 (substitute* "include/config.h"
130 (("(#define SONAME_.* )\"(.*)\"" _ defso soname)
131 (format #f "~a\"~a\"" defso (find-so soname))))
132 #t))))))
658c987f 133 (home-page "https://www.winehq.org/")
8f9580ca
SB
134 (synopsis "Implementation of the Windows API")
135 (description
136 "Wine (originally an acronym for \"Wine Is Not an Emulator\") is a
137compatibility layer capable of running Windows applications. Instead of
138simulating internal Windows logic like a virtual machine or emulator, Wine
139translates Windows API calls into POSIX calls on-the-fly, eliminating the
140performance and memory penalties of other methods and allowing you to cleanly
141integrate Windows applications into your desktop.")
142 (license license:lgpl2.1+)
143
144 ;; It really only supports IA32, but building on x86_64 will have the same
145 ;; effect as building on i686 anyway.
146 (supported-systems '("i686-linux" "x86_64-linux"))))