From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yIzTBD8GwV7jcgAA0tVLHw (envelope-from ) for ; Sun, 17 May 2020 09:39:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id EPGFAD8GwV5uOgAAbx9fmQ (envelope-from ) for ; Sun, 17 May 2020 09:39:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5BB549402D6 for ; Sun, 17 May 2020 09:39:10 +0000 (UTC) Received: from localhost ([::1]:37712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFlF-0007FE-AB for larch@yhetil.org; Sun, 17 May 2020 05:39:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFl8-0007Bq-6L for guix-patches@gnu.org; Sun, 17 May 2020 05:39:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58990) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFl7-0004XA-Sf for guix-patches@gnu.org; Sun, 17 May 2020 05:39:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jaFl7-0008EB-OI for guix-patches@gnu.org; Sun, 17 May 2020 05:39: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: Sun, 17 May 2020 09:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41294 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "iyzsong@member.fsf.org" Cc: "41294\\@debbugs.gnu.org" <41294@debbugs.gnu.org> Received: via spool by 41294-submit@debbugs.gnu.org id=B41294.158970828731560 (code B ref 41294); Sun, 17 May 2020 09:39:01 +0000 Received: (at 41294) by debbugs.gnu.org; 17 May 2020 09:38:07 +0000 Received: from localhost ([127.0.0.1]:42303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaFkF-0008Cy-Cz for submit@debbugs.gnu.org; Sun, 17 May 2020 05:38:07 -0400 Received: from mail-40134.protonmail.ch ([185.70.40.134]:31699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaFkD-0008CT-Rr for 41294@debbugs.gnu.org; Sun, 17 May 2020 05:38:06 -0400 Date: Sun, 17 May 2020 09:37:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=protonmail; t=1589708272; bh=yLieefs5KYk0Otmgrq2lJ/NmHWMgrC4xu9Zs7GQ3vSk=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=DZbKaQ/FOjV7TY5k1rTom8jbpUhHyEMTwXMjCeq1xbMoXMb1oUf8hXJH2RjW3c8ya MGybc988QDa7JBv50E+pa9LEntNqVFjA/1H9gPhXmN/RiRtvTOGwTtnoGGzEFed+Td I41+zzGhBqai/eJMMuJw/IvaTk77pDDFhoZ6KAJk= From: Ekaitz Zarraga Message-ID: In-Reply-To: <87sgfz1f43.fsf@member.fsf.org> References: <5kf9uJF2SDo9zwlTUoFI13o7P7q68o-AuSp72MvOp5PUaF2SlAPxzQJvFws5aaTOB5EHY4T3-En0Mhba7hADMIeJkgCeWUOY_Ciy0fv24Ck=@elenq.tech> <87k11c5ymm.fsf@member.fsf.org> <87sgfz1f43.fsf@member.fsf.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=elenq.tech header.s=protonmail header.b=DZbKaQ/F; dmarc=fail reason="SPF not aligned (relaxed)" header.from=elenq.tech (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 1.59 X-TUID: D693Yt3kupnj =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Sunday, May 17, 2020 4:15 AM, wrote: > 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 pat= ch 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 sing= le > output package now. > > > (arguments > > '(#:tests? #f ; Project has not tests > > #:configure-flags '("-DBUILD_EXAMPLES=3DON" > > > > Should be "-DBUILD_EXAMPLES=3DOFF"? > > > "-DBUILD_FAKENECT=3DON" > > "-DBUILD_CPP=3DON" > > "-DBUILD_CV=3DOFF" > > "-DBUILD_C_SYNC=3DON") > > #: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.rule= s")) > > #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=3DON" > > "-DBUILD_FAKENECT=3DOFF" > > "-DBUILD_CPP=3DOFF" > > "-DBUILD_C_SYNC=3DOFF") > > #: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 build= ing 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. Hi! Thanks. I was worried about if this is a common practice. I already prepared something. I'll send the patch soon. Thanks for your exp= lanations, they are very helpful. Best, Ekaitz