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