gnu: ImageMagick: Update to 6.9.9-43.
[jackhill/guix/guix.git] / gnu / packages / image-viewers.scm
CommitLineData
d1a5b200 1;;; GNU Guix --- Functional package management for GNU
e784e256 2;;; Copyright © 2013, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
d1a5b200
AK
3;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
4;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
ea77385c 5;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
f7e9f1ca 6;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
4a78fd46 7;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
ed3a9ec5 8;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
4ee81d37 9;;; Copyright © 2017 nee <nee-git@hidamari.blue>
6c162d0e 10;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
21169e31 11;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
eb55f018 12;;;
d1a5b200
AK
13;;; This file is part of GNU Guix.
14;;;
eb55f018
EF
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages image-viewers)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix download)
31 #:use-module (guix packages)
32 #:use-module (guix build-system gnu)
9016dbc2 33 #:use-module (guix build-system cmake)
4ee81d37 34 #:use-module (guix build-system python)
eb55f018 35 #:use-module (gnu packages autotools)
e79bfa18 36 #:use-module (gnu packages algebra)
eb55f018 37 #:use-module (gnu packages base)
e79bfa18
LC
38 #:use-module (gnu packages boost)
39 #:use-module (gnu packages compression)
d1a5b200 40 #:use-module (gnu packages curl)
6c162d0e 41 #:use-module (gnu packages fontutils)
d1a5b200 42 #:use-module (gnu packages ghostscript)
eb55f018
EF
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages gnome)
45 #:use-module (gnu packages gtk)
e79bfa18 46 #:use-module (gnu packages graphics)
023f0fb0 47 #:use-module (gnu packages image)
9016dbc2 48 #:use-module (gnu packages imagemagick)
e79bfa18 49 #:use-module (gnu packages maths)
83a7a88f 50 #:use-module (gnu packages perl)
5ccde207 51 #:use-module (gnu packages perl-check)
d1a5b200
AK
52 #:use-module (gnu packages photo)
53 #:use-module (gnu packages pkg-config)
4ee81d37 54 #:use-module (gnu packages python)
e79bfa18
LC
55 #:use-module (gnu packages qt)
56 #:use-module (gnu packages xorg)
57 #:use-module (gnu packages))
d1a5b200
AK
58
59(define-public feh
60 (package
61 (name "feh")
14534d7f 62 (version "2.26")
d1a5b200
AK
63 (home-page "https://feh.finalrewind.org/")
64 (source (origin
65 (method url-fetch)
66 (uri (string-append home-page
67 name "-" version ".tar.bz2"))
68 (sha256
69 (base32
14534d7f 70 "11kckzwk3b734l0n4j41k40liq1v2lbbj1gzir5qc386g7fvzmmi"))))
d1a5b200
AK
71 (build-system gnu-build-system)
72 (arguments
dc1d3cde 73 '(#:phases (modify-phases %standard-phases (delete 'configure))
83a7a88f 74 #:test-target "test"
dc1d3cde
KK
75 #:make-flags
76 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))))
83a7a88f
MB
77 (native-inputs
78 `(("perl" ,perl)
79 ("perl-test-command" ,perl-test-command)))
d1a5b200
AK
80 (inputs `(("imlib2" ,imlib2)
81 ("curl" ,curl)
82 ("libpng" ,libpng)
83 ("libxt" ,libxt)
84 ("libx11" ,libx11)
85 ("libxinerama" ,libxinerama)))
3c41b992
MB
86 (native-search-paths
87 ;; Feh allows overriding the libcurl builtin CA path (unset in Guix)
88 ;; with the same variable as the `curl` command line HTTP tool.
dc138d6d 89 (package-native-search-paths curl))
d1a5b200
AK
90 (synopsis "Fast and light imlib2-based image viewer")
91 (description
92 "feh is an X11 image viewer aimed mostly at console users.
93Unlike most other viewers, it does not have a fancy GUI, but simply
94displays images. It can also be used to set the desktop wallpaper.
95It is controlled via commandline arguments and configurable key/mouse
96actions.")
97
98 ;; The license is really the Expat license, with additional wording in the
99 ;; 2nd paragraph: "acknowledgment shall be given in the documentation and
100 ;; software packages that this Software was used."
101 (license (license:x11-style
102 "file://COPYING"
103 "See 'COPYING' in the distribution."))))
104
105(define-public geeqie
106 (package
107 (name "geeqie")
e784e256 108 (version "1.4")
d1a5b200
AK
109 (source (origin
110 (method url-fetch)
111 (uri (string-append "https://github.com/BestImageViewer/geeqie/"
112 "releases/download/v" version "/geeqie-"
113 version ".tar.xz"))
114 (sha256
115 (base32
e784e256 116 "0ciygvcxb78pqg59r6p061mkbpvkgv2rv3r79j3kgv3kalb3ln2w"))))
d1a5b200
AK
117 (build-system gnu-build-system)
118 (arguments
048175e2
LC
119 `(;; Enable support for a "map" pane using GPS data.
120 #:configure-flags '("--enable-map")
121
122 #:phases
d1a5b200
AK
123 (modify-phases %standard-phases
124 (add-after 'unpack 'autogen
125 (lambda _
e784e256
LC
126 (define (write-dummy-changelog port)
127 (display "See Git history for a change log.\n" port))
128
d1a5b200 129 (setenv "NOCONFIGURE" "true")
e784e256
LC
130
131 ;; Create ChangeLog{,.html} to placate the makefile, which would
132 ;; otherwise require access to the Git repo.
133 (call-with-output-file "ChangeLog"
134 write-dummy-changelog)
135 (call-with-output-file "ChangeLog.html"
136 write-dummy-changelog)
137
d1a5b200
AK
138 (zero? (system* "sh" "autogen.sh")))))))
139 (inputs
048175e2
LC
140 `(("clutter" ,clutter)
141 ("libchamplain" ,libchamplain)
d1a5b200
AK
142 ("lcms" ,lcms)
143 ("exiv2" ,exiv2)
144 ("libpng" ,libpng)
145 ("gtk+" ,gtk+-2)))
146 (native-inputs
147 `(("autoconf" ,autoconf)
148 ("automake" ,automake)
149 ("glib" ,glib "bin") ; glib-gettextize
150 ("intltool" ,intltool)
151 ("pkg-config" ,pkg-config)))
152 (home-page "http://www.geeqie.org/")
153 (synopsis "Lightweight GTK+ based image viewer")
154 (description
155 "Geeqie is a lightweight GTK+ based image viewer for Unix like operating
156systems. It features: EXIF, IPTC and XMP metadata browsing and editing
157interoperability; easy integration with other software; geeqie works on files
158and directories, there is no need to import images; fast preview for many raw
159image formats; tools for image comparison, sorting and managing photo
160collection. Geeqie was initially based on GQview.")
161 (license license:gpl2+)))
162
ed3a9ec5
MO
163(define-public gpicview
164 (package
165 (name "gpicview")
166 (version "0.2.5")
167 (source (origin
168 (method url-fetch)
169 (uri (string-append "mirror://sourceforge/lxde/"
170 "GPicView%20%28image%20Viewer%29/0.2.x/"
171 name "-" version ".tar.xz"))
172 (sha256
173 (base32
174 "0hi9v0rdx47nys0wvm9xasdrafa34r5kq6crb074a0ipwmc60iiq"))))
175 (build-system gnu-build-system)
176 (inputs `(("gtk+" ,gtk+-2)
177 ("libjpeg" ,libjpeg)))
178 (native-inputs `(("intltool" ,intltool)
179 ("pkg-config" ,pkg-config)))
180 (synopsis "Simple and fast image viewer for X")
181 (description "gpicview is a lightweight GTK+ 2.x based image viewer.
182It is the default image viewer on LXDE desktop environment.")
183 (home-page "http://lxde.sourceforge.net/gpicview/")
184 (license license:gpl2+)))
185
d1a5b200
AK
186(define-public sxiv
187 (package
188 (name "sxiv")
6c162d0e 189 (version "24")
d1a5b200
AK
190 (source (origin
191 (method url-fetch)
192 (uri (string-append
193 "https://github.com/muennich/sxiv/archive/v"
194 version ".tar.gz"))
195 (file-name (string-append name "-" version ".tar.gz"))
196 (sha256
197 (base32
6c162d0e 198 "044i077li6m4zsz2fswlcdi2m0sbr9mwws1h3k1zjaln29fw87ai"))))
d1a5b200
AK
199 (build-system gnu-build-system)
200 (arguments
6c162d0e
TGR
201 `(#:tests? #f ; no check target
202 #:make-flags
203 (list (string-append "PREFIX=" %output)
204 "CC=gcc"
205 ;; Xft.h #includes <ft2build.h> (without ‘freetype2/’). The sxiv
206 ;; Makefile works around this by hard-coding /usr/include instead.
207 (string-append "DEF_CPPFLAGS=-I"
208 (assoc-ref %build-inputs "freetype")
209 "/include/freetype2")
210 "V=1")
211 #:phases
212 (modify-phases %standard-phases
213 (delete 'configure)))) ; no configure script
d1a5b200 214 (inputs
6c162d0e 215 `(("freetype" ,freetype)
d1a5b200 216 ("giflib" ,giflib)
6c162d0e
TGR
217 ("imlib2" ,imlib2)
218 ("libexif" ,libexif)
219 ("libx11" ,libx11)
220 ("libxft" ,libxft)))
d1a5b200
AK
221 (home-page "https://github.com/muennich/sxiv")
222 (synopsis "Simple X Image Viewer")
223 (description
224 "sxiv is an alternative to feh and qiv. Its primary goal is to
225provide the most basic features required for fast image viewing. It has
226vi key bindings and works nicely with tiling window managers. Its code
227base should be kept small and clean to make it easy for you to dig into
228it and customize it for your needs.")
229 (license license:gpl2+)))
eb55f018
EF
230
231(define-public viewnior
232 (package
233 (name "viewnior")
234 (version "1.6")
235 (source
236 (origin
237 (method url-fetch)
238 (uri (string-append "https://github.com/xsisqox/Viewnior/archive/"
239 name "-" version ".tar.gz"))
240 (sha256
241 (base32
242 "18309qjgwak3kn228z3p3nx7yxasqgzx69v3rgc23hf161nky0c9"))))
243 (build-system gnu-build-system)
244 (arguments
245 '(#:phases
246 (modify-phases %standard-phases
247 (add-after 'unpack 'autogen
248 (lambda _
ea77385c
EF
249 (zero? (system* "sh" "autogen.sh"))))
250 (add-before 'install 'skip-gtk-update-icon-cache
251 (lambda _
252 ;; Don't create 'icon-theme.cache'
253 (substitute* (find-files "data" "^Makefile$")
254 (("gtk-update-icon-cache") (which "true")))
255 #t)))))
eb55f018
EF
256 (native-inputs
257 `(("automake" ,automake)
258 ("autoconf" ,autoconf)
259 ("intltool" ,intltool)
260 ("glib" ,glib "bin") ; glib-genmarshal
261 ("gnome-common" ,gnome-common)
262 ("libtool" ,libtool)
263 ("pkg-config" ,pkg-config)
264 ("shared-mime-info" ,shared-mime-info)
265 ("which" ,which)))
266 (inputs
267 `(("exiv2" ,exiv2)
268 ("gdk-pixbuf" ,gdk-pixbuf)
269 ("gtk+-2" ,gtk+-2)))
270 (home-page "http://siyanpanayotov.com/project/viewnior/")
271 (synopsis "Simple, fast and elegant image viewer")
272 (description "Viewnior is an image viewer program. Created to be simple,
273fast and elegant. Its minimalistic interface provides more screenspace for
274your images. Among its features are:
275@enumerate
276@item Fullscreen & Slideshow
277@item Rotate, flip, crop, save, delete images
278@item Animation support
279@item Browse only selected images
280@item Navigation window
281@item Set image as wallpaper (Gnome 2, Gnome 3, XFCE, LXDE, FluxBox, Nitrogen)
282@item Simple interface
283@item EXIF and IPTC metadata
284@item Configurable mouse actions
285@end enumerate\n")
286 (license license:gpl3+)))
9016dbc2 287
288(define-public catimg
289 (package
290 (name "catimg")
ddde3f6b 291 (version "2.4.0")
9016dbc2 292 (source
293 (origin
294 (method url-fetch)
295 (uri (string-append "https://github.com/posva/catimg/archive"
296 "/v" version ".tar.gz"))
297 (file-name (string-append name "-" version ".tar.gz"))
298 (sha256
299 (base32
ddde3f6b 300 "1rwgbq2imd5l4nql5hrz7rr5f4gz8aad1amlf0j3cxir8slpbd1y"))))
9016dbc2 301 (build-system cmake-build-system)
302 (arguments
1e5c056c 303 `(#:tests? #f ; no tests
9016dbc2 304 #:phases
305 (modify-phases %standard-phases
306 (replace 'configure
307 (lambda* (#:key inputs #:allow-other-keys)
308 (let* ((magic (assoc-ref %build-inputs "imagemagick"))
309 (convert (string-append magic "/bin/convert")))
310 (substitute* "catimg"
311 ;; By replacing "convert", we also replace the "convert"
312 ;; in the message 'The version of convert is too old, don't
1e5c056c 313 ;; expect good results :('. This should not happen, but in
9016dbc2 314 ;; practice this error message should not affect us.
315 (("convert") convert))
316 #t)))
317 (replace 'build
318 (lambda _
1e5c056c
TGR
319 (let* ((out (assoc-ref %outputs "out"))
320 (man (string-append out "/share/man/man1")))
321 (zero? (system* "cmake"
322 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
323 (string-append "-DMAN_OUTPUT_PATH=" man)
324 "."))
325 (zero? (system* "make")))))
9016dbc2 326 (add-before 'install 'install-script
327 (lambda* (#:key outputs #:allow-other-keys)
1e5c056c 328 ;; The bash script lacks an file extension. We have to rename
9016dbc2 329 ;; it so that the C program and the bash script can be happy
330 ;; side by side.
331 (let* ((out (assoc-ref outputs "out"))
332 (bin (string-append out "/bin")))
333 (install-file "catimg" bin)
334 (rename-file (string-append bin "/catimg")
335 (string-append bin "/catimg.sh"))
336 #t))))))
337 (inputs
1e5c056c 338 `(("imagemagick" ,imagemagick))) ; for the bash script version
9016dbc2 339 (home-page "https://github.com/posva/catimg")
340 (synopsis "Render images in the terminal")
341 (description
342 "Catimg is a little program that prints images in the terminal.
343It supports JPEG, PNG and GIF formats.")
344 (license license:expat)))
e79bfa18
LC
345
346(define-public luminance-hdr
347 (package
348 (name "luminance-hdr")
349 (version "2.4.0")
350 (source (origin
351 (method url-fetch)
352 (uri (string-append
353 "mirror://sourceforge/qtpfsgui/luminance/"
354 version "/luminance-hdr-" version ".tar.bz2"))
355 (sha256
356 (base32
357 "00fldbcizrx8jcnjgq74n3zmbm27dxzl96fxa7q49689mfnlw08l"))
358 (patches (search-patches "luminance-hdr-qt-printer.patch"))))
359 (build-system cmake-build-system)
360 (native-inputs
361 `(("pkg-config" ,pkg-config)
362 ("qttools" ,qttools)))
363 (inputs
364 `(("qtbase" ,qtbase)
365 ("qtdeclarative" ,qtdeclarative)
366 ("qtwebkit" ,qtwebkit)
367 ("boost" ,boost)
368 ;; ("gtest" ,gtest)
369 ("libraw" ,libraw)
370 ("zlib" ,zlib)
371 ("exiv2" ,exiv2)
372 ("libpng" ,libpng)
373 ("libjpeg" ,libjpeg)
374 ("lcms" ,lcms)
375 ("openexr" ,openexr)
376 ("fftw" ,fftwf)
377 ("gsl" ,gsl)
378 ("libtiff" ,libtiff)))
379 (arguments
380 '(#:phases
381 (modify-phases %standard-phases
382 (add-after 'set-paths 'add-ilmbase-include-path
383 (lambda* (#:key inputs #:allow-other-keys)
384 ;; 'OpenEXR.pc' has a -I for IlmBase but 'FindOpenEXR.cmake' does
385 ;; not use 'OpenEXR.pc'. Thus, we need to add
386 ;; "$ilmbase/include/OpenEXR/" to the CPATH.
387 (setenv "CPATH"
388 (string-append (assoc-ref inputs "ilmbase")
389 "/include/OpenEXR"
390 ":" (or (getenv "CPATH") "")))
391 #t)))))
392 (home-page "http://qtpfsgui.sourceforge.net")
393 (synopsis "High dynamic range (HDR) imaging application")
394 (description
395 "Luminance HDR (formerly QtPFSGui) is a graphical user interface
396application that aims to provide a workflow for high dynamic range (HDR)
397imaging. It supports several HDR and LDR image formats, and it can:
398
399@itemize
400@item Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and
40116bit, RAW) of the same scene taken at different exposure setting;
402@item Save load HDR images;
403@item Rotate, resize and crop HDR images;
404@item Tone-map HDR images;
405@item Copy EXIF data between sets of images.
406@end itemize\n")
407 (license license:gpl2+)))
4ee81d37 408
409;; CBR and RAR are currently unsupported, due to non-free dependencies.
410;; For optional PDF support, you can install the mupdf package.
411(define-public mcomix
412 (package
413 (name "mcomix")
414 (version "1.2.1")
415 (source
416 (origin
417 (method url-fetch)
418 (uri (string-append "mirror://sourceforge/mcomix/MComix-" version
419 "/mcomix-" version ".tar.bz2"))
420 (sha256
421 (base32
422 "0fzsf9pklhfs1rzwzj64c0v30b74nk94p93h371rpg45qnfiahvy"))))
423 (build-system python-build-system)
424 (inputs
425 `(("p7zip" ,p7zip)
426 ("python2-pillow" ,python2-pillow)
427 ("python2-pygtk" ,python2-pygtk)))
428 (arguments
429 ;; Python 2.5 or newer (Python 3 and up is not supported)
430 `(#:python ,python-2
21169e31 431 #:tests? #f ; there are no tests
4ee81d37 432 #:phases
433 (modify-phases %standard-phases
434 (add-after 'unpack 'configure
435 (lambda* (#:key inputs #:allow-other-keys)
436 (let ((p7zip (assoc-ref inputs "p7zip")))
437 ;; insert absolute path to 7z executable
438 (substitute* "mcomix/archive/sevenzip_external.py"
439 (("_7z_executable = -1")
440 (string-append "_7z_executable = u'" p7zip "/bin/7z'"))))
441 #t)))))
442 (home-page "https://sourceforge.net/p/mcomix/wiki/Home/")
443 (synopsis "Image viewer for comics")
444 (description "MComix is a customizable image viewer that specializes as
445a comic and manga reader. It supports a variety of container formats
446including CBZ, CB7, CBT, LHA.")
447 (license license:gpl2+)))