gnu: Move numerous "inputs" which should be "native-inputs".
[jackhill/guix/guix.git] / gnu / packages / qt.scm
CommitLineData
bd677c2d
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
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 qt)
b332e366 20 #:use-module ((guix licenses) #:select (lgpl2.1 x11-style))
bd677c2d
AE
21 #:use-module (guix packages)
22 #:use-module (guix download)
f198ffd0 23 #:use-module (guix build utils)
bd677c2d 24 #:use-module (guix build-system gnu)
1e9ed0e3 25 #:use-module (gnu packages)
b332e366
AE
26 #:use-module (gnu packages bison)
27 #:use-module (gnu packages compression)
28 #:use-module (gnu packages fontutils)
29 #:use-module (gnu packages glib)
30 #:use-module (gnu packages icu4c)
31 #:use-module (gnu packages libjpeg)
32 #:use-module (gnu packages libpng)
33 #:use-module (gnu packages linux)
34 #:use-module (gnu packages mysql)
35 #:use-module (gnu packages openssl)
36 #:use-module (gnu packages perl)
37 #:use-module (gnu packages pkg-config)
39fa8f6c 38 #:use-module (gnu packages pulseaudio)
b332e366
AE
39 #:use-module (gnu packages python)
40 #:use-module (gnu packages xorg))
bd677c2d
AE
41
42(define-public libxkbcommon
43 (package
44 (name "libxkbcommon")
45 (version "0.3.1")
46 (source (origin
47 (method url-fetch)
48 (uri (string-append "http://xkbcommon.org/download/" name "-"
49 version ".tar.xz"))
50 (sha256
51 (base32
52 "13mk335r4dhi9qglzbp46ina1wz4qgcp8r7s06iq7j50pf0kb5ww"))))
53 (build-system gnu-build-system)
c4c4cc05 54 (native-inputs
bd677c2d
AE
55 `(("bison" ,bison)))
56 (home-page "http://xkbcommon.org/")
57 (synopsis "library to handle keyboard descriptions")
58 (description "Xkbcommon is a library to handle keyboard descriptions,
59including loading them from disk, parsing them and handling their
60state. It is mainly meant for client toolkits, window systems, and other
61system applications; currently that includes Wayland, kmscon, GTK+, Qt,
62Clutter, and more. Despite the name, it is not currently used by anything
63X11 (yet).")
64 (license (x11-style "file://COPYING"
65 "See 'COPYING' in the distribution."))))
b332e366
AE
66
67(define-public qt
68 (package
69 (name "qt")
f198ffd0 70 (version "5.2.0")
b332e366
AE
71 (source (origin
72 (method url-fetch)
73 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
74 (string-copy version 0 (string-rindex version #\.))
75 "/" version
76 "/single/qt-everywhere-opensource-src-"
f198ffd0 77 version ".tar.xz"))
b332e366
AE
78 (sha256
79 (base32
f198ffd0 80 "0cch2mjk33x1511sqvvbfcxixpj64cfhq7kgszd422qzl3x2m8q0"))))
b332e366 81 (build-system gnu-build-system)
ef0cf53e
AE
82 (propagated-inputs
83 `(("mesa" ,mesa)))
b332e366
AE
84 (inputs
85 ;; FIXME: Add input ruby once available.
86 `(("alsa-lib" ,alsa-lib)
87 ("dbus" ,dbus)
88 ("fontconfig" ,fontconfig)
89 ("freetype" ,freetype)
90 ("glib" ,glib)
91 ("icu4c" ,icu4c)
f198ffd0 92 ("libjpeg" ,libjpeg)
b332e366
AE
93 ("libpng" ,libpng)
94 ("libx11" ,libx11)
95 ("libxi" ,libxi)
96 ("libxkbcommon" ,libxkbcommon)
97 ("libxrender" ,libxrender)
b332e366
AE
98 ("mysql" ,mysql)
99 ("openssl" ,openssl)
39fa8f6c 100 ("pulseaudio" ,pulseaudio)
b332e366
AE
101 ("python-wrapper" ,python-wrapper)
102 ("xcb-util" ,xcb-util)
103 ("xcb-util-image" ,xcb-util-image)
104 ("xcb-util-keysyms" ,xcb-util-keysyms)
105 ("xcb-util-renderutil" ,xcb-util-renderutil)
106 ("xcb-util-wm" ,xcb-util-wm)
107 ("zlib" ,zlib)))
c4c4cc05
JD
108 (native-inputs
109 `(("perl" ,perl)
110 ("pkg-config" ,pkg-config)))
b332e366
AE
111 (arguments
112 `(#:phases
113 (alist-replace
114 'configure
115 (lambda* (#:key outputs #:allow-other-keys)
116 (let ((out (assoc-ref outputs "out")))
117 (substitute* '("configure" "qtbase/configure")
118 (("/bin/pwd") (which "pwd")))
119 ;; do not pass "--enable-fast-install", which makes the
120 ;; configure process fail
206a5208
AE
121 (zero? (system*
122 "./configure"
123 "-verbose"
124 "-prefix" out
125 "-opensource"
126 "-confirm-license"
127 ;; drop special machine instructions not supported
128 ;; on all instances of the target
129 ,@(if (string-prefix? "x86_64"
130 (or (%current-target-system)
131 (%current-system)))
132 '()
133 '("-no-sse2"))
134 "-no-sse3"
135 "-no-ssse3"
136 "-no-sse4.1"
137 "-no-sse4.2"
138 "-no-avx"
139 "-no-avx2"
140 "-no-neon"
141 "-no-mips_dsp"
142 "-no-mips_dspr2"))))
b332e366
AE
143 %standard-phases)))
144 (home-page "http://qt-project.org/")
145 (synopsis "Cross-platform GUI library")
146 (description "Qt is a cross-platform application and UI framework for
147developers using C++ or QML, a CSS & JavaScript like language.")
148 (license lgpl2.1)))
1e9ed0e3
AE
149
150(define-public qt-4
151 (package (inherit qt)
152 (version "4.8.5")
153 (source (origin
154 (method url-fetch)
155 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
156 (string-copy version 0 (string-rindex version #\.))
157 "/" version
89059aa1 158 "/qt-everywhere-opensource-src-"
1e9ed0e3
AE
159 version ".tar.gz"))
160 (sha256
161 (base32
162 "0f51dbgn1dcck8pqimls2qyf1pfmsmyknh767cvw87c3d218ywpb"))
163 (patches (list (search-patch "qt4-tests.patch")))))
f198ffd0
AE
164 (inputs `(,@(alist-delete "libjpeg" (package-inputs qt))
165 ("libjepg" ,libjpeg-8)))
1e9ed0e3
AE
166 (arguments
167 `(#:phases
168 (alist-replace
169 'configure
170 (lambda* (#:key outputs #:allow-other-keys)
171 (let ((out (assoc-ref outputs "out")))
172 (substitute* '("configure")
173 (("/bin/pwd") (which "pwd")))
174 ;; do not pass "--enable-fast-install", which makes the
175 ;; configure process fail
206a5208
AE
176 (zero? (system*
177 "./configure"
178 "-verbose"
179 "-prefix" out
180 "-opensource"
181 "-confirm-license"
182 ;; drop special machine instructions not supported
183 ;; on all instances of the target
184 ,@(if (string-prefix? "x86_64"
185 (or (%current-target-system)
186 (%current-system)))
187 '()
188 '("-no-mmx"
1e9ed0e3
AE
189 "-no-3dnow"
190 "-no-sse"
206a5208
AE
191 "-no-sse2"))
192 "-no-sse3"
193 "-no-ssse3"
194 "-no-sse4.1"
195 "-no-sse4.2"
196 "-no-avx"
197 "-no-neon"))))
1e9ed0e3 198 %standard-phases)))))