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