From patchwork Fri May 15 21:47:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ekaitz Zarraga X-Patchwork-Id: 22098 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9B2DD27BBE3; Fri, 15 May 2020 22:49:40 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 11B0127BBE1 for ; Fri, 15 May 2020 22:49:40 +0100 (BST) Received: from localhost ([::1]:56808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZiD5-00087c-Er for patchwork@mira.cbaines.net; Fri, 15 May 2020 17:49:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZiBW-0005XO-CB for guix-patches@gnu.org; Fri, 15 May 2020 17:48:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZiBV-0006Jr-Sf for guix-patches@gnu.org; Fri, 15 May 2020 17:48:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZiBV-0002C5-Pw for guix-patches@gnu.org; Fri, 15 May 2020 17:48:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41294] [PATCH] gnu: Add libfreenect. Resent-From: Ekaitz Zarraga Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 15 May 2020 21:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41294 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41294@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.15895792558400 (code B ref -1); Fri, 15 May 2020 21:48:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 May 2020 21:47:35 +0000 Received: from localhost ([127.0.0.1]:39019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZiB1-0002BM-4G for submit@debbugs.gnu.org; Fri, 15 May 2020 17:47:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:49336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZiAz-0002BB-GW for submit@debbugs.gnu.org; Fri, 15 May 2020 17:47:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZiAz-0004iQ-5r for guix-patches@gnu.org; Fri, 15 May 2020 17:47:29 -0400 Received: from mail1.protonmail.ch ([185.70.40.18]:25012) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZiAx-0006Gi-0s for guix-patches@gnu.org; Fri, 15 May 2020 17:47:28 -0400 Date: Fri, 15 May 2020 21:47:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=protonmail; t=1589579242; bh=vWAFFunfqhp+x6uqqsEq0Totf/D9qD7phXJs3BN7I2c=; h=Date:To:From:Reply-To:Subject:From; b=GITyvX+/GbyH7i2moq7Cb4ZXegoFy1/KVKqb+ibmvmxTcVxbvofK/vjQL9X0OceUR aegXtIX8AvjzMTJPgol1ThjEJgA7GZe+wrWwdJw4tzRHejntjJLheMGv5PPd2oM30K HlKxkR2fiKG7By2iKMByqjPXeMXzXWHAGj8yukjA= From: Ekaitz Zarraga Message-ID: <5kf9uJF2SDo9zwlTUoFI13o7P7q68o-AuSp72MvOp5PUaF2SlAPxzQJvFws5aaTOB5EHY4T3-En0Mhba7hADMIeJkgCeWUOY_Ciy0fv24Ck=@elenq.tech> MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.18; envelope-from=ekaitz@elenq.tech; helo=mail1.protonmail.ch X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/15 17:47:24 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Ekaitz Zarraga Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi, Adding libfreenect as discussed here: https://issues.guix.gnu.org/40492 I have some doubts with this package: - It has some extra flags that can be set in the configure step to build some python bindings. I didn't set them because they also require a python interpreter. How is the best way to handle that? Make another package with the flags set? Activate them by default? Leave them as I did? - The package is 300 megs checking `guix size` that's because it has some testing binaries that have extra dependencies. If only the library is compiled it doesn't depend on GLUT and that reduces the size a lot. I tried to separate the package's outputs but I don't know how to do it correctly (I checked the docs but it doesn't go in detail). I'd like to do it but I need some help. - I'm not sure if the file where I added it is a good choice. Best, Ekaitz --- From aa74e0b4872f6a2748ed919ebe3c265472d04664 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Fri, 15 May 2020 23:22:04 +0200 Subject: [PATCH] gnu: Add libfreenect. * gnu/packages/libusb (libfreenect): New variable. --- gnu/packages/libusb.scm | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) -- 2.26.1 diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index 3842f3fead..a27373c15a 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2018 Vagrant Cascadian ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020 Christopher Howard +;;; Copyright © 2020 Ekaitz Zarraga ;;; ;;; This file is part of GNU Guix. ;;; @@ -48,7 +49,8 @@ #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages tls) - #:use-module (gnu packages xiph)) + #:use-module (gnu packages xiph) + #:use-module (gnu packages gl)) (define-public libusb (package @@ -679,3 +681,38 @@ HID-Class devices.") (define-public python2-hidapi (package-with-python2 python-hidapi)) + +(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 + #: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 + `(("libusb" ,libusb) + ("pkg-config" ,pkg-config))) + (inputs + `(("glut" ,freeglut))) + (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+))))