From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uKsaEzrSRWFaYQAAgWs5BA (envelope-from ) for ; Sat, 18 Sep 2021 13:49:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 0PH8DjrSRWE8BQAA1q6Kng (envelope-from ) for ; Sat, 18 Sep 2021 11:49:14 +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 9CA04620E for ; Sat, 18 Sep 2021 13:49:13 +0200 (CEST) Received: from localhost ([::1]:33990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRYqG-0000CG-Mq for larch@yhetil.org; Sat, 18 Sep 2021 07:49:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRYq6-0000Bp-AW for guix-patches@gnu.org; Sat, 18 Sep 2021 07:49:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRYq6-00011O-0N for guix-patches@gnu.org; Sat, 18 Sep 2021 07:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mRYq5-00054Q-SM for guix-patches@gnu.org; Sat, 18 Sep 2021 07:49:01 -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: Sat, 18 Sep 2021 11:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49970 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: 49970@debbugs.gnu.org Received: via spool by 49970-submit@debbugs.gnu.org id=B49970.163196568719431 (code B ref 49970); Sat, 18 Sep 2021 11:49:01 +0000 Received: (at 49970) by debbugs.gnu.org; 18 Sep 2021 11:48:07 +0000 Received: from localhost ([127.0.0.1]:33732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRYpC-00053K-M6 for submit@debbugs.gnu.org; Sat, 18 Sep 2021 07:48:07 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]:11925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRYpA-00052n-EY for 49970@debbugs.gnu.org; Sat, 18 Sep 2021 07:48:05 -0400 Date: Sat, 18 Sep 2021 11:47:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1631965676; bh=XwPcsVyq1lqiHt2TUR6ivT+MVm7YgLoVxyjNJ5doh5g=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=s14Rs7LD65ewbrmaE2jdYCbv9xDRcUaYFBmqkKTG022ctIcIL/Exit7cRvbEXO0ou qb37NhlOa1IGH7MKmBiFzj9Xx4pjxjqnerQ/vmTWWtREkfIh3Fcrke+PdJL0v+b3a1 1icHs0Wl8j+m6l+i/I16mfx8D9mzpb5m3mHRac5g= Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches From: phodina via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631965754; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=XwPcsVyq1lqiHt2TUR6ivT+MVm7YgLoVxyjNJ5doh5g=; b=tfxNsOCPVAV0q/AKptpPrRYWq3fe+C5O76PUhysW5wGMBod+EErkB9oIEHJJZXKKo7qnzW 69x555YMjvkCHQ/LXxwqUPSrCMvdMT0CA9qCCbxxWGHpDvAZYN2gOsSu06x/0iIO42drYG 9ROJCpi2tO/1S+hp1tGi9JtSWjtLxIpBh6LyAJMGUwqnJDd2YJH5HsqGawPdx8YrtWpllt mXvh9s9AMmehXaeSWhPOWvjHv+FnP17wF0qGqR/5kH139tXli5CnlV3xAglhX83d+zEmhN nYbaoW5iZb3M4ATeyIBnCljEXuDQXT+cvhma1ixHkFAVK/eeeiFg/VeSTtKfww== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631965754; a=rsa-sha256; cv=none; b=UOYZPWSUMV9SPkLq6kohlDWU7C8X1Mv3MbgAEcA0vCjCnQTPMZjp/LlnKcmIONV4RmHH4g WLF7PPE3M+3kRnmnOyGmDQvUcMX+F5eMNMF5nj1RzGysw6hW7Rv1i41MI0zply1a6FxEnV 4DtR7Vk5Ejk9o9vTJUqL7Z27oISR32crNFCxt0RjEc3p1PyfdNm3cG3ZBPxTf0AfmSUtn2 XvcpKy/MMOySd7STTqNPEA4UpTe3DFaw/sT1pWvhzh+zGsWDxBojqKPkUVzl2+GkOq3JAT NJXTRmGeCe0sxpLhil86kX9bUYcofzg++aCfGU3LmPIRMWozAHz0Eme6MezBdA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=s14Rs7LD; dmarc=pass (policy=none) header.from=gnu.org; 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-Migadu-Spam-Score: -1.39 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=s14Rs7LD; dmarc=pass (policy=none) header.from=gnu.org; 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-Migadu-Queue-Id: 9CA04620E X-Spam-Score: -1.39 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3c6Uxgrgv2bi Hi Liliana, thanks for the comment! My appology for the licence. --8<---------------cut here---------------start------------->8--- * gnu/packages/video.scm (librealsense): New variable. * gnu/packages/patches/librealsense-remove-network-connectivity.patch: New = file. diff --git a/gnu/packages/patches/librealsense-remove-network-connectivity.= patch b/gnu/packages/patches/librealsense-remove-network-connectivity.patch new file mode 100644 index 0000000000..73926587ff --- /dev/null +++ b/gnu/packages/patches/librealsense-remove-network-connectivity.patch @@ -0,0 +1,68 @@ +From cfc87289d7636f439e2b91d88e35430949b29c0f Mon Sep 17 00:00:00 2001 +From: Petr Hodina +Date: Sat, 31 Jul 2021 05:58:40 +0200 +Subject: [PATCH] Remove network connectivity + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0c15d9510..a4d891444 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.1.0) + project(librealsense2 LANGUAGES CXX C) + + include(CMake/lrs_options.cmake) +-include(CMake/connectivity_check.cmake) + + #Deprecation message, should be removed in future releases + if(${FORCE_LIBUVC} OR ${FORCE_WINUSB_UVC} OR ${ANDROID_USB_HOST_UVC}) +@@ -12,14 +11,12 @@ if(${FORCE_LIBUVC} OR ${FORCE_WINUSB_UVC} OR ${ANDROID= _USB_HOST_UVC}) + endif() + + # Checking Internet connection, as TM2 needs to download the FW from amaz= on cloud +-if(BUILD_WITH_TM2 AND NOT INTERNET_CONNECTION) +- message(WARNING "No internet connection, disabling BUILD_WITH_TM2") ++if(BUILD_WITH_TM2) + set(BUILD_WITH_TM2 OFF) + endif() + + # Checking Internet connection, as DEPTH CAM needs to download the FW fro= m amazon cloud +-if(IMPORT_DEPTH_CAM_FW AND NOT INTERNET_CONNECTION) +- message(WARNING "No internet connection, disabling IMPORT_DEPTH_CAM_F= W") ++if(IMPORT_DEPTH_CAM_FW) + set(IMPORT_DEPTH_CAM_FW OFF) + endif() + +diff --git a/common/fw/CMakeLists.txt b/common/fw/CMakeLists.txt +index 32b1dd29a..9961e4d1d 100644 +--- a/common/fw/CMakeLists.txt ++++ b/common/fw/CMakeLists.txt +@@ -6,8 +6,6 @@ project(fw) + + file(READ "firmware-version.h" ver) + +-message(STATUS "Fetching recommended firmwares:") +- + set(REALSENSE_FIRMWARE_URL "https://librealsense.intel.com" CACHE STRING + "URL to download firmware binaries from") + +@@ -51,16 +49,6 @@ set_target_properties (${PROJECT_NAME} PROPERTIES FOLDE= R Resources) + + function(target_binary url version sha1 symbol ext) + set(binary "${CMAKE_CURRENT_BINARY_DIR}/${symbol}-${version}${ext}") +- message(STATUS "${url}/${symbol}-${version}${ext}") +- file(DOWNLOAD "${url}/${symbol}-${version}${ext}" "${binary}" +- EXPECTED_HASH SHA1=3D${sha1} +- STATUS status) +- list(GET status 0 error_code) +- if (NOT ${error_code} EQUAL 0) +- message(FATAL_ERROR "Download firmwnare (${status}) - ${url}") +- else() +- message(STATUS "Download firmware ${status} for ${symbol}-${version}$= {ext}") +- endif() + string(TOUPPER ${symbol} SYMBOL) + string(REPLACE "." "," version_commas ${version}) + string(REPLACE "\\" "\\\\" binary_escaped "${binary}") +-- +2.32.0 + diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 1b9179c6a8..ee783338f4 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -53,6 +53,7 @@ ;;; Copyright =C2=A9 2021 Maxim Cournoyer ;;; Copyright =C2=A9 2020 Hartmut Goebel ;;; Copyright =C2=A9 2021 Raghav Gururajan +;;; Copyright =C2=A9 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,54 @@ other software.") ;; Library. license:lgpl3+)))) +(define-public librealsense + (package + (name "librealsense") + (version "2.47.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.patc= h")) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + (sha256 + (base32 + "1jshhcnvbaa3xm5jr1s5m6z62wn1cspb7wkfdc1w88kp9j02ss8w")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ; tests require camera hardware + #:configure-flags (list "-DBUILD_EXAMPLES=3DON" + "-DBUILD_GRAPHICAL_EXAMPLES=3DON" + "-DINTERNET_CONNECTION=3DOFF" + "-DCHECK_FOR_UPDATES=3DOFF") + #:phases + (modify-phases %standard-phases + ;; more convenient than manually invoking setup_udev_rules.sh + ;; and substituting the path in the script + (add-after 'unpack 'copy-udev-rules + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (string-append (assoc-ref outputs "out") + "/lib/udev/rules.d"))) + (mkdir-p (string-append out)) + (copy-file "config/99-realsense-libusb.rules" + (string-append out + "/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:asl2.0))) + (define-public tslib (package (name "tslib") -- 2.32.0