2017-03-15 16:05:20 -04:00
|
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
|
|
|
|
;;; Copyright © 2017 John Darrington <jmd@gnu.org>
|
|
|
|
|
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
|
2017-03-15 16:05:24 -04:00
|
|
|
|
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
|
|
|
|
|
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
|
|
|
|
|
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
|
2019-03-18 08:14:12 -04:00
|
|
|
|
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
2018-02-16 14:31:37 -05:00
|
|
|
|
;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
|
2018-12-05 13:03:13 -05:00
|
|
|
|
;;; Copyright © 2018 Lprndn <guix@lprndn.info>
|
2019-01-13 15:26:40 -05:00
|
|
|
|
;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
|
2017-03-15 16:05:20 -04:00
|
|
|
|
;;;
|
|
|
|
|
;;; This file is part of GNU Guix.
|
|
|
|
|
;;;
|
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
|
;;; your option) any later version.
|
|
|
|
|
;;;
|
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
|
;;;
|
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
(define-module (gnu packages image-processing)
|
|
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
|
|
|
#:use-module (guix packages)
|
|
|
|
|
#:use-module (guix utils)
|
|
|
|
|
#:use-module (guix download)
|
2019-01-14 04:47:00 -05:00
|
|
|
|
#:use-module (guix git-download)
|
2017-03-15 16:05:23 -04:00
|
|
|
|
#:use-module (guix build-system cmake)
|
2017-03-15 16:05:20 -04:00
|
|
|
|
#:use-module (guix build-system gnu)
|
|
|
|
|
#:use-module (gnu packages)
|
2017-03-15 16:05:23 -04:00
|
|
|
|
#:use-module (gnu packages algebra)
|
2018-12-05 13:03:13 -05:00
|
|
|
|
#:use-module (gnu packages bison)
|
2017-03-15 16:05:23 -04:00
|
|
|
|
#:use-module (gnu packages boost)
|
2017-03-15 16:05:20 -04:00
|
|
|
|
#:use-module (gnu packages compression)
|
|
|
|
|
#:use-module (gnu packages documentation)
|
2018-12-05 13:03:13 -05:00
|
|
|
|
#:use-module (gnu packages flex)
|
2017-03-15 16:05:24 -04:00
|
|
|
|
#:use-module (gnu packages fontutils)
|
2018-12-05 12:59:34 -05:00
|
|
|
|
#:use-module (gnu packages ghostscript)
|
2017-03-15 16:05:24 -04:00
|
|
|
|
#:use-module (gnu packages gl)
|
2018-12-05 12:59:34 -05:00
|
|
|
|
#:use-module (gnu packages glib)
|
2017-03-15 16:05:23 -04:00
|
|
|
|
#:use-module (gnu packages gnome)
|
|
|
|
|
#:use-module (gnu packages graphics)
|
|
|
|
|
#:use-module (gnu packages graphviz)
|
2018-12-05 12:59:34 -05:00
|
|
|
|
#:use-module (gnu packages gstreamer)
|
2018-02-16 14:31:37 -05:00
|
|
|
|
#:use-module (gnu packages gtk)
|
2017-03-15 16:05:20 -04:00
|
|
|
|
#:use-module (gnu packages image)
|
2018-12-05 12:59:34 -05:00
|
|
|
|
#:use-module (gnu packages imagemagick)
|
2017-03-15 16:05:23 -04:00
|
|
|
|
#:use-module (gnu packages maths)
|
2018-12-05 12:59:34 -05:00
|
|
|
|
#:use-module (gnu packages pdf)
|
2017-03-15 16:05:23 -04:00
|
|
|
|
#:use-module (gnu packages perl)
|
2018-02-16 14:31:37 -05:00
|
|
|
|
#:use-module (gnu packages photo)
|
2017-03-15 16:05:23 -04:00
|
|
|
|
#:use-module (gnu packages pkg-config)
|
2018-02-16 14:31:37 -05:00
|
|
|
|
#:use-module (gnu packages protobuf)
|
2017-03-15 16:05:23 -04:00
|
|
|
|
#:use-module (gnu packages python)
|
gnu: Separate Python core packages from the rest.
* gnu/packages/python.scm: Move hundreds of package definitions from here...
* gnu/packages/python-xyz.scm: ...to this new module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/ada.scm,
gnu/packages/admin.scm,
gnu/packages/android.scm,
gnu/packages/audio.scm,
gnu/packages/backup.scm,
gnu/packages/benchmark.scm,
gnu/packages/bioinformatics.scm,
gnu/packages/bittorrent.scm,
gnu/packages/calendar.scm,
gnu/packages/check.scm,
gnu/packages/chemistry.scm,
gnu/packages/cluster.scm,
gnu/packages/compression.scm,
gnu/packages/connman.scm,
gnu/packages/crypto.scm,
gnu/packages/cups.scm,
gnu/packages/databases.scm,
gnu/packages/dav.scm,
gnu/packages/direct-connect.scm,
gnu/packages/disk.scm,
gnu/packages/django.scm,
gnu/packages/dlang.scm,
gnu/packages/docker.scm,
gnu/packages/ebook.scm,
gnu/packages/elf.scm,
gnu/packages/emacs.scm,
gnu/packages/emulators.scm,
gnu/packages/engineering.scm,
gnu/packages/enlightenment.scm,
gnu/packages/finance.scm,
gnu/packages/fltk.scm,
gnu/packages/fontutils.scm,
gnu/packages/freedesktop.scm,
gnu/packages/game-development.scm,
gnu/packages/games.scm,
gnu/packages/geo.scm,
gnu/packages/gl.scm,
gnu/packages/glib.scm,
gnu/packages/gnome.scm,
gnu/packages/gnupg.scm,
gnu/packages/gnuzilla.scm,
gnu/packages/graph.scm,
gnu/packages/graphics.scm,
gnu/packages/graphviz.scm,
gnu/packages/gtk.scm,
gnu/packages/ham-radio.scm,
gnu/packages/image-processing.scm,
gnu/packages/image-viewers.scm,
gnu/packages/image.scm,
gnu/packages/irc.scm,
gnu/packages/jrnl.scm,
gnu/packages/julia.scm,
gnu/packages/kde-frameworks.scm,
gnu/packages/key-mon.scm,
gnu/packages/libffi.scm,
gnu/packages/libreoffice.scm,
gnu/packages/libusb.scm,
gnu/packages/lirc.scm,
gnu/packages/logging.scm,
gnu/packages/machine-learning.scm,
gnu/packages/mail.scm,
gnu/packages/mate.scm,
gnu/packages/maths.scm,
gnu/packages/medical.scm,
gnu/packages/messaging.scm,
gnu/packages/monitoring.scm,
gnu/packages/mp3.scm,
gnu/packages/mpd.scm,
gnu/packages/music.scm,
gnu/packages/networking.scm,
gnu/packages/nutrition.scm,
gnu/packages/openldap.scm,
gnu/packages/openstack.scm,
gnu/packages/package-management.scm,
gnu/packages/password-utils.scm,
gnu/packages/patchutils.scm,
gnu/packages/pdf.scm,
gnu/packages/photo.scm,
gnu/packages/polkit.scm,
gnu/packages/protobuf.scm,
gnu/packages/python-crypto.scm,
gnu/packages/python-web.scm,
gnu/packages/qt.scm,
gnu/packages/rdf.scm,
gnu/packages/ruby.scm,
gnu/packages/search.scm,
gnu/packages/selinux.scm,
gnu/packages/serialization.scm,
gnu/packages/shells.scm,
gnu/packages/simulation.scm,
gnu/packages/ssh.scm,
gnu/packages/statistics.scm,
gnu/packages/storage.scm,
gnu/packages/sync.scm,
gnu/packages/terminals.scm,
gnu/packages/textutils.scm,
gnu/packages/time.scm,
gnu/packages/tls.scm,
gnu/packages/tor.scm,
gnu/packages/tryton.scm,
gnu/packages/version-control.scm,
gnu/packages/video.scm,
gnu/packages/virtualization.scm,
gnu/packages/vpn.scm,
gnu/packages/web-browsers.scm,
gnu/packages/web.scm,
gnu/packages/wicd.scm,
gnu/packages/xdisorg.scm,
gnu/packages/xorg.scm: Update module references.
2019-01-15 08:21:30 -05:00
|
|
|
|
#:use-module (gnu packages python-xyz)
|
2017-03-15 16:05:24 -04:00
|
|
|
|
#:use-module (gnu packages serialization)
|
2019-03-18 08:16:30 -04:00
|
|
|
|
#:use-module (gnu packages tls)
|
2018-02-16 14:31:37 -05:00
|
|
|
|
#:use-module (gnu packages video)
|
2017-03-15 16:05:24 -04:00
|
|
|
|
#:use-module (gnu packages xiph)
|
2017-03-15 16:05:23 -04:00
|
|
|
|
#:use-module (gnu packages xml)
|
2019-01-15 06:18:00 -05:00
|
|
|
|
#:use-module (gnu packages xorg)
|
|
|
|
|
#:use-module (ice-9 match))
|
2017-03-15 16:05:20 -04:00
|
|
|
|
|
|
|
|
|
(define-public dcmtk
|
|
|
|
|
(package
|
|
|
|
|
(name "dcmtk")
|
2019-03-18 08:14:12 -04:00
|
|
|
|
(version "3.6.4")
|
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri
|
|
|
|
|
(string-append "ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/"
|
|
|
|
|
"dcmtk" (string-join (string-split version #\.) "")
|
|
|
|
|
"/dcmtk-" version ".tar.gz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32 "1h22z8g0kmvhg8lgkbikyzyphhvxvq6018a00yd6i4g0z9ag6gx9"))))
|
|
|
|
|
(build-system cmake-build-system)
|
2017-03-15 16:05:20 -04:00
|
|
|
|
(inputs
|
2019-03-18 08:16:30 -04:00
|
|
|
|
`(;; Our ICU is too recent: “error: ‘UChar’ does not name a type“.
|
|
|
|
|
;; ("icu4c" ,icu4c)
|
|
|
|
|
("libjpeg" ,libjpeg)
|
2017-03-15 16:05:20 -04:00
|
|
|
|
("libpng" ,libpng)
|
2019-03-18 08:14:12 -04:00
|
|
|
|
("libtiff" ,libtiff)
|
2019-03-18 08:16:30 -04:00
|
|
|
|
("libxml2" ,libxml2)
|
|
|
|
|
("openssl" ,openssl)
|
2017-03-15 16:05:20 -04:00
|
|
|
|
("zlib" ,zlib)))
|
|
|
|
|
(native-inputs
|
2019-03-18 08:14:12 -04:00
|
|
|
|
`(("doxygen" ,doxygen))) ; for HTML documentation
|
2019-03-18 08:11:56 -04:00
|
|
|
|
(home-page "https://dcmtk.org")
|
2017-03-15 16:05:20 -04:00
|
|
|
|
(synopsis "Libraries and programs implementing parts of the DICOM standard")
|
|
|
|
|
(description "DCMTK is a collection of libraries and applications
|
|
|
|
|
implementing large parts the DICOM standard. It includes software for
|
|
|
|
|
examining, constructing and converting DICOM image files, handling offline
|
|
|
|
|
media, sending and receiving images over a network connection, as well as
|
|
|
|
|
demonstrative image storage and worklist servers.")
|
|
|
|
|
(license (license:fsf-free
|
|
|
|
|
"file://COPYRIGHT"
|
|
|
|
|
"A union of the Apache 2.0 licence and various non-copyleft
|
|
|
|
|
licences similar to the Modified BSD licence."))))
|
2017-03-15 16:05:23 -04:00
|
|
|
|
|
|
|
|
|
(define-public mia
|
|
|
|
|
(package
|
|
|
|
|
(name "mia")
|
2018-01-21 05:15:03 -05:00
|
|
|
|
(version "2.4.6")
|
2017-03-15 16:05:23 -04:00
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "mirror://sourceforge/mia/mia/"
|
|
|
|
|
(version-major+minor version)
|
|
|
|
|
"/mia-" version ".tar.xz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2018-01-21 05:15:03 -05:00
|
|
|
|
"0j4nd5z7i3v199jh7hqqhwd4g7snchizkc7rhzanpvngqg91m1pb"))))
|
2017-03-15 16:05:23 -04:00
|
|
|
|
(build-system cmake-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:configure-flags
|
|
|
|
|
(list "-DMIA_CREATE_NIPYPE_INTERFACES=0"
|
|
|
|
|
"-DCMAKE_CXX_FLAGS=-fpermissive")))
|
|
|
|
|
(inputs
|
|
|
|
|
`(("boost" ,boost)
|
|
|
|
|
("dcmtk" ,dcmtk)
|
|
|
|
|
("doxygen" ,doxygen)
|
|
|
|
|
("eigen" ,eigen)
|
|
|
|
|
("fftw" ,fftw)
|
|
|
|
|
("fftwf" ,fftwf)
|
|
|
|
|
("gsl" ,gsl)
|
|
|
|
|
("gts" ,gts)
|
|
|
|
|
("hdf5" ,hdf5)
|
|
|
|
|
("itpp" ,itpp)
|
|
|
|
|
("libjpeg" ,libjpeg)
|
|
|
|
|
("libpng" ,libpng)
|
|
|
|
|
("libtiff" ,libtiff)
|
|
|
|
|
("libxml" ,libxml2)
|
|
|
|
|
("libxml++" ,libxml++)
|
|
|
|
|
("maxflow" ,maxflow)
|
|
|
|
|
("niftilib" ,niftilib)
|
|
|
|
|
("nlopt" ,nlopt)
|
|
|
|
|
("openexr" ,openexr)
|
|
|
|
|
("python-lxml" ,python2-lxml)
|
|
|
|
|
("vtk" ,vtk)))
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(("pkg-config" ,pkg-config)
|
|
|
|
|
("python" ,python-2)))
|
|
|
|
|
(home-page "http://mia.sourceforge.net")
|
|
|
|
|
(synopsis "Toolkit for gray scale medical image analysis")
|
|
|
|
|
(description "MIA provides a combination of command line tools, plug-ins,
|
|
|
|
|
and libraries that make it possible run image processing tasks interactively
|
|
|
|
|
in a command shell and to prototype using the shell's scripting language. It
|
|
|
|
|
is built around a plug-in structure that makes it easy to add functionality
|
|
|
|
|
without compromising the original code base and it makes use of a wide variety
|
|
|
|
|
of external libraries that provide additional functionality.")
|
|
|
|
|
(license license:gpl3+)))
|
2017-03-15 16:05:24 -04:00
|
|
|
|
|
|
|
|
|
(define-public vtk
|
|
|
|
|
(package
|
|
|
|
|
(name "vtk")
|
2019-01-30 14:59:22 -05:00
|
|
|
|
(version "8.2.0")
|
2017-03-15 16:05:24 -04:00
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
2019-01-30 14:58:54 -05:00
|
|
|
|
(uri (string-append "https://vtk.org/files/release/"
|
2017-03-15 16:05:24 -04:00
|
|
|
|
(version-major+minor version)
|
|
|
|
|
"/VTK-" version ".tar.gz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2019-01-30 14:59:22 -05:00
|
|
|
|
"1fspgp8k0myr6p2a6wkc21ldcswb4bvmb484m12mxgk1a9vxrhrl"))))
|
2017-03-15 16:05:24 -04:00
|
|
|
|
(build-system cmake-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
'(#:build-type "Release" ;Build without '-g' to save space.
|
|
|
|
|
;; -DVTK_USE_SYSTEM_NETCDF:BOOL=TRUE requires netcdf_cxx
|
|
|
|
|
#:configure-flags '("-DVTK_USE_SYSTEM_EXPAT:BOOL=TRUE"
|
|
|
|
|
"-DVTK_USE_SYSTEM_FREETYPE:BOOL=TRUE"
|
|
|
|
|
"-DVTK_USE_SYSTEM_HDF5:BOOL=TRUE"
|
|
|
|
|
"-DVTK_USE_SYSTEM_JPEG:BOOL=TRUE"
|
|
|
|
|
"-DVTK_USE_SYSTEM_JSONCPP:BOOL=TRUE"
|
|
|
|
|
"-DVTK_USE_SYSTEM_LIBXML2:BOOL=TRUE"
|
|
|
|
|
"-DVTK_USE_SYSTEM_OGGTHEORA:BOOL=TRUE"
|
|
|
|
|
"-DVTK_USE_SYSTEM_PNG:BOOL=TRUE"
|
|
|
|
|
"-DVTK_USE_SYSTEM_TIFF:BOOL=TRUE"
|
|
|
|
|
"-DVTK_USE_SYSTEM_ZLIB:BOOL=TRUE")
|
|
|
|
|
#:tests? #f)) ;XXX: no "test" target
|
|
|
|
|
(inputs
|
|
|
|
|
`(("libXt" ,libxt)
|
gnu: Switch from xproto to xorgproto.
* gnu/packages/compton.scm (compton)[inputs]: Replace XPROTO with XORGPROTO.
* gnu/packages/enlightenment.scm (efl)[inputs]: Likewise.
* gnu/packages/gnome.scm (totem)[inputs]: Likewise.
* gnu/packages/haskell.scm (ghc-x11-xft)[inputs]: Likewise.
* gnu/packages/image-processing.scm (vtk)[inputs]: Likewise.
* gnu/packages/mate.scm (mate-control-center, mate-netbook, mate-screensaver,
mate-utils)[native-inputs]: Likewise.
* gnu/packages/xdisorg.scm (xautomation)[native-inputs]: Likewise.
* gnu/packages/xnee.scm (xnee)[inputs]: Likewise.
* gnu/packages/xorg.scm (imake, lndir, libxshmfence, libfontenc, libfs,
libxcomposite, libxdmcp, libxft, libxmu, libxpm, libxres, makedepend,
mkfontscale, sessreg, xev, xf86-video-qxl, xkbcomp-intermediate, xkbutils,
xlsfonts, xmodmap, xpr, xprop, xrandr, xset, xwd, xwininfo, xwud, xorg-rgb,
libxdamage, libxrender, libxv, libice, libxau, libxfixes, libxfont, libxi,
libxrandr, libxvmc, xorg-server, libxcursor, libxaw, twm, xinit,
xterm)[inputs]: Likewise.
(xorgproto): Move expression before all other -proto packages.
(xproto)[properties]: Mark as superseded by XORGPROTO.
2018-03-10 06:16:48 -05:00
|
|
|
|
("xorgproto" ,xorgproto)
|
2017-03-15 16:05:24 -04:00
|
|
|
|
("libX11" ,libx11)
|
|
|
|
|
("libxml2" ,libxml2)
|
|
|
|
|
("mesa" ,mesa)
|
|
|
|
|
("glu" ,glu)
|
|
|
|
|
("expat" ,expat)
|
|
|
|
|
("freetype" ,freetype)
|
|
|
|
|
("hdf5" ,hdf5)
|
|
|
|
|
("jpeg" ,libjpeg)
|
|
|
|
|
("jsoncpp" ,jsoncpp)
|
|
|
|
|
("libogg" ,libogg)
|
|
|
|
|
("libtheora" ,libtheora)
|
|
|
|
|
("png" ,libpng)
|
|
|
|
|
("tiff" ,libtiff)
|
|
|
|
|
("zlib" ,zlib)))
|
2019-01-30 14:58:54 -05:00
|
|
|
|
(home-page "https://vtk.org/")
|
2017-03-15 16:05:24 -04:00
|
|
|
|
(synopsis "Libraries for 3D computer graphics")
|
|
|
|
|
(description
|
|
|
|
|
"The Visualization Toolkit (VTK) is a C++ library for 3D computer graphics,
|
|
|
|
|
image processing and visualization. It supports a wide variety of
|
|
|
|
|
visualization algorithms including: scalar, vector, tensor, texture, and
|
|
|
|
|
volumetric methods; and advanced modeling techniques such as: implicit
|
|
|
|
|
modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay
|
|
|
|
|
triangulation. VTK has an extensive information visualization framework, has
|
|
|
|
|
a suite of 3D interaction widgets, supports parallel processing, and
|
|
|
|
|
integrates with various databases on GUI toolkits such as Qt and Tk.")
|
|
|
|
|
(license license:bsd-3)))
|
2018-02-16 14:31:37 -05:00
|
|
|
|
|
|
|
|
|
(define-public opencv
|
|
|
|
|
(package
|
|
|
|
|
(name "opencv")
|
2018-10-03 16:28:19 -04:00
|
|
|
|
(version "3.4.3")
|
2018-02-16 14:31:37 -05:00
|
|
|
|
(source (origin
|
2019-01-14 04:47:00 -05:00
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/opencv/opencv")
|
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name name version))
|
2018-02-16 14:31:37 -05:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2019-01-14 04:47:00 -05:00
|
|
|
|
"06bc61r8myym4s8im10brdjfg4wxkrvsbhhl7vr1msdan2xddzi3"))
|
2018-02-16 14:31:37 -05:00
|
|
|
|
(modules '((guix build utils)))
|
|
|
|
|
(snippet
|
|
|
|
|
'(begin
|
|
|
|
|
;; Remove external libraries. We have all available in Guix:
|
|
|
|
|
(delete-file-recursively "3rdparty")
|
|
|
|
|
|
|
|
|
|
;; Milky icon set is non-free:
|
|
|
|
|
(delete-file-recursively "modules/highgui/src/files_Qt/Milky")
|
|
|
|
|
|
|
|
|
|
;; Some jars found:
|
|
|
|
|
(for-each delete-file
|
|
|
|
|
'("modules/java/test/pure_test/lib/junit-4.11.jar"
|
2019-01-14 04:47:00 -05:00
|
|
|
|
"samples/java/sbt/sbt/sbt-launch.jar"))
|
|
|
|
|
#t))))
|
2018-02-16 14:31:37 -05:00
|
|
|
|
(build-system cmake-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:configure-flags
|
|
|
|
|
(list "-DWITH_IPP=OFF"
|
|
|
|
|
"-DWITH_ITT=OFF"
|
2019-01-13 15:26:40 -05:00
|
|
|
|
"-DWITH_CAROTENE=OFF" ; only visible on arm/aarch64
|
2019-01-14 03:03:41 -05:00
|
|
|
|
"-DENABLE_PRECOMPILED_HEADERS=OFF"
|
2018-02-16 14:31:37 -05:00
|
|
|
|
|
|
|
|
|
;; CPU-Features:
|
|
|
|
|
;; See cmake/OpenCVCompilerOptimizations.cmake
|
|
|
|
|
;; (CPU_ALL_OPTIMIZATIONS) for a list of all optimizations
|
|
|
|
|
;; BASELINE is the minimum optimization all CPUs must support
|
|
|
|
|
;;
|
2019-01-15 06:18:00 -05:00
|
|
|
|
;; DISPATCH is the list of optional dispatches.
|
|
|
|
|
"-DCPU_BASELINE=SSE2"
|
2018-02-16 14:31:37 -05:00
|
|
|
|
|
2019-01-15 06:18:00 -05:00
|
|
|
|
,@(match (%current-system)
|
|
|
|
|
("x86_64-linux"
|
|
|
|
|
'("-DCPU_DISPATCH=NEON;VFPV3;FP16;SSE;SSE2;SSE3;SSSE3;SSE4_1;SSE4_2;POPCNT;AVX;FP16;AVX2;FMA3;AVX_512F;AVX512_SKX"
|
|
|
|
|
"-DCPU_DISPATCH_REQUIRE=SSE3,SSSE3,SSE4_1,SSE4_2,AVX,AVX2"))
|
|
|
|
|
("armhf-linux"
|
|
|
|
|
'("-DCPU_BASELINE_DISABLE=NEON")) ; causes build failures
|
|
|
|
|
("aarch64-linux"
|
|
|
|
|
'("-DCPU_BASELINE=NEON"
|
|
|
|
|
"-DCPU_DISPATCH=NEON;VFPV3;FP16"))
|
|
|
|
|
(_ '()))
|
2018-02-16 14:31:37 -05:00
|
|
|
|
|
|
|
|
|
"-DBUILD_PERF_TESTS=OFF"
|
2019-01-13 15:26:40 -05:00
|
|
|
|
"-DBUILD_TESTS=ON"
|
2018-02-16 14:31:37 -05:00
|
|
|
|
|
2019-01-14 03:01:52 -05:00
|
|
|
|
(string-append "-DOPENCV_EXTRA_MODULES_PATH=" (getcwd)
|
2019-01-14 04:47:00 -05:00
|
|
|
|
"/opencv-contrib/modules")
|
2018-02-16 14:31:37 -05:00
|
|
|
|
|
|
|
|
|
;;Define test data:
|
2019-01-14 03:01:52 -05:00
|
|
|
|
(string-append "-DOPENCV_TEST_DATA_PATH=" (getcwd)
|
2019-01-14 04:47:00 -05:00
|
|
|
|
"/opencv-extra/testdata")
|
2018-02-16 14:31:37 -05:00
|
|
|
|
|
|
|
|
|
;; Is ON by default and would try to rebuild 3rd-party protobuf,
|
|
|
|
|
;; which we had removed, which would lead to an error:
|
|
|
|
|
"-DBUILD_PROTOBUF=OFF"
|
|
|
|
|
|
|
|
|
|
;; Rebuild protobuf files, because we have a slightly different
|
|
|
|
|
;; version than the included one. If we would not update, we
|
|
|
|
|
;; would get a compile error later:
|
|
|
|
|
"-DPROTOBUF_UPDATE_FILES=ON"
|
|
|
|
|
|
|
|
|
|
;; xfeatures2d disabled, because it downloads extra binaries from
|
|
|
|
|
;; https://github.com/opencv/opencv_3rdparty
|
|
|
|
|
;; defined in xfeatures2d/cmake/download_{vgg|bootdesc}.cmake
|
|
|
|
|
;; Cmp this bug entry:
|
|
|
|
|
;; https://github.com/opencv/opencv_contrib/issues/1131
|
|
|
|
|
"-DBUILD_opencv_xfeatures2d=OFF")
|
|
|
|
|
#:phases
|
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
|
(add-after 'unpack 'disable-broken-tests
|
|
|
|
|
(lambda _
|
|
|
|
|
;; These tests fails with:
|
|
|
|
|
;; vtkXOpenGLRenderWindow (0x723990): Could not find a decent config
|
|
|
|
|
;; I think we have no OpenGL support with the Xvfb.
|
|
|
|
|
(substitute* '("modules/viz/test/test_tutorial3.cpp"
|
|
|
|
|
"modules/viz/test/test_main.cpp"
|
|
|
|
|
"modules/viz/test/tests_simple.cpp"
|
|
|
|
|
"modules/viz/test/test_viz3d.cpp")
|
|
|
|
|
(("(TEST\\(Viz, )([a-z].*\\).*)" all pre post)
|
|
|
|
|
(string-append pre "DISABLED_" post)))
|
|
|
|
|
|
|
|
|
|
;; This one fails with "unknown file: Failure"
|
|
|
|
|
;; But I couldn't figure out which file was missing:
|
2019-01-14 04:47:00 -05:00
|
|
|
|
(substitute* "../opencv-contrib/modules/face/test/test_face_align.cpp"
|
2018-02-16 14:31:37 -05:00
|
|
|
|
(("(TEST\\(CV_Face_FacemarkKazemi, )(can_detect_landmarks\\).*)"
|
|
|
|
|
all pre post)
|
|
|
|
|
(string-append pre "DISABLED_" post)))
|
|
|
|
|
|
|
|
|
|
;; Failure reason: Bad accuracy
|
|
|
|
|
;; Incorrect count of accurate poses [2nd case]: 90.000000 / 94.000000
|
2019-01-14 04:47:00 -05:00
|
|
|
|
(substitute* "../opencv-contrib/modules/rgbd/test/test_odometry.cpp"
|
2018-02-16 14:31:37 -05:00
|
|
|
|
(("(TEST\\(RGBD_Odometry_Rgbd, )(algorithmic\\).*)" all pre post)
|
|
|
|
|
(string-append pre "DISABLED_" post)))
|
|
|
|
|
#t))
|
|
|
|
|
|
|
|
|
|
(add-after 'unpack 'unpack-submodule-sources
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(mkdir "../opencv-extra")
|
|
|
|
|
(mkdir "../opencv-contrib")
|
2019-01-14 04:47:00 -05:00
|
|
|
|
(copy-recursively (assoc-ref inputs "opencv-extra")
|
|
|
|
|
"../opencv-extra")
|
|
|
|
|
(invoke "tar" "xvf"
|
|
|
|
|
(assoc-ref inputs "opencv-contrib")
|
|
|
|
|
"--strip-components=1"
|
|
|
|
|
"-C" "../opencv-contrib")))
|
2018-02-16 14:31:37 -05:00
|
|
|
|
|
|
|
|
|
(add-after 'set-paths 'add-ilmbase-include-path
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
;; OpenEXR propagates ilmbase, but its include files do not appear
|
|
|
|
|
;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
|
|
|
|
|
;; the CPATH to satisfy the dependency on "ImathVec.h".
|
|
|
|
|
(setenv "CPATH"
|
|
|
|
|
(string-append (assoc-ref inputs "ilmbase")
|
|
|
|
|
"/include/OpenEXR"
|
|
|
|
|
":" (or (getenv "CPATH") "")))
|
|
|
|
|
#t))
|
|
|
|
|
(add-before 'check 'start-xserver
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(let ((xorg-server (assoc-ref inputs "xorg-server"))
|
|
|
|
|
(disp ":1"))
|
|
|
|
|
(setenv "HOME" (getcwd))
|
|
|
|
|
(setenv "DISPLAY" disp)
|
|
|
|
|
;; There must be a running X server and make check doesn't start one.
|
|
|
|
|
;; Therefore we must do it.
|
|
|
|
|
(zero? (system (format #f "~a/bin/Xvfb ~a &" xorg-server disp)))))))))
|
|
|
|
|
(native-inputs
|
2019-01-14 04:47:00 -05:00
|
|
|
|
`(("pkg-config" ,pkg-config)
|
2018-02-16 14:31:37 -05:00
|
|
|
|
("xorg-server" ,xorg-server) ; For running the tests
|
|
|
|
|
("opencv-extra"
|
|
|
|
|
,(origin
|
2019-01-14 04:47:00 -05:00
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/opencv/opencv_extra")
|
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name "opencv_extra" version))
|
2018-02-16 14:31:37 -05:00
|
|
|
|
(sha256
|
2019-01-14 04:47:00 -05:00
|
|
|
|
(base32 "08p5xnq8n1jw8svvz0fnirfg7q8dm3p4a5dl7527s5xj0f9qn7lp"))))
|
2018-02-16 14:31:37 -05:00
|
|
|
|
("opencv-contrib"
|
|
|
|
|
,(origin
|
2019-01-14 04:47:00 -05:00
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/opencv/opencv_contrib")
|
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name "opencv_contrib" version))
|
2019-01-14 04:32:02 -05:00
|
|
|
|
(patches (search-patches "opencv-rgbd-aarch64-test-fix.patch"))
|
2018-02-16 14:31:37 -05:00
|
|
|
|
(sha256
|
2019-01-14 04:47:00 -05:00
|
|
|
|
(base32 "1f334glf39nk42mpqq6j732h3ql2mpz89jd4mcl678s8n73nfjh2"))))))
|
2018-02-16 14:31:37 -05:00
|
|
|
|
(inputs `(("libjpeg" ,libjpeg)
|
|
|
|
|
("libpng" ,libpng)
|
|
|
|
|
("jasper" ,jasper)
|
|
|
|
|
;; ffmpeg 4.0 causes core dumps in tests.
|
|
|
|
|
("ffmpeg" ,ffmpeg-3.4)
|
|
|
|
|
("libtiff" ,libtiff)
|
|
|
|
|
("hdf5" ,hdf5)
|
|
|
|
|
("libgphoto2" ,libgphoto2)
|
|
|
|
|
("libwebp" ,libwebp)
|
|
|
|
|
("zlib" ,zlib)
|
|
|
|
|
("gtkglext" ,gtkglext)
|
|
|
|
|
("openexr" ,openexr)
|
|
|
|
|
("ilmbase" ,ilmbase)
|
|
|
|
|
("gtk+" ,gtk+-2)
|
|
|
|
|
("python-numpy" ,python-numpy)
|
|
|
|
|
("protobuf" ,protobuf)
|
|
|
|
|
("vtk" ,vtk)
|
|
|
|
|
("python" ,python)))
|
2018-05-12 19:40:30 -04:00
|
|
|
|
;; These three CVEs are not a problem of OpenCV, see:
|
|
|
|
|
;; https://github.com/opencv/opencv/issues/10998
|
|
|
|
|
(properties '((lint-hidden-cve . ("CVE-2018-7712"
|
|
|
|
|
"CVE-2018-7713"
|
|
|
|
|
"CVE-2018-7714"))))
|
2018-02-16 14:31:37 -05:00
|
|
|
|
(synopsis "Computer vision library")
|
|
|
|
|
(description "OpenCV is a library aimed at
|
|
|
|
|
real-time computer vision, including several hundred computer
|
|
|
|
|
vision algorithms. It can be used to do things like:
|
|
|
|
|
|
|
|
|
|
@itemize
|
|
|
|
|
@item image and video input and output
|
|
|
|
|
@item image and video processing
|
|
|
|
|
@item displaying
|
|
|
|
|
@item feature recognition
|
|
|
|
|
@item segmentation
|
|
|
|
|
@item facial recognition
|
|
|
|
|
@item stereo vision
|
|
|
|
|
@item structure from motion
|
|
|
|
|
@item augmented reality
|
|
|
|
|
@item machine learning
|
|
|
|
|
@end itemize\n")
|
|
|
|
|
(home-page "https://opencv.org/")
|
|
|
|
|
(license license:bsd-3)))
|
2018-12-05 12:59:34 -05:00
|
|
|
|
|
|
|
|
|
(define-public vips
|
|
|
|
|
(package
|
|
|
|
|
(name "vips")
|
2019-03-18 09:44:11 -04:00
|
|
|
|
(version "8.7.4")
|
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
|
|
|
|
"https://github.com/libvips/libvips/releases/download/v"
|
|
|
|
|
version "/vips-" version ".tar.gz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32 "01gjhcrl6zj7mcj1al717v5jsniahplqhz1xkfh2j78vyfl1hxff"))))
|
2018-12-05 12:59:34 -05:00
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(("pkg-config" ,pkg-config)
|
|
|
|
|
("gobject-introspection" ,gobject-introspection)))
|
|
|
|
|
(inputs
|
|
|
|
|
`(("glib" ,glib)
|
|
|
|
|
("libjpeg" ,libjpeg)
|
|
|
|
|
("libpng" ,libpng)
|
|
|
|
|
("librsvg" ,librsvg)
|
|
|
|
|
("libtiff" ,libtiff)
|
|
|
|
|
("libexif" ,libexif)
|
|
|
|
|
("giflib" ,giflib)
|
|
|
|
|
("libgsf" ,libgsf)
|
|
|
|
|
("fftw" ,fftw)
|
|
|
|
|
("poppler" ,poppler)
|
|
|
|
|
("pango" ,pango)
|
|
|
|
|
("lcms" ,lcms)
|
|
|
|
|
("matio" ,matio)
|
|
|
|
|
("libwebp" ,libwebp)
|
|
|
|
|
("niftilib" ,niftilib)
|
|
|
|
|
("openexr" ,openexr)
|
|
|
|
|
("orc" ,orc)
|
|
|
|
|
("imagemagick" ,imagemagick)
|
|
|
|
|
("libxml2" ,libxml2)
|
|
|
|
|
("expat" ,expat)
|
|
|
|
|
("hdf5" ,hdf5)))
|
|
|
|
|
(home-page "https://libvips.github.io/libvips/")
|
2019-03-18 09:50:49 -04:00
|
|
|
|
(synopsis "Multithreaded image processing system with low memory needs")
|
2018-12-23 15:27:19 -05:00
|
|
|
|
(description
|
2019-03-18 09:50:49 -04:00
|
|
|
|
"VIPS is a demand-driven, horizontally threaded image processing library.
|
|
|
|
|
It's particularly good at processing large images, working with colour,
|
|
|
|
|
scientific analysis, and general research & development.
|
|
|
|
|
|
|
|
|
|
Compared to most image processing libraries VIPS needs little RAM and runs
|
|
|
|
|
quickly, especially on machines with more than one CPU core. This is primarily
|
|
|
|
|
due to its architecture which automatically parallelises the image workflows.")
|
2018-12-05 12:59:34 -05:00
|
|
|
|
(license license:lgpl2.1+)))
|
2018-12-05 13:03:13 -05:00
|
|
|
|
|
|
|
|
|
(define-public nip2
|
|
|
|
|
(package
|
|
|
|
|
(name "nip2")
|
2019-02-19 09:12:50 -05:00
|
|
|
|
(version "8.7.1")
|
2018-12-05 13:03:13 -05:00
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "https://github.com/libvips/nip2/releases/download/v"
|
|
|
|
|
version "/nip2-" version ".tar.gz" ))
|
|
|
|
|
(sha256
|
2019-02-19 09:12:50 -05:00
|
|
|
|
(base32 "0l7n427njif53npqn02gfjjly8y3khbrkzqxp10j5vp9h97psgiw"))))
|
2018-12-05 13:03:13 -05:00
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:phases
|
|
|
|
|
(modify-phases %standard-phases
|
2019-02-19 09:12:50 -05:00
|
|
|
|
;; test_conv.ws keep failing so disabling for now.
|
2018-12-05 13:03:13 -05:00
|
|
|
|
(add-after 'unpack 'disable-test-conv
|
|
|
|
|
(lambda _
|
|
|
|
|
(delete-file "test/workspaces/test_conv.ws")
|
|
|
|
|
#t))
|
|
|
|
|
(add-before 'check 'set-home
|
|
|
|
|
(lambda _
|
|
|
|
|
(setenv "HOME" "/tmp") #t)))))
|
|
|
|
|
(inputs
|
|
|
|
|
`(("vips" ,vips)
|
|
|
|
|
("glib" ,glib)
|
|
|
|
|
("libtiff" ,libtiff)
|
|
|
|
|
("gtk+-2" ,gtk+-2)
|
|
|
|
|
("libxml2" ,libxml2)
|
|
|
|
|
("libexif" ,libexif)
|
2019-02-19 09:12:50 -05:00
|
|
|
|
("libjpeg" ,libjpeg) ; required by vips.pc
|
2018-12-05 13:03:13 -05:00
|
|
|
|
("librsvg" ,librsvg)
|
|
|
|
|
("fftw" ,fftw)
|
|
|
|
|
("libgsf" ,libgsf)
|
|
|
|
|
("imagemagick" ,imagemagick)
|
|
|
|
|
("orc" ,orc)
|
|
|
|
|
("matio" ,matio)
|
|
|
|
|
("lcms" ,lcms)
|
|
|
|
|
("libwebp" ,libwebp)
|
|
|
|
|
("openexr" ,openexr)
|
|
|
|
|
("poppler" ,poppler)
|
|
|
|
|
("gsl" ,gsl)))
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(("flex" ,flex)
|
|
|
|
|
("bison" ,bison)
|
|
|
|
|
("pkg-config" ,pkg-config)))
|
|
|
|
|
(home-page "https://github.com/libvips/nip2")
|
|
|
|
|
(synopsis "Spreadsheet-like GUI for libvips")
|
|
|
|
|
(description "This package provide a graphical user interface (GUI) for
|
|
|
|
|
the VIPS image processing library. It's a little like a spreadsheet: you
|
|
|
|
|
create a set of formula connecting your objects together, and on a change nip2
|
|
|
|
|
recalculates.")
|
|
|
|
|
(license license:gpl2+)))
|