From: iyzsong@member.fsf.org (宋文武)
To: Ekaitz Zarraga <ekaitz@elenq.tech>
Cc: "41294@debbugs.gnu.org" <41294@debbugs.gnu.org>
Subject: [bug#41294] [PATCH] gnu: Add libfreenect.
Date: Sun, 17 May 2020 10:15:24 +0800 [thread overview]
Message-ID: <87sgfz1f43.fsf@member.fsf.org> (raw)
In-Reply-To: <BxJab7z2VOD-VeXpKiEpcbdx5pJVou3NuReW9G63QWzmMbMwDRgTFYp2eYlMyntlcAlH3cas1XMml6CsUQIABP80dy1fLQ8lbae0dClfaDI=@elenq.tech> (Ekaitz Zarraga's message of "Sat, 16 May 2020 13:06:23 +0000")
Ekaitz Zarraga <ekaitz@elenq.tech> writes:
> [...]
>
> I made this with the examples (see below), how does it look?
> I used libfreenect as a dependency for examples too, so I needed to patch the CMakeLists.txt to avoid it compile the `src` folder again.
> Is it cool if I do the same thing with OpenCV and Python?
>
> (now we can move it to its own module because it's going to be long :) )
>
> ---
>
> (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)
> (outputs '("out" "opencv" "examples"))
As note in your latest email, this line should be removed, as it's a single
output package now.
> (arguments
> '(#:tests? #f ; Project has not tests
> #:configure-flags '("-DBUILD_EXAMPLES=ON"
Should be "-DBUILD_EXAMPLES=OFF"?
> "-DBUILD_FAKENECT=ON"
> "-DBUILD_CPP=ON"
> "-DBUILD_CV=OFF"
> "-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
> `(("libusb" ,libusb)
> ("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")
> #:phases
> (modify-phases
> %standard-phases
> (add-after
> 'unpack 'remove-sources
Maybe 'configure-examples? This phases doesn't remove sources, but
avoid building them.
> (lambda* (#:key outputs #:allow-other-keys)
How about add a comment here: Reuse "libfreenect" from input, avoid building it again.
> (substitute* "CMakeLists.txt"
> (("add_subdirectory \(src\)") "")
> ((".*libfreenectConfig.cmake.*") "")))))))
> (synopsis "Examples for libfreenect, the Xbox Kinect device library")))
Also check the outputs of libfreenect and libfreenect-examples, they
shouldn't have same files (maybe by guix install them).
Otherwise, look goods to me.
next prev parent reply other threads:[~2020-05-17 2:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 21:47 [bug#41294] [PATCH] gnu: Add libfreenect Ekaitz Zarraga
2020-05-15 23:09 ` [bug#41294] [PATCH] gnu: libfreenect: Correct native-inputs vs inputs Ekaitz Zarraga
2020-05-16 3:48 ` [bug#41294] [PATCH] gnu: Add libfreenect 宋文武
2020-05-16 10:18 ` Ekaitz Zarraga
2020-05-16 13:06 ` Ekaitz Zarraga
2020-05-16 13:28 ` Ekaitz Zarraga
2020-05-17 2:15 ` 宋文武 [this message]
2020-05-17 9:37 ` Ekaitz Zarraga
2020-05-17 12:15 ` Ekaitz Zarraga
2020-05-19 13:26 ` 宋文武
2020-05-19 13:42 ` Ekaitz Zarraga
2020-05-19 13:52 ` Ekaitz Zarraga
2020-05-20 13:33 ` 宋文武
2020-05-20 16:37 ` Ekaitz Zarraga
2020-05-21 11:38 ` bug#41294: " 宋文武
2020-05-21 11:40 ` [bug#41294] " Ekaitz Zarraga
2020-05-17 1:56 ` 宋文武
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sgfz1f43.fsf@member.fsf.org \
--to=iyzsong@member.fsf.org \
--cc=41294@debbugs.gnu.org \
--cc=ekaitz@elenq.tech \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).