gnu: efl: Update to 1.23.1.
[jackhill/guix/guix.git] / gnu / packages / enlightenment.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Tomáš Čech <sleep_walker@suse.cz>
3 ;;; Copyright © 2015 Daniel Pimentel <d4n1@member.fsf.org>
4 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2017 ng0 <ng0@n0.is>
6 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; Copyright © 2018 Timo Eisenmann <eisenmann@fn.de>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages enlightenment)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system meson)
30 #:use-module (guix build-system python)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages avahi)
33 #:use-module (gnu packages bash)
34 #:use-module (gnu packages check)
35 #:use-module (gnu packages code)
36 #:use-module (gnu packages compression)
37 #:use-module (gnu packages curl)
38 #:use-module (gnu packages fontutils)
39 #:use-module (gnu packages freedesktop)
40 #:use-module (gnu packages fribidi)
41 #:use-module (gnu packages game-development)
42 #:use-module (gnu packages gettext)
43 #:use-module (gnu packages ghostscript)
44 #:use-module (gnu packages gl)
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages gnome)
47 #:use-module (gnu packages gstreamer)
48 #:use-module (gnu packages gtk)
49 #:use-module (gnu packages ibus)
50 #:use-module (gnu packages image)
51 #:use-module (gnu packages linux)
52 #:use-module (gnu packages llvm)
53 #:use-module (gnu packages lua)
54 #:use-module (gnu packages pdf)
55 #:use-module (gnu packages perl)
56 #:use-module (gnu packages photo)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages pulseaudio)
59 #:use-module (gnu packages python)
60 #:use-module (gnu packages python-xyz)
61 #:use-module (gnu packages tls)
62 #:use-module (gnu packages video)
63 #:use-module (gnu packages xdisorg)
64 #:use-module (gnu packages xorg)
65 #:use-module (ice-9 match))
66
67 (define-public efl
68 (package
69 (name "efl")
70 (version "1.23.1")
71 (source (origin
72 (method url-fetch)
73 (uri (string-append
74 "https://download.enlightenment.org/rel/libs/efl/efl-"
75 version ".tar.xz"))
76 (sha256
77 (base32
78 "0q9g4j7k10s1a8rv2ca9v9lydh7ml3zsrqvgncc4qhvdl76208nn"))))
79 (build-system meson-build-system)
80 (native-inputs
81 `(("check" ,check)
82 ("gettext" ,gettext-minimal)
83 ("pkg-config" ,pkg-config)))
84 (inputs
85 `(("curl" ,curl)
86 ("giflib" ,giflib)
87 ("gstreamer" ,gstreamer)
88 ("gst-plugins-base" ,gst-plugins-base)
89 ("ibus" ,ibus)
90 ("mesa" ,mesa)
91 ("libraw" ,libraw)
92 ("librsvg" ,librsvg)
93 ("libspectre" ,libspectre)
94 ("libxau" ,libxau)
95 ("libxcomposite" ,libxcomposite)
96 ("libxcursor" ,libxcursor)
97 ("libxdamage" ,libxdamage)
98 ("libxdmcp" ,libxdmcp)
99 ("libxext" ,libxext)
100 ("libxi" ,libxi)
101 ("libxfixes" ,libxfixes)
102 ("libxinerama" ,libxinerama)
103 ("libxp" ,libxp)
104 ("libxrandr" ,libxrandr)
105 ("libxrender" ,libxrender)
106 ("libxss" ,libxscrnsaver)
107 ("libxtst" ,libxtst)
108 ("poppler" ,poppler)
109 ("wayland-protocols" ,wayland-protocols)))
110 (propagated-inputs
111 ;; All these inputs are in package config files in section
112 ;; Requires.private.
113 `(("avahi" ,avahi)
114 ("bullet" ,bullet)
115 ("dbus" ,dbus)
116 ("elogind" ,elogind)
117 ("eudev" ,eudev)
118 ("fontconfig" ,fontconfig)
119 ("freetype" ,freetype)
120 ("fribidi" ,fribidi)
121 ("glib" ,glib)
122 ("harfbuzz" ,harfbuzz)
123 ("luajit" ,luajit)
124 ("libinput" ,libinput-minimal)
125 ("libjpeg" ,libjpeg)
126 ("libpng" ,libpng)
127 ("libsndfile" ,libsndfile)
128 ("libtiff" ,libtiff)
129 ("libwebp" ,libwebp)
130 ("libx11" ,libx11)
131 ("libxkbcommon" ,libxkbcommon)
132 ("lz4" ,lz4)
133 ("openssl" ,openssl)
134 ("pulseaudio" ,pulseaudio)
135 ("util-linux" ,util-linux)
136 ("wayland" ,wayland)
137 ("zlib" ,zlib)))
138 (arguments
139 `(#:configure-flags '("-Dsystemd=false"
140 "-Dembedded-lz4=false"
141 "-Devas-loaders-disabler=json"
142 "-Dbuild-examples=false"
143 ;(string-append "-Ddictionaries-hyphen-dir="
144 ; (assoc-ref %build-inputs "hyphen")
145 ; "/share/hyphen")
146 "-Delogind=true"
147 "-Dnetwork-backend=connman"
148 ,@(match (%current-system)
149 ("armhf-linux"
150 '("-opengl=es-egl"))
151 (_
152 '("-Dopengl=full")))
153 ;; for wayland
154 "-Dwl-deprecated=true" ; ecore_wayland
155 "-Ddrm-deprecated=true" ; ecore_drm
156 "-Dwl=true"
157 "-Ddrm=true")
158 #:tests? #f ; Many tests fail due to timeouts and network requests.
159 #:phases
160 (modify-phases %standard-phases
161 ;; If we don't hardcode the location of libcurl.so then we
162 ;; have to wrap the outputs of efl's dependencies in curl.
163 (add-after 'unpack 'hardcode-libcurl-location
164 (lambda* (#:key inputs #:allow-other-keys)
165 (let* ((curl (assoc-ref inputs "curl"))
166 (lib (string-append curl "/lib/")))
167 (substitute* "src/lib/ecore_con/ecore_con_url_curl.c"
168 (("libcurl.so.?" libcurl) ; libcurl.so.[45]
169 (string-append lib libcurl)))
170 #t)))
171 (add-after 'unpack 'fix-install-paths
172 (lambda _
173 (substitute* "dbus-services/meson.build"
174 (("install_dir.*")
175 "install_dir: join_paths(dir_data, 'dbus-1', 'services'))\n"))
176 (substitute* "src/tests/elementary/meson.build"
177 (("dir_data") "meson.source_root(), 'test-output'"))
178 #t))
179 (add-after 'unpack 'set-home-directory
180 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
181 (lambda _ (setenv "HOME" "/tmp") #t)))))
182 (home-page "https://www.enlightenment.org/about-efl")
183 (synopsis "Enlightenment Foundation Libraries")
184 (description
185 "Enlightenment Foundation Libraries is a set of libraries developed
186 for Enlightenment. Libraries covers data serialization, wide support for
187 graphics rendering, UI layout and themes, interaction with OS, access to
188 removable devices or support for multimedia.")
189 ;; Different parts are under different licenses.
190 (license (list license:bsd-2 license:lgpl2.1 license:zlib))))
191
192 (define-public terminology
193 (package
194 (name "terminology")
195 (version "1.5.0")
196 (source (origin
197 (method url-fetch)
198 (uri
199 (string-append "https://download.enlightenment.org/rel/apps/"
200 "terminology/terminology-" version ".tar.xz"))
201 (sha256
202 (base32
203 "0v4amfg8ji0mb6j7kcxh3wz1xw5zyxg4rw6ylx17rfw2nc1yamfy"))
204 (modules '((guix build utils)))
205 ;; Remove the bundled fonts.
206 (snippet
207 '(begin
208 (delete-file-recursively "data/fonts")
209 (substitute* "data/meson.build"
210 (("subdir\\('fonts'\\)") ""))
211 #t))))
212 (build-system meson-build-system)
213 (arguments
214 `(#:configure-flags (list "-Dtests=true"
215 (string-append "-Dedje-cc="
216 (assoc-ref %build-inputs "efl")
217 "/bin/edje_cc"))
218 #:phases
219 (modify-phases %standard-phases
220 (add-after 'unpack 'set-home-directory
221 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
222 (lambda _ (setenv "HOME" "/tmp") #t))
223 (replace 'check
224 (lambda _
225 (with-directory-excursion
226 (string-append "../" ,name "-" ,version "/tests")
227 (invoke "sh" "run_tests.sh" "--verbose"
228 "-t" "../../build/src/bin/tytest"))))
229 (add-after 'install 'remove-test-binary
230 (lambda* (#:key outputs #:allow-other-keys)
231 ;; This file is not meant to be installed.
232 (delete-file (string-append (assoc-ref outputs "out")
233 "/bin/tytest"))
234 #t)))))
235 (native-inputs
236 `(("gettext" ,gettext-minimal)
237 ("perl" ,perl)
238 ("pkg-config" ,pkg-config)))
239 (inputs
240 `(("efl" ,efl)))
241 (home-page "https://www.enlightenment.org/about-terminology")
242 (synopsis "Powerful terminal emulator based on EFL")
243 (description
244 "Terminology is fast and feature rich terminal emulator. It is solely
245 based on Enlightenment Foundation Libraries. It supports multiple tabs, UTF-8,
246 URL and local path detection, themes, popup based content viewer for non-text
247 contents and more.")
248 (license license:bsd-2)))
249
250 (define-public rage
251 (package
252 (name "rage")
253 (version "0.3.1")
254 (source (origin
255 (method url-fetch)
256 (uri
257 (string-append
258 "https://download.enlightenment.org/rel/apps/rage/rage-"
259 version ".tar.xz"))
260 (sha256
261 (base32
262 "04fdk23bbgvni212zrfy4ndg7vmshbsjgicrhckdvhay87pk9i75"))))
263 (build-system meson-build-system)
264 (arguments
265 '(#:phases
266 (modify-phases %standard-phases
267 (add-after 'unpack 'set-home-directory
268 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
269 (lambda _ (setenv "HOME" "/tmp") #t)))))
270 (native-inputs
271 `(("pkg-config" ,pkg-config)))
272 (inputs
273 `(("efl" ,efl)))
274 (home-page "https://www.enlightenment.org/about-rage")
275 (synopsis "Video and audio player based on EFL")
276 (description
277 "Rage is a video and audio player written with Enlightenment Foundation
278 Libraries with some extra bells and whistles.")
279 (license license:bsd-2)))
280
281 (define-public enlightenment
282 (package
283 (name "enlightenment")
284 (version "0.23.1")
285 (source (origin
286 (method url-fetch)
287 (uri
288 (string-append "https://download.enlightenment.org/rel/apps/"
289 "enlightenment/enlightenment-" version ".tar.xz"))
290 (sha256
291 (base32
292 "0d1cyl07w9pvi2pf029kablazks2q9aislzl46b6fq5m1465jc75"))
293 (patches (search-patches "enlightenment-fix-setuid-path.patch"))))
294 (build-system meson-build-system)
295 (arguments
296 `(#:configure-flags '("-Dsystemd=false")
297 #:phases
298 (modify-phases %standard-phases
299 (delete 'bootstrap) ; We don't want to run the autogen script.
300 (add-before 'configure 'set-system-actions
301 (lambda* (#:key inputs #:allow-other-keys)
302 (setenv "HOME" "/tmp")
303 (let ((xkeyboard (assoc-ref inputs "xkeyboard-config"))
304 (setxkbmap (assoc-ref inputs "setxkbmap"))
305 (utils (assoc-ref inputs "util-linux"))
306 (libc (assoc-ref inputs "libc"))
307 (bluez (assoc-ref inputs "bluez"))
308 (efl (assoc-ref inputs "efl")))
309 ;; We need to patch the path to 'base.lst' to be able
310 ;; to switch the keyboard layout in E.
311 (substitute* (list "src/modules/xkbswitch/e_mod_parse.c"
312 "src/modules/wizard/page_011.c")
313 (("/usr/share/X11/xkb/rules/xorg.lst")
314 (string-append xkeyboard
315 "/share/X11/xkb/rules/base.lst")))
316 (substitute* "src/bin/e_xkb.c"
317 (("\"setxkbmap \"")
318 (string-append "\"" setxkbmap "/bin/setxkbmap \"")))
319 (substitute* (list "src/bin/e_intl.c"
320 "src/modules/conf_intl/e_int_config_intl.c"
321 "src/modules/wizard/page_010.c")
322 (("locale -a") (string-append libc "/bin/locale -a")))
323 (substitute* "src/bin/e_import_config_dialog.c"
324 (("%s/edje_cc -v %s %s %s\", e_prefix_bin_get\\(\\)")
325 (string-append efl "/bin/edje_cc -v %s %s %s\"")))
326 (substitute* "src/modules/everything/evry_plug_apps.c"
327 (("/usr/bin/") ""))
328 (substitute* "data/etc/meson.build"
329 (("/bin/mount") (string-append utils "/bin/mount"))
330 (("/bin/umount") (string-append utils "/bin/umount"))
331 (("/usr/bin/eject") (string-append utils "/bin/eject"))
332 (("/usr/bin/l2ping") (string-append bluez "/bin/l2ling"))
333 (("/bin/rfkill") (string-append utils "/sbin/rfkill"))
334 (("SUSPEND = ''") "SUSPEND = '/run/current-system/profile/bin/loginctl suspend'")
335 (("HIBERNATE = ''") "HIBERNATE = '/run/current-system/profile/bin/loginctl hibernate'")
336 (("/sbin/shutdown -h now") "/run/current-system/profile/bin/loginctl poweroff now")
337 (("/sbin/shutdown -r now") "/run/current-system/profile/bin/loginctl reboot now"))
338 #t))))))
339 (native-inputs
340 `(("gettext" ,gettext-minimal)
341 ("pkg-config" ,pkg-config)
342 ("util-linux" ,util-linux)))
343 (inputs
344 `(("alsa-lib" ,alsa-lib)
345 ("bluez" ,bluez)
346 ("dbus" ,dbus)
347 ("efl" ,efl)
348 ("freetype" ,freetype)
349 ("libxcb" ,libxcb)
350 ("libxext" ,libxext)
351 ("linux-pam" ,linux-pam)
352 ("puleseaudio" ,pulseaudio)
353 ("setxkbmap" ,setxkbmap)
354 ("xcb-util-keysyms" ,xcb-util-keysyms)
355 ("xkeyboard-config" ,xkeyboard-config)))
356 (home-page "https://www.enlightenment.org/about-enlightenment")
357 (synopsis "Lightweight desktop environment")
358 (description
359 "Enlightenment is resource friendly desktop environment with integrated
360 file manager, wide range of configuration options, plugin system allowing to
361 unload unused functionality, with support for touchscreen and suitable for
362 embedded systems.")
363 (license license:bsd-2)))
364
365 (define-public python-efl
366 (package
367 (name "python-efl")
368 (version "1.23.0")
369 (source
370 (origin
371 (method url-fetch)
372 (uri (string-append "https://download.enlightenment.org/rel/bindings/"
373 "python/python-efl-" version ".tar.xz"))
374 (sha256
375 (base32
376 "16yn6a1b9167nfmryyi44ma40m20ansfpwgrvqzfvwix7qaz9pib"))
377 (modules '((guix build utils)))
378 ;; Remove files generated by Cython
379 (snippet
380 '(begin
381 (copy-file "efl/dbus_mainloop/e_dbus.c" "efl/dbus_mainloop/e_dbus.q")
382 (for-each delete-file (find-files "efl" ".*\\.c$"))
383 (delete-file "efl/eo/efl.eo_api.h")
384 (copy-file "efl/dbus_mainloop/e_dbus.q" "efl/dbus_mainloop/e_dbus.c")
385 (delete-file "efl/dbus_mainloop/e_dbus.q")
386 #t))))
387 (build-system python-build-system)
388 (arguments
389 '(#:phases
390 (modify-phases %standard-phases
391 (replace 'build
392 (lambda _
393 (setenv "ENABLE_CYTHON" "1")
394 (invoke "python" "setup.py" "build")))
395 (add-before 'build 'set-flags
396 (lambda _
397 (setenv "CFLAGS"
398 (string-append "-I" (assoc-ref %build-inputs "python-dbus")
399 "/include/dbus-1.0"))
400 #t))
401 (add-before 'check 'set-environment
402 (lambda _
403 ;; Some tests require write access to HOME.
404 (setenv "HOME" "/tmp")
405 ;; These tests try to connect to the internet.
406 (delete-file "tests/ecore/test_09_file_download.py")
407 (delete-file "tests/ecore/test_11_con.py")
408 #t)))))
409 (native-inputs
410 `(("pkg-config" ,pkg-config)
411 ("python-cython" ,python-cython)))
412 (inputs
413 `(("efl" ,efl)
414 ("python-dbus" ,python-dbus)))
415 (home-page "https://www.enlightenment.org/")
416 (synopsis "Python bindings for EFL")
417 (description
418 "PYTHON-EFL are the python bindings for the whole Enlightenment Foundation
419 Libraries stack (eo, evas, ecore, edje, emotion, ethumb and elementary).")
420 (license license:lgpl3)))
421
422 (define-public python2-efl
423 (package-with-python2 python-efl))
424
425 (define-public edi
426 (package
427 (name "edi")
428 (version "0.6.0")
429 (source
430 (origin
431 (method url-fetch)
432 (uri (string-append "https://download.enlightenment.org/rel/apps/edi/"
433 name "-" version ".tar.xz"))
434 (sha256
435 (base32
436 "0iqkah327ms5m7k054hcik2l9v68i4mg9yy52brprfqpd5jk7pw8"))))
437 (build-system gnu-build-system)
438 (arguments
439 '(#:phases
440 (modify-phases %standard-phases
441 (add-after 'unpack 'set-home-directory
442 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
443 (lambda _ (setenv "HOME" "/tmp") #t)))
444 #:tests? #f)) ; tests require running dbus service
445 (native-inputs
446 `(("pkg-config" ,pkg-config)))
447 (inputs
448 `(("clang" ,clang)
449 ("efl" ,efl)))
450 (home-page "https://www.enlightenment.org/about-edi")
451 (synopsis "Development environment for Enlightenment")
452 (description "EDI is a development environment designed for and built using
453 the EFL. It's aim is to create a new, native development environment for Linux
454 that tries to lower the barrier to getting involved in Enlightenment development
455 and in creating applications based on the Enlightenment Foundation Library suite.")
456 (license (list license:public-domain ; data/extra/skeleton
457 license:gpl2)))) ; edi
458
459 (define-public lekha
460 (package
461 (name "lekha")
462 (version "0.2.1")
463 (source (origin
464 (method url-fetch)
465 (uri (pypi-uri "Lekha" version))
466 (sha256
467 (base32
468 "0zr6i74ik58pbzrd7r9l7sawqbdv0r2c1a9927qkqzwga27x8j15"))))
469 (build-system python-build-system)
470 (arguments
471 `(#:tests? #f ; no test target
472 #:python ,python-2
473 #:phases
474 (modify-phases %standard-phases
475 (add-after 'unpack 'fix-data-location
476 (lambda _ (substitute* "setup.py"
477 (("'/usr/")"'"))
478 #t)))))
479 (propagated-inputs
480 `(("python2-efl" ,python2-efl)
481 ("python2-pypdf2" ,python2-pypdf2)
482 ("python2-pyxdg" ,python2-pyxdg)))
483 (synopsis "Simple PDF viewer")
484 (description
485 "Simple PDF viewer based on the Enlightenment Foundation Libraries.")
486 (home-page "https://github.com/kaihu/lekha")
487 (license license:gpl3+)))
488
489 (define-public ephoto
490 (package
491 (name "ephoto")
492 (version "1.5")
493 (source
494 (origin
495 (method url-fetch)
496 (uri (list (string-append "http://www.smhouston.us/stuff/ephoto-"
497 version ".tar.xz")
498 (string-append "https://download.enlightenment.org/rel/"
499 "apps/ephoto/ephoto-" version ".tar.xz")))
500 (sha256
501 (base32
502 "1q7v9abjp9jrs08xc7pqaac64yzax24dk1snjb9rciarzzh3mlzy"))))
503 (build-system gnu-build-system)
504 (arguments
505 '(#:phases
506 (modify-phases %standard-phases
507 (add-after 'unpack 'set-home-directory
508 ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
509 (lambda _ (setenv "HOME" "/tmp") #t)))))
510 (native-inputs
511 `(("check" ,check)
512 ("pkg-config" ,pkg-config)))
513 (inputs
514 `(("efl" ,efl)))
515 (home-page "http://smhouston.us/ephoto/")
516 (synopsis "EFL image viewer/editor/manipulator/slideshow creator")
517 (description "Ephoto is an image viewer and editor written using the
518 @dfn{Enlightenment Foundation Libraries} (EFL). It focuses on simplicity and
519 ease of use, while taking advantage of the speed and small footprint the EFL
520 provide.
521
522 Ephoto’s features include:
523 @enumerate
524 @item Browsing the file system and displaying images in an easy-to-use grid view.
525 @item Browsing images in a single image view format.
526 @item Viewing images in a slideshow.
527 @item Editing your image with features such as cropping, auto enhance,
528 blurring, sharpening, brightness/contrast/gamma adjustments, hue/saturation/value
529 adjustments, and color level adjustment.
530 @item Applying artistic filters to your image such as black and white and old
531 photo.
532 @item Drag And Drop along with file operations to easily maintain your photo
533 directories.
534 @end enumerate\n")
535 (license (list
536 license:bsd-2 ; Ephoto's thumbnailing code
537 license:bsd-3))))
538
539 (define-public evisum
540 (package
541 (name "evisum")
542 (version "0.2.6")
543 (source
544 (origin
545 (method url-fetch)
546 (uri (string-append "https://download.enlightenment.org/rel/apps/"
547 "evisum/evisum-" version ".tar.xz"))
548 (sha256
549 (base32
550 "1rg3kri6j8nmab0kdljnmcc096c8ibgwzvbhqr0b25xpmrq8bcac"))))
551 (build-system gnu-build-system)
552 (arguments
553 '(#:tests? #f ; no tests
554 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
555 #:phases
556 (modify-phases %standard-phases
557 (delete 'configure) ; no configure phase
558 (add-after 'unpack 'set-environmental-variables
559 (lambda _ (setenv "CC" (which "gcc")) #t)))))
560 (native-inputs
561 `(("pkg-config" ,pkg-config)))
562 (inputs
563 `(("alsa-lib" ,alsa-lib)
564 ("efl" ,efl)
565 ("perl" ,perl)))
566 (home-page "https://www.enlightenment.org")
567 (synopsis "EFL process viewer")
568 (description
569 "This is a process monitor and system monitor using the
570 @dfn{Enlightenment Foundation Libraries} (EFL).")
571 (license license:bsd-2)))