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