Commit | Line | Data |
---|---|---|
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> |
44cba47e | 4 | ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il> |
f885fc75 | 5 | ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com> |
51f01907 | 6 | ;;; Copyright © 2017 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
8f9580ca SB |
7 | ;;; |
8 | ;;; This file is part of GNU Guix. | |
9 | ;;; | |
10 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
11 | ;;; under the terms of the GNU General Public License as published by | |
12 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
13 | ;;; your option) any later version. | |
14 | ;;; | |
15 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
16 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;;; GNU General Public License for more details. | |
19 | ;;; | |
20 | ;;; You should have received a copy of the GNU General Public License | |
21 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
22 | ||
23 | (define-module (gnu packages wine) | |
24 | #:use-module ((guix licenses) #:prefix license:) | |
25 | #:use-module (guix packages) | |
26 | #:use-module (guix download) | |
eeabe5a1 | 27 | #:use-module (guix utils) |
8f9580ca SB |
28 | #:use-module (guix build-system gnu) |
29 | #:use-module (gnu packages) | |
1aa6582e | 30 | #:use-module (gnu packages admin) |
025cc9a1 | 31 | #:use-module (gnu packages audio) |
8f9580ca SB |
32 | #:use-module (gnu packages bison) |
33 | #:use-module (gnu packages compression) | |
025cc9a1 | 34 | #:use-module (gnu packages cups) |
8f9580ca SB |
35 | #:use-module (gnu packages databases) |
36 | #:use-module (gnu packages fontutils) | |
37 | #:use-module (gnu packages flex) | |
38 | #:use-module (gnu packages image) | |
39 | #:use-module (gnu packages gettext) | |
40 | #:use-module (gnu packages ghostscript) | |
41 | #:use-module (gnu packages gl) | |
42 | #:use-module (gnu packages glib) | |
1aa6582e | 43 | #:use-module (gnu packages gstreamer) |
141708ed | 44 | #:use-module (gnu packages gtk) |
8f9580ca SB |
45 | #:use-module (gnu packages linux) |
46 | #:use-module (gnu packages openldap) | |
47 | #:use-module (gnu packages perl) | |
05740895 | 48 | #:use-module (gnu packages pulseaudio) |
8f9580ca SB |
49 | #:use-module (gnu packages pkg-config) |
50 | #:use-module (gnu packages mp3) | |
51 | #:use-module (gnu packages ncurses) | |
52 | #:use-module (gnu packages photo) | |
53 | #:use-module (gnu packages samba) | |
54 | #:use-module (gnu packages scanner) | |
a7fd7b68 | 55 | #:use-module (gnu packages tls) |
1aa6582e | 56 | #:use-module (gnu packages video) |
8f9580ca SB |
57 | #:use-module (gnu packages xml) |
58 | #:use-module (gnu packages xorg)) | |
59 | ||
60 | (define-public wine | |
61 | (package | |
62 | (name "wine") | |
faffd821 | 63 | (version "2.0.3") |
8f9580ca SB |
64 | (source (origin |
65 | (method url-fetch) | |
f6444059 | 66 | (uri (string-append "https://dl.winehq.org/wine/source/2.0" |
5a717a95 | 67 | "/wine-" version ".tar.xz")) |
8f9580ca SB |
68 | (sha256 |
69 | (base32 | |
faffd821 | 70 | "0mmyc94r5drffir8zr8jx6iawhgfzjk96fj494aa18vhz1jcc4d8")))) |
8f9580ca SB |
71 | (build-system gnu-build-system) |
72 | (native-inputs `(("pkg-config" ,pkg-config) | |
b94a6ca0 | 73 | ("gettext" ,gettext-minimal) |
5e54f4ad | 74 | ("flex" ,flex) |
8f9580ca SB |
75 | ("bison" ,bison) |
76 | ("perl" ,perl))) | |
77 | (inputs | |
78 | `(("alsa-lib" ,alsa-lib) | |
79 | ("dbus" ,dbus) | |
025cc9a1 | 80 | ("cups" ,cups) |
1aa6582e | 81 | ("eudev" ,eudev) |
8f9580ca SB |
82 | ("fontconfig" ,fontconfig) |
83 | ("freetype" ,freetype) | |
025cc9a1 | 84 | ("glu" ,glu) |
8f9580ca | 85 | ("gnutls" ,gnutls) |
1aa6582e | 86 | ("gst-plugins-base" ,gst-plugins-base) |
8f9580ca SB |
87 | ("lcms" ,lcms) |
88 | ("libxml2" ,libxml2) | |
89 | ("libxslt" ,libxslt) | |
90 | ("libgphoto2" ,libgphoto2) | |
91 | ("libmpg123" ,mpg123) | |
92 | ("libldap" ,openldap) | |
93 | ("libnetapi" ,samba) | |
4c928743 | 94 | ("libsane" ,sane-backends) |
1aa6582e | 95 | ("libpcap" ,libpcap) |
8f9580ca SB |
96 | ("libpng" ,libpng) |
97 | ("libjpeg" ,libjpeg) | |
98 | ("libtiff" ,libtiff) | |
99 | ("libICE" ,libice) | |
100 | ("libX11" ,libx11) | |
101 | ("libXi" ,libxi) | |
102 | ("libXext" ,libxext) | |
103 | ("libXcursor" ,libxcursor) | |
104 | ("libXrender" ,libxrender) | |
105 | ("libXrandr" ,libxrandr) | |
106 | ("libXinerama" ,libxinerama) | |
107 | ("libXxf86vm" ,libxxf86vm) | |
108 | ("libXcomposite" ,libxcomposite) | |
8f9580ca | 109 | ("ncurses" ,ncurses) |
025cc9a1 | 110 | ("openal" ,openal) |
05740895 | 111 | ("pulseaudio" ,pulseaudio) |
8f9580ca | 112 | ("unixodbc" ,unixodbc) |
1aa6582e | 113 | ("v4l-utils" ,v4l-utils) |
8f9580ca SB |
114 | ("zlib" ,zlib))) |
115 | (arguments | |
cb76c4e3 | 116 | `(;; Force a 32-bit build (under the assumption that this package is |
8f9580ca SB |
117 | ;; being used on an IA32-compatible architecture.) |
118 | #:system "i686-linux" | |
119 | ||
120 | ;; XXX: There's a test suite, but it's unclear whether it's supposed to | |
121 | ;; pass. | |
122 | #:tests? #f | |
123 | ||
6c0dfb19 | 124 | #:configure-flags |
5cead945 | 125 | (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib/wine32")) |
6c0dfb19 | 126 | |
eeabe5a1 | 127 | #:make-flags |
5cead945 RH |
128 | (list "SHELL=bash" |
129 | (string-append "libdir=" %output "/lib/wine32")) | |
eeabe5a1 | 130 | |
8f9580ca | 131 | #:phases |
07cda02c EF |
132 | (modify-phases %standard-phases |
133 | (add-after 'configure 'patch-dlopen-paths | |
134 | ;; Hardcode dlopened sonames to absolute paths. | |
135 | (lambda _ | |
136 | (let* ((library-path (search-path-as-string->list | |
137 | (getenv "LIBRARY_PATH"))) | |
138 | (find-so (lambda (soname) | |
139 | (search-path library-path soname)))) | |
140 | (substitute* "include/config.h" | |
141 | (("(#define SONAME_.* )\"(.*)\"" _ defso soname) | |
142 | (format #f "~a\"~a\"" defso (find-so soname)))) | |
143 | #t)))))) | |
658c987f | 144 | (home-page "https://www.winehq.org/") |
8f9580ca SB |
145 | (synopsis "Implementation of the Windows API") |
146 | (description | |
147 | "Wine (originally an acronym for \"Wine Is Not an Emulator\") is a | |
148 | compatibility layer capable of running Windows applications. Instead of | |
149 | simulating internal Windows logic like a virtual machine or emulator, Wine | |
150 | translates Windows API calls into POSIX calls on-the-fly, eliminating the | |
151 | performance and memory penalties of other methods and allowing you to cleanly | |
152 | integrate Windows applications into your desktop.") | |
153 | (license license:lgpl2.1+) | |
154 | ||
155 | ;; It really only supports IA32, but building on x86_64 will have the same | |
156 | ;; effect as building on i686 anyway. | |
157 | (supported-systems '("i686-linux" "x86_64-linux")))) | |
b3ebd241 RH |
158 | |
159 | (define-public wine64 | |
160 | (package | |
161 | (inherit wine) | |
162 | (name "wine64") | |
58cbcb02 RH |
163 | (inputs `(("wine" ,wine) |
164 | ,@(package-inputs wine))) | |
b3ebd241 | 165 | (arguments |
e02693a3 RH |
166 | `(#:make-flags |
167 | (list "SHELL=bash" | |
58cbcb02 RH |
168 | (string-append "libdir=" %output "/lib/wine64")) |
169 | #:phases | |
170 | (modify-phases %standard-phases | |
171 | (add-after 'install 'copy-wine32-files | |
172 | (lambda* (#:key outputs #:allow-other-keys) | |
173 | (copy-file (string-append (assoc-ref %build-inputs "wine") | |
174 | "/bin/wine") (string-append (assoc-ref | |
175 | %outputs "out") "/bin/wine")) | |
176 | (copy-file (string-append (assoc-ref %build-inputs "wine") | |
177 | "/bin/wine-preloader") (string-append | |
178 | (assoc-ref %outputs "out") | |
179 | "/bin/wine-preloader")) | |
180 | #t)) | |
181 | (add-after 'configure 'patch-dlopen-paths | |
182 | ;; Hardcode dlopened sonames to absolute paths. | |
183 | (lambda _ | |
184 | (let* ((library-path (search-path-as-string->list | |
185 | (getenv "LIBRARY_PATH"))) | |
186 | (find-so (lambda (soname) | |
187 | (search-path library-path soname)))) | |
188 | (substitute* "include/config.h" | |
189 | (("(#define SONAME_.* )\"(.*)\"" _ defso soname) | |
190 | (format #f "~a\"~a\"" defso (find-so soname)))) | |
191 | #t)))) | |
e02693a3 | 192 | #:configure-flags |
b3ebd241 | 193 | (list "--enable-win64" |
58cbcb02 RH |
194 | (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib/wine64")) |
195 | ,@(strip-keyword-arguments '(#:configure-flags #:make-flags #:phases | |
196 | #:system) | |
b3ebd241 | 197 | (package-arguments wine)))) |
58cbcb02 | 198 | (synopsis "Implementation of the Windows API (WOW64 version)") |
5010d0e3 | 199 | (supported-systems '("x86_64-linux" "aarch64-linux")))) |
f6444059 NG |
200 | |
201 | ;; TODO: This is wine development version, provided for historical reasons. | |
202 | ;; We can remove it as soon as a new stable release is out. | |
203 | (define-public wine-next | |
204 | (package (inherit wine) | |
205 | (name "wine-next") | |
206 | (version "2.11") | |
207 | (source (origin | |
208 | (method url-fetch) | |
209 | (uri (string-append "https://dl.winehq.org/wine/source/2.x" | |
210 | "/wine-" version ".tar.xz")) | |
211 | (sha256 | |
212 | (base32 | |
213 | "0g6cwjyqwc660w33453aklh3hpc0b8rrb88dryn23ah6wannvagg")))))) | |
214 | ||
7866d8c8 NG |
215 | (define-public wine-staging |
216 | (package | |
217 | (inherit wine) | |
218 | (name "wine-staging") | |
219 | (version "2.21") | |
220 | (source (origin | |
221 | (method url-fetch) | |
222 | (uri (string-append | |
223 | "https://github.com/wine-compholio/wine-patched/archive/" | |
224 | "staging-" version ".tar.gz")) | |
225 | (file-name (string-append name "-" version ".tar.gz")) | |
226 | (sha256 | |
227 | (base32 | |
228 | "1pjaxj7h3q6y356np908fvsx0bf7yx5crqvgl4hza6gfssdmsr5r")))) | |
141708ed RH |
229 | (inputs `(("gtk+", gtk+) |
230 | ("libva", libva) | |
231 | ,@(package-inputs wine))) | |
7866d8c8 NG |
232 | (synopsis "Implementation of the Windows API (staging branch)") |
233 | (description "Wine-Staging is the testing area of Wine. It | |
234 | contains bug fixes and features, which have not been integrated into | |
235 | the development branch yet. The idea of Wine-Staging is to provide | |
236 | experimental features faster to end users and to give developers the | |
237 | possibility to discuss and improve their patches before they are | |
238 | integrated into the main branch.") | |
239 | (home-page "https://wine-staging.com") | |
240 | ;; In addition to the regular Wine license (lgpl2.1+), Wine-Staging | |
241 | ;; provides Liberation and WenQuanYi Micro Hei fonts. Those use | |
242 | ;; different licenses. In particular, the latter is licensed under | |
243 | ;; both GPL3+ and Apache 2 License. | |
244 | (license | |
245 | (list license:lgpl2.1+ license:silofl1.1 license:gpl3+ license:asl2.0)))) | |
6cd46747 RH |
246 | |
247 | (define-public wine64-staging | |
248 | (package | |
249 | (inherit wine-staging) | |
250 | (name "wine64-staging") | |
251 | (arguments | |
252 | `(#:make-flags | |
253 | (list "SHELL=bash" | |
254 | (string-append "libdir=" %output "/lib")) | |
255 | #:configure-flags | |
256 | (list "--enable-win64" | |
257 | (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) | |
258 | ,@(strip-keyword-arguments '(#:configure-flags #:make-flags #:system) | |
259 | (package-arguments wine-staging)))) | |
260 | (synopsis "Implementation of the Windows API (staging branch, 64-bit | |
261 | version)") | |
262 | (supported-systems '("x86_64-linux" "aarch64-linux")))) |