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 4GC7F2+ewF5AAgAA0tVLHw (envelope-from ) for ; Sun, 17 May 2020 02:16:15 +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 IMZ0E2+ewF7eCAAAbx9fmQ (envelope-from ) for ; Sun, 17 May 2020 02:16:15 +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 A0ABA940BB1 for ; Sun, 17 May 2020 02:16:14 +0000 (UTC) Received: from localhost ([::1]:60852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ja8qa-000223-Df for larch@yhetil.org; Sat, 16 May 2020 22:16:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ja8qR-00021w-0H for guix-patches@gnu.org; Sat, 16 May 2020 22:16:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58700) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ja8qQ-0008LH-NA for guix-patches@gnu.org; Sat, 16 May 2020 22:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ja8qQ-00057c-I3 for guix-patches@gnu.org; Sat, 16 May 2020 22:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41294] [PATCH] gnu: Add libfreenect. Resent-From: iyzsong@member.fsf.org (=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 17 May 2020 02:16:02 +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: Ekaitz Zarraga Cc: "41294@debbugs.gnu.org" <41294@debbugs.gnu.org> Received: via spool by 41294-submit@debbugs.gnu.org id=B41294.158968174919661 (code B ref 41294); Sun, 17 May 2020 02:16:02 +0000 Received: (at 41294) by debbugs.gnu.org; 17 May 2020 02:15:49 +0000 Received: from localhost ([127.0.0.1]:42013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ja8qD-000572-2n for submit@debbugs.gnu.org; Sat, 16 May 2020 22:15:49 -0400 Received: from rezeros.cc ([45.76.207.221]:49316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ja8qA-00056k-Kg for 41294@debbugs.gnu.org; Sat, 16 May 2020 22:15:47 -0400 Received: from localhost ( [117.173.227.26]) by rezeros.cc (OpenSMTPD) with ESMTPSA id f45bf17e (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Sun, 17 May 2020 02:15:39 +0000 (UTC) Received: from gift (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id eb2d1aad; Sun, 17 May 2020 02:15:24 +0000 (UTC) From: iyzsong@member.fsf.org (=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?=) References: <5kf9uJF2SDo9zwlTUoFI13o7P7q68o-AuSp72MvOp5PUaF2SlAPxzQJvFws5aaTOB5EHY4T3-En0Mhba7hADMIeJkgCeWUOY_Ciy0fv24Ck=@elenq.tech> <87k11c5ymm.fsf@member.fsf.org> Date: Sun, 17 May 2020 10:15:24 +0800 In-Reply-To: (Ekaitz Zarraga's message of "Sat, 16 May 2020 13:06:23 +0000") Message-ID: <87sgfz1f43.fsf@member.fsf.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=fsf.org (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: -0.91 X-TUID: zU8tzJZt65GF Ekaitz Zarraga 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.