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