gnu: libqtxdg: Build with qtbase.
[jackhill/guix/guix.git] / gnu / packages / lxqt.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
4 ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
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 lxqt)
23 #:use-module (guix download)
24 #:use-module ((guix licenses) #:select (lgpl2.1+))
25 #:use-module (guix packages)
26 #:use-module (guix utils)
27 #:use-module (guix build-system cmake)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages kde-frameworks)
30 #:use-module (gnu packages pkg-config)
31 #:use-module (gnu packages qt))
32
33 (define-public libqtxdg
34 (package
35 (name "libqtxdg")
36 (version "1.2.0")
37 (source
38 (origin
39 (method url-fetch)
40 (uri
41 (string-append "https://github.com/lxde/libqtxdg/releases/"
42 "download/" version "/" name "-" version ".tar.xz"))
43 (sha256
44 (base32
45 "1ncqs0lcll5nx69hxfg33m3jfkryjqrjhr2kdci0b8pyaqdv1jc8"))))
46 (build-system cmake-build-system)
47 (arguments
48 `(#:tests? #f ; test fails with message "Exception"
49 #:configure-flags '("-DBUILD_TESTS=ON")))
50 (native-inputs
51 `(("pkg-config" ,pkg-config)))
52 (inputs
53 `(("qtbase" ,qtbase))) ; according to Qt5Xdg.pc
54 (home-page "https://github.com/lxde/libqtxdg")
55 (synopsis "Qt implementation of freedesktop.org xdg specifications")
56 (description "Libqtxdg implements the freedesktop.org xdg specifications
57 in Qt.")
58 (license lgpl2.1+)))
59
60 (define-public liblxqt
61 (package
62 (name "liblxqt")
63 (version "0.9.0")
64 (source
65 (origin
66 (method url-fetch)
67 (uri
68 (string-append "https://github.com/lxde/" name
69 "/archive/" version ".tar.gz"))
70 (file-name (string-append name "-" version ".tar.gz"))
71 (sha256
72 (base32
73 "0mbl3qc0yfgfsndqrw8vg8k5irsy0pg2wrad8nwv0aphphd4n7rg"))
74 (patches (search-patches "liblxqt-include.patch"))))
75 (build-system cmake-build-system)
76 (arguments
77 `(#:tests? #f))
78 (native-inputs `(("pkg-config" ,pkg-config)))
79 (inputs
80 `(("kwindowsystem" ,kwindowsystem)
81 ("libqtxdg" ,libqtxdg)))
82 (home-page "http://lxqt.org/")
83 (synopsis "Core utility library for all LXQt components")
84 (description "liblxqt provides the basic libraries shared by the
85 components of the LXQt desktop environment.")
86 (license lgpl2.1+)))
87
88
89 (define-public lxqt-common
90 (package
91 (name "lxqt-common")
92 (version "0.9.1")
93 (source
94 (origin
95 (method url-fetch)
96 (uri
97 (string-append "https://github.com/lxde/" name
98 "/archive/" version ".tar.gz"))
99 (file-name (string-append name "-" version ".tar.gz"))
100 (sha256
101 (base32
102 "1vd3zarvl44l3y6wn7kgxcd2f1bygsmk5bcfqwa3568cq3b57aw0"))))
103 (build-system cmake-build-system)
104 (arguments
105 `(#:tests? #f ; no check target
106 #:phases
107 (modify-phases %standard-phases
108 (add-before 'configure 'fix-installation-paths
109 (lambda _
110 ;; The variable LXQT_ETC_XDG_DIR is set in
111 ;; liblxqt-0.9.0/share/cmake/lxqt/lxqt-config.cmake
112 ;; to the Qt5 installation directory, followed by "/etc/xdg".
113 ;; We need to have it point to the current installation
114 ;; directory instead.
115 (substitute* '("config/CMakeLists.txt"
116 "menu/CMakeLists.txt")
117 (("\\$\\{LXQT_ETC_XDG_DIR\\}")
118 "${CMAKE_INSTALL_PREFIX}/etc/xdg")
119 ;; In the same file, LXQT_SHARE_DIR is set to the installation
120 ;; directory of liblxqt, followed by "/share/lxqt".
121 (("\\$\\{LXQT_SHARE_DIR\\}")
122 "${CMAKE_INSTALL_PREFIX}/share/lxqt"))
123 ;; Replace absolute directories.
124 (substitute* "autostart/CMakeLists.txt"
125 (("/etc/xdg")
126 "${CMAKE_INSTALL_PREFIX}/etc/xdg"))
127 (substitute* "xsession/CMakeLists.txt"
128 (("/usr/share")
129 "${CMAKE_INSTALL_PREFIX}/share")))))))
130 (inputs
131 `(("kwindowsystem" ,kwindowsystem)
132 ("liblxqt" ,liblxqt)
133 ("libqtxdg" ,libqtxdg)))
134 (home-page "http://lxqt.org/")
135 (synopsis "Common files for LXQt")
136 (description "lxqt-common provides the desktop integration files
137 (themes, icons, configuration files etc.) for the LXQt
138 desktop environment.")
139 (license lgpl2.1+)))
140
141 (define-public lxqt-session
142 (package
143 (name "lxqt-session")
144 (version "0.9.0")
145 (source
146 (origin
147 (method url-fetch)
148 (uri
149 (string-append "https://github.com/lxde/" name
150 "/archive/" version ".tar.gz"))
151 (file-name (string-append name "-" version ".tar.gz"))
152 (sha256
153 (base32
154 "1sdwcfrfqkg7ibrsncs1skdap9n8wm4rg6n9d0fgdz2q4d45h75a"))))
155 (build-system cmake-build-system)
156 (native-inputs
157 `(("pkg-config" ,pkg-config)))
158 (inputs
159 `(("kwindowsystem" ,kwindowsystem)
160 ("liblxqt" ,liblxqt)
161 ("libqtxdg" ,libqtxdg)))
162 (arguments
163 `(#:tests? #f ; no check target
164 #:phases
165 (modify-phases %standard-phases
166 (add-before 'configure 'fix-installation-paths
167 (lambda _
168 ;; The variable LXQT_TRANSLATIONS_DIR is set in
169 ;; liblxqt-0.9.0/share/cmake/lxqt/lxqt-config.cmake
170 ;; to the liblxqt installation directory, followed by
171 ;; "/share/lxqt/translations".
172 ;; We need to have it point to the current installation
173 ;; directory instead.
174 (substitute* '("lxqt-session/CMakeLists.txt"
175 "lxqt-config-session/CMakeLists.txt")
176 (("\\$\\{LXQT_TRANSLATIONS_DIR\\}")
177 "${CMAKE_INSTALL_PREFIX}/share/lxqt/translations")))))))
178 (home-page "http://lxqt.org/")
179 (synopsis "Session manager for LXQt")
180 (description "lxqt-session provides the standard session manager
181 for the LXQt desktop environment.")
182 (license lgpl2.1+)))