From patchwork Mon Aug 9 20:54:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: phodina X-Patchwork-Id: 31969 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 8945427BC82; Mon, 9 Aug 2021 21:55:27 +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, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, 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 ESMTPS id 10D7327BC78 for ; Mon, 9 Aug 2021 21:55:27 +0100 (BST) Received: from localhost ([::1]:56210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDCIw-000144-3R for patchwork@mira.cbaines.net; Mon, 09 Aug 2021 16:55:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDCIY-00013O-ND for guix-patches@gnu.org; Mon, 09 Aug 2021 16:55:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46349) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDCIY-0007GS-Ey for guix-patches@gnu.org; Mon, 09 Aug 2021 16:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDCIY-00070u-5Z for guix-patches@gnu.org; Mon, 09 Aug 2021 16:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49970] [PATCH] gnu: Add librealsense. Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Aug 2021 20:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49970 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49970@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.162854246226894 (code B ref -1); Mon, 09 Aug 2021 20:55:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Aug 2021 20:54:22 +0000 Received: from localhost ([127.0.0.1]:57895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDCHp-0006zd-QV for submit@debbugs.gnu.org; Mon, 09 Aug 2021 16:54:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:43684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDCHj-0006zO-VS for submit@debbugs.gnu.org; Mon, 09 Aug 2021 16:54:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDCHj-00010i-Bk for guix-patches@gnu.org; Mon, 09 Aug 2021 16:54:11 -0400 Received: from mail-40134.protonmail.ch ([185.70.40.134]:34019) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDCHg-0006af-RI for guix-patches@gnu.org; Mon, 09 Aug 2021 16:54:10 -0400 Date: Mon, 09 Aug 2021 20:54:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1628542446; bh=4kjxu7GFajDKmrA/dfNvpr5uFSG4QVG7VU2Vr0EWFyY=; h=Date:To:From:Reply-To:Subject:From; b=ed8EQVXQWSSYkLB3RomWhRBQ7d1/NraP9p0MWFrArLr8HUjLrOubUlUCQbNMk2YXc b675uj2ufVPwleYcKZz3vUUD+MYuo0tMjVSVo4XiimRWzT3kvOXz7Kp9o13pt/1lab uE9xq2y3QWU3fFv/84ql01qOW3+bfZX2D+Nf2iJA= Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.134; envelope-from=phodina@protonmail.com; helo=mail-40134.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches X-Patchwork-Original-From: phodina via Guix-patches via From: phodina X-getmail-retrieved-from-mailbox: Patches * gnu/packages/video.scm (librealsense): New variable. --- 2.32.0 diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 399327741f..1d4a8ad3df 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -53,6 +53,7 @@ ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2020 Hartmut Goebel ;;; Copyright © 2021 Raghav Gururajan +;;; Copyright © 2021 Petr Hodina ;;; ;;; This file is part of GNU Guix. ;;; @@ -145,6 +146,7 @@ #:use-module (gnu packages mp3) #:use-module (gnu packages ncurses) #:use-module (gnu packages networking) + #:use-module (gnu packages ninja) #:use-module (gnu packages ocr) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) @@ -577,6 +579,53 @@ other software.") ;; Library. license:lgpl3+)))) +(define-public librealsense + (package + (name "librealsense") + (version "2.45.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/IntelRealSense/librealsense") + (commit (string-append "v" version)))) + (patches + (search-patches "librealsense-remove-network-connectivity.patch")) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + (sha256 + (base32 + "0aqf48zl7825v7x8c3x5w4d17m4qq377f1mn6xyqzf9b0dnk4i1j")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f + #:configure-flags (list "-DBUILD_EXAMPLES=ON" + "-DBUILD_GRAPHICAL_EXAMPLES=ON" + "-DINTERNET_CONNECTION=OFF" + "-DCHECK_FOR_UPDATES=OFF") + #:phases + (modify-phases %standard-phases + ;; more convenient than manually invoking setup_udev_rules.sh + ;; and substituting the path in the script + (add-after 'install 'copy-udev-rules + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (mkdir-p (string-append out "/etc/udev/rules.d")) + (copy-file "config/99-realsense-libusb.rules" + (string-append out + "/etc/udev/rules.d/99-realsense-libusb.rules")))))))) + (native-inputs `(("pkg-config" ,pkg-config) + ("ninja" ,ninja))) + (inputs `(("glfw" ,glfw) + ("gtk+" ,gtk+) + ("libusb" ,libusb) + ("glu" ,glu))) + (synopsis "Intel RealSense SDK") + (description "Intel RealSense SDK 2.0 is a cross-platform library for +Intel RealSense depth cameras (D400 & L500 series and the SR300) and the +T265 tracking camera.") + (home-page "https://github.com/IntelRealSense/librealsense") + (license license:gpl3))) + (define-public tslib (package (name "tslib")