aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; 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 openkinect)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (guix build-system cmake)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages libusb)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages image-processing))

(define-public libfreenect
  (let ((version "0.6.2"))
    (package
      (name "libfreenect")
      (version version)
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/OpenKinect/libfreenect")
                      (commit (string-append "v" version))))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "02pb8mcl62kzdcgbnv3rw4nl0f08iw8pjiqqhfy3ycpkvyppw97w"))))
      (build-system cmake-build-system)
      (arguments
       '(#:tests? #f                    ; package has no tests
         #:configure-flags
         '("-DBUILD_FAKENECT=ON"
           "-DBUILD_CPP=ON"
           "-DBUILD_EXAMPLES=OFF"       ; available in libfreenect-examples
           "-DBUILD_CV=OFF"             ; available in libfreenect-cv
           "-DBUILD_PYTHON=OFF"         ; available in python-libfreenect
           "-DBUILD_C_SYNC=ON")
         #:phases
         (modify-phases %standard-phases
           (add-after 'install 'install-udev-rules
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (rules-out (string-append out "/lib/udev/rules.d")))
                 (install-file "../source/platform/linux/udev/51-kinect.rules"
                               (string-append rules-out "51-kinect.rules"))
                 #t))))))
      (native-inputs
       (list pkg-config))
      (inputs
       (list libusb))
      (synopsis "Drivers and libraries for the Xbox Kinect device")
      (description "libfreenect is a userspace driver for the Microsoft Kinect.
It supports: RGB and Depth Images, Motors, Accelerometer, LED and Audio.")
      (home-page "https://openkinect.org/")
      (license license:gpl2+))))

;; Library are already compiled in libfreenect, avoid build it again.
(define libfreenect-derived-phases
  '(modify-phases %standard-phases
     (add-after 'unpack 'patch-CMakeLists.txt
       (lambda* (#:key outputs #:allow-other-keys)
         (substitute* "CMakeLists.txt"
           ((".*libusb.*") "")
           (("add_subdirectory \\(src\\)") "")
           ((".*libfreenectConfig.cmake.*") ""))
         #t))))

(define-public libfreenect-examples
  (package
    (inherit libfreenect)
    (name "libfreenect-examples")
    (inputs
     `(("libfreenect" ,libfreenect)
       ("glut" ,freeglut)))
    (arguments
     `(#:tests? #f                      ; package has no tests
       #:configure-flags '("-DBUILD_EXAMPLES=ON"
                           "-DBUILD_FAKENECT=OFF"
                           "-DBUILD_CPP=OFF"
                           "-DBUILD_C_SYNC=OFF"
                           "-DBUILD_CV=OFF")
       #:phases ,libfreenect-derived-phases))
    (synopsis "Examples for libfreenect, the Xbox Kinect device library")))

(define-public libfreenect-opencv
  (package
    (inherit libfreenect)
    (name "libfreenect-opencv")
    (inputs
     (list libfreenect opencv))
    (arguments
     `(#:tests? #f                      ; package has no tests
       #:configure-flags '("-DBUILD_EXAMPLES=OFF"
                           "-DBUILD_FAKENECT=OFF"
                           "-DBUILD_CPP=OFF"
                           "-DBUILD_C_SYNC=OFF"
                           "-DBUILD_CV=ON")
       #:phases ,libfreenect-derived-phases))
    (synopsis "OpenCV wrapper for libfreenect, the Xbox Kinect device
library")))

(define-public python-libfreenect
  (package
    (inherit libfreenect)
    (name "python-libfreenect")
    (native-inputs
     (list python-cython))
    (inputs
     (list libfreenect))
    (propagated-inputs
     (list python python-numpy))
    (arguments
     `(#:tests? #f                      ; package has no tests
       #:configure-flags '("-DBUILD_EXAMPLES=OFF"
                           "-DBUILD_FAKENECT=OFF"
                           "-DBUILD_CPP=OFF"
                           "-DBUILD_C_SYNC=OFF"
                           "-DBUILD_CV=OFF"
                           "-DBUILD_PYTHON3=ON")
       #:phases ,libfreenect-derived-phases))
    (synopsis "Python wrapper for libfreenect, the Xbox Kinect device
library")))
ded0df49984b6c532af071633b968a0f48b'>gnu: texlive-latex-fancybox -> texlive-fancybox....* gnu/packages/tex.scm (texlive-fancybox): New variable. (texlive-latex-fancybox): Deprecate variable. * gnu/packages/docbook.scm (dblatex): Use new name. Nicolas Goaziou 2023-07-18gnu: texlive-latex-colortbl -> texlive-colortbl....* gnu/packages/tex.scm (texlive-colortbl): New variable. (texlive-latex-colortbl): Deprecate variable. (texlive-jadetex): * gnu/packages/docbook.scm (dblatex): * gnu/packages/maths.scm (hypre): Use new name. Nicolas Goaziou 2023-07-18gnu: texlive-latex-changebar -> texlive-changebar....* gnu/packages/tex.scm (texlive-changebar): New variable. (texlive-latex-changebar): Deprecate variable. * gnu/packages/docbook.scm (dblatex): Use new name. Nicolas Goaziou 2023-07-18gnu: texlive-latex-bookmark -> texlive-bookmark....* gnu/packages/tex.scm (texlive-bookmark): New variable. (texlive-latex-bookmark): Deprecate variable. * gnu/packages/docbook.scm (dblatex): Use new name. Nicolas Goaziou 2023-07-18gnu: texlive-latex-footmisc -> texlive-footmisc....* gnu/packages/tex.scm (texlive-footmisc): New variable. (texlive-latex-footmisc): Deprecate variable. (texlive-latex-xkeyval): * gnu/packages/docbook.scm (dblatex): Use new name. Nicolas Goaziou 2023-07-18gnu: texlive-latex-appendix -> texlive-appendix....* gnu/packages/tex.scm (texlive-appendix): New variable. (texlive-latex-appendix): Deprecate variable. * gnu/packages/docbook.scm (dblatex): Use new name. Nicolas Goaziou 2023-07-18gnu: texlive-latex-anysize -> texlive-anysize....* gnu/packages/tex.scm (texlive-anysize): New variable. (texlive-latex-anysize): Deprecate variable. * gnu/packages/docbook.scm (dblatex): Use new name. Nicolas Goaziou 2023-04-21gnu: docbook2x: Use gexps and remove input labels....* gnu/packages/docbook.scm (docbook2x) [arguments]: Use gexps. [inputs]: Remove input labels. Maxim Cournoyer 2023-04-21gnu: docbook-xml-5: Make it the default docbook-xml....* gnu/packages/docbook.scm (docbook-xml-5): Rename to... (docbook-xml): ... this, renaming the previous one to... (docbook-xml-4.5): ... this. (docbook2x) [inputs]: Replace docbook-xml with docbook-xml-4.5. * gnu/packages/freedesktop.scm (wayland) [native-inputs]: Likewise. * gnu/packages/freedesktop.scm (elogind): Likewise. * gnu/packages/databases.scm (postgresql-15): Likewise. * gnu/packages/documentation.scm (asciidoc): Likewise. * gnu/packages/networking.scm (iputils) [native-inputs]: Replace docbook-xml-5 with docbook-xml. Maxim Cournoyer 2023-04-21gnu: docbook-xml-5: Update to 5.1....* gnu/packages/docbook.scm (docbook-xml-5): Update to 5.1. Maxim Cournoyer 2023-04-21gnu: docbook-xml-4.1.2: Add missing catalog.xml....* gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml: New file. * Makefile.am: Register it. * gnu/packages/docbook.scm (docbook-xml-4.1.2)[arguments]: Use prebuilt catalog.xml. [native-inputs]: Add libxml2. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Bruno Victal 2023-04-21gnu: docbook-xml: Use XSLT to patch catalog.xml....(sxml transforms) are unsuited here due to guile-bug #20339. * gnu/packages/aux-files/xml/patch-catalog-xml.xsl: New file. * Makefile.am: Register it. * gnu/packages/docbook.scm (docbook-xml-5)[native-inputs]: Add libxslt. [arguments]: Add phase to patch catalog.xml using XSLT. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Bruno Victal 2023-04-21gnu: docbook-xml: Fix permissions....* gnu/packages/docbook.scm (docbook-xml-5) [arguments]: Remove unnecessary executable permissions. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Bruno Victal 2023-04-21gnu: docbook-xml: Use copy-build-system....* gnu/packages/docbook.scm (docbook-xml-5)[build-system]: Switch to copy-build-system. [source][arguments]: Adapt to copy-build-system. (docbook-xml)[arguments]: Remove. [source]: Switch to url-fetch/zipbomb. (docbook-xml-4.4)[source]: Switch to url-fetch/zipbomb. (docbook-xml-4.3)[source]: Switch to url-fetch/zipbomb. (docbook-xml-4.2)[source]: Switch to url-fetch/zipbomb. (docbook-xml-4.1.2)[arguments]: Remove. [source]: Switch to url-fetch/zipbomb. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Bruno Victal 2023-03-02Merge remote-tracking branch 'savannah/master' into core-updates...Conflicts: gnu/local.mk gnu/packages/autotools.scm gnu/packages/cmake.scm gnu/packages/gnuzilla.scm gnu/packages/haskell.scm gnu/packages/pdf.scm gnu/packages/python-xyz.scm gnu/packages/samba.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/wxwidgets.scm Christopher Baines