unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 5144b58fcf5f94eff09a21c02ac282e15444cdc5 5364 bytes (raw)
name: gnu/packages/openkinect.scm 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
 
(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.1"))
    (package
      (name "libfreenect")
      (version version)
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/OpenKinect/libfreenect")
                      (commit (string-append "v" version))))
                (sha256
                 (base32 "0was1va167rqshmpn382h36yyprpfi9cwillb6ylppmnfdrfrhrr"))))
      (build-system cmake-build-system)
      (arguments
       '(#:tests? #f ; Project has not 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 libfreenect-python
           "-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
       `(("pkg-config" ,pkg-config)))
      (inputs
       `(("libusb" ,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+))))



(define-public libfreenect-examples
  (package
    (inherit libfreenect)
    (name "libfreenect-examples")
    (inputs
     `(("libfreenect" ,libfreenect)
       ("glut" ,freeglut)))
    (arguments
     `(#:tests? #f ; Project has not tests
       #:configure-flags '("-DBUILD_EXAMPLES=ON"
                           "-DBUILD_FAKENECT=OFF"
                           "-DBUILD_CPP=OFF"
                           "-DBUILD_C_SYNC=OFF"
                           "-DBUILD_CV=OFF")
       #:phases
       (modify-phases %standard-phases
         ;; Sources are already compiled in libfreenect input
         (add-after 'unpack 'disable-sources
                    (lambda* (#:key outputs #:allow-other-keys)
                             (substitute* "CMakeLists.txt"
                               ((".*libusb.*") "")
                               (("add_subdirectory \\(src\\)") "")
                               ((".*libfreenectConfig.cmake.*") "")))
                    ))))
    (synopsis "Examples for libfreenect, the Xbox Kinect device library")))

(define-public libfreenect-cv
  (package
    (inherit libfreenect)
    (name "libfreenect-cv")
    (inputs
     `(("libfreenect" ,libfreenect)
       ("opencv" ,opencv)))
    (arguments
     '(#:tests? #f ; Project has not tests
       #:configure-flags '("-DBUILD_EXAMPLES=OFF"
                           "-DBUILD_FAKENECT=OFF"
                           "-DBUILD_CPP=OFF"
                           "-DBUILD_C_SYNC=OFF"
                           "-DBUILD_CV=ON")
       #:phases
       (modify-phases %standard-phases
         ;; Sources are already compiled in libfreenect input
         (add-after 'unpack 'disable-sources
           (lambda* (#:key outputs #:allow-other-keys)
             (substitute* "CMakeLists.txt"
               ((".*libusb.*") "")
               (("add_subdirectory \\(src\\)") "")
               ((".*libfreenectConfig.cmake.*") "")))))))
    (synopsis "OpenCV wrapper for libfreenect, the Xbox Kinect device
library")))

(define-public libfreenect-python
  (package
    (inherit libfreenect)
    (name "libfreenect-python")
    (native-inputs
     `(("python-cython" ,python-cython)))
    (inputs
     `(("libfreenect" ,libfreenect)))
    (propagated-inputs
     `(("python" ,python)
       ("python-numpy" ,python-numpy)))
    (arguments
     '(#:tests? #f ; Project has not tests
       #:configure-flags '("-DBUILD_EXAMPLES=OFF"
                           "-DBUILD_FAKENECT=OFF"
                           "-DBUILD_CPP=OFF"
                           "-DBUILD_C_SYNC=OFF"
                           "-DBUILD_CV=OFF"
                           "-DBUILD_PYTHON3=ON")
       #:phases
       (modify-phases %standard-phases
         ;; Sources are already compiled in libfreenect input
         (add-after 'unpack 'disable-sources
           (lambda* (#:key outputs #:allow-other-keys)
             (substitute* "CMakeLists.txt"
               ((".*libusb.*") "")
               (("add_subdirectory \\(src\\)") "")
               ((".*libfreenectConfig.cmake.*") "")))))))
    (synopsis "Python wrapper for libfreenect, the Xbox Kinect device

debug log:

solving 1aebb34384 ...
found 1aebb34384 in https://yhetil.org/guix-patches/zgYthp30GnrnAddRXlGZx4viwqwoXH-IAl4YyIpaZPVi9RGq33qbQ6Sg1r3Kg4QnVYCmwY0xpoxJVyv8xhARPY-cHsbdsoA1gfKKr9k-VL0=@elenq.tech/

applying [1/1] https://yhetil.org/guix-patches/zgYthp30GnrnAddRXlGZx4viwqwoXH-IAl4YyIpaZPVi9RGq33qbQ6Sg1r3Kg4QnVYCmwY0xpoxJVyv8xhARPY-cHsbdsoA1gfKKr9k-VL0=@elenq.tech/
diff --git a/gnu/packages/openkinect.scm b/gnu/packages/openkinect.scm
new file mode 100644
index 0000000000..1aebb34384

Checking patch gnu/packages/openkinect.scm...
Applied patch gnu/packages/openkinect.scm cleanly.

index at:
100644 5144b58fcf5f94eff09a21c02ac282e15444cdc5	gnu/packages/openkinect.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).