4 Commits

Author SHA256 Message Date
ca1bf76a55 Accepting request 1299323 from hardware
- Update to 2.56.5
  * see release notes here:
    https://github.com/IntelRealSense/librealsense/releases/tag/v2.56.5

- Build all installed libraries as shared libraries to fix a problem
  when building the monado package
- Add patches:
  * 0001-cmake-add-support-to-build-shared-libraries.patch
  * 0002-cmake-Use-the-same-version-for-all-libraries-that-ca.patch
- Rebased patches:
  * rsutils.patch
- Removed obsolete patches:
  * realsense_file.patch

- .spec cleanup
  * no need for -DBUILD_SHARED_LIBS=ON, %cmake already does this
- .changes cleanup
  * reference new patches
  * remove spaces at the ends of lines
- fix shared library patches
  * set SOVERSION properly
  * what are the patches good for after all? The static libs were
    included in .so already, right?
- Update to 2.56.3
  * see release notes here:
    https://github.com/IntelRealSense/librealsense/releases/tag/v2.56.3

- Update to 2.56.2
  * see release notes here:
    https://github.com/IntelRealSense/librealsense/releases/tag/v2.56.2

OBS-URL: https://build.opensuse.org/request/show/1299323
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/librealsense?expand=0&rev=15
2025-08-15 19:51:36 +00:00
256142ca41 Accepting request 1219492 from hardware
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1219492
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/librealsense?expand=0&rev=14
2024-10-30 16:40:01 +00:00
67cd6635a9 fix
OBS-URL: https://build.opensuse.org/package/show/hardware/librealsense?expand=0&rev=48
2024-09-30 07:26:09 +00:00
c6bc41469e up to 2.56.1
OBS-URL: https://build.opensuse.org/package/show/hardware/librealsense?expand=0&rev=47
2024-09-30 06:45:06 +00:00
13 changed files with 290 additions and 54 deletions

View File

@@ -0,0 +1,69 @@
From cdd508256dcb0a65b6031ee11f1f91688d19cb64 Mon Sep 17 00:00:00 2001
From: Ralf Habacker <ralf.habacker@freenet.de>
Date: Wed, 9 Jul 2025 14:46:16 +0200
Subject: [PATCH 1/6] cmake: add support to build shared libraries
Shared libraries can be build by adding -DCMAKE_SHARED_LIBS=ON to the
cmake configure line.
---
CMakeLists.txt | 2 ++
common/fw/CMakeLists.txt | 2 +-
third-party/realsense-file/CMakeLists.txt | 2 +-
third-party/rsutils/CMakeLists.txt | 2 +-
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ae063e69d84b..5830699faeae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.8)
set( LRS_TARGET realsense2 )
project( ${LRS_TARGET} LANGUAGES CXX C )
+option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)
+
# Allow librealsense2 and all of the nested project to include the main repo folder
set(REPO_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${REPO_ROOT})
diff --git a/common/fw/CMakeLists.txt b/common/fw/CMakeLists.txt
index 735f4d6b34c6..7b83d5d5335f 100644
--- a/common/fw/CMakeLists.txt
+++ b/common/fw/CMakeLists.txt
@@ -17,7 +17,7 @@ set(D4XX_FW_VERSION ${CMAKE_MATCH_1})
set(D4XX_FW_SHA1 e7a67224fd0bd823df03dc7f1135a59db93746fd)
set(D4XX_FW_URL "${REALSENSE_FIRMWARE_URL}/Releases/RS4xx/FW")
-add_library(${PROJECT_NAME} STATIC empty.c)
+add_library(${PROJECT_NAME} empty.c)
# disable link time optimization for fw by adding -fno-lto to disable -flto flag
# jammy debian has build errors without it
diff --git a/third-party/realsense-file/CMakeLists.txt b/third-party/realsense-file/CMakeLists.txt
index 9ba89a0d980a..e33f965721fd 100644
--- a/third-party/realsense-file/CMakeLists.txt
+++ b/third-party/realsense-file/CMakeLists.txt
@@ -24,7 +24,7 @@ endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
-add_library(${PROJECT_NAME} STATIC
+add_library(${PROJECT_NAME}
${AllSources}
${HEADER_FILES_ROSBAG}
${SOURCE_FILES_ROSBAG}
diff --git a/third-party/rsutils/CMakeLists.txt b/third-party/rsutils/CMakeLists.txt
index b0fc310497aa..bb27360b37ec 100644
--- a/third-party/rsutils/CMakeLists.txt
+++ b/third-party/rsutils/CMakeLists.txt
@@ -3,7 +3,7 @@
cmake_minimum_required(VERSION 3.8.0) # source_group(TREE)
project( rsutils )
-add_library( ${PROJECT_NAME} STATIC "" )
+add_library( ${PROJECT_NAME} "" )
# We cannot directly interface with nlohmann_json (doesn't work on bionic)
#target_link_libraries( ${PROJECT_NAME} PUBLIC nlohmann_json )
target_compile_features( ${PROJECT_NAME} PUBLIC cxx_std_14 )
--
2.50.1

View File

@@ -0,0 +1,22 @@
From: Jiri Slaby <jslaby@suse.cz>
Date: Mon, 30 Sep 2024 08:42:26 +0200
Subject: third-party: use nlohmann_json from system
References: nlohmann_json-from-system
Patch-mainline: never
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
third-party/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/third-party/CMakeLists.txt
+++ b/third-party/CMakeLists.txt
@@ -5,7 +5,7 @@ add_subdirectory( "${CMAKE_CURRENT_LIST_
pop_security_flags() # remove security flags for third party, as we cannot guarantee their security enforcment
-include(CMake/external_json.cmake)
+find_package(nlohmann_json REQUIRED)
# Add additional include directories to allow file to include rosbag headers
include(${_rel_path}/realsense-file/config.cmake)

View File

@@ -0,0 +1,39 @@
From 682b4f8fbd96ea3e4b11e9d365faecfb1b87d6f6 Mon Sep 17 00:00:00 2001
From: Ralf Habacker <ralf.habacker@freenet.de>
Date: Wed, 9 Jul 2025 15:10:41 +0200
Subject: [PATCH 2/6] cmake: Use the same version for all libraries that can be
created in shared mode
---
third-party/realsense-file/CMakeLists.txt | 2 +-
third-party/rsutils/CMakeLists.txt | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/third-party/realsense-file/CMakeLists.txt b/third-party/realsense-file/CMakeLists.txt
index e33f965721fd..a53f4c37b03b 100644
--- a/third-party/realsense-file/CMakeLists.txt
+++ b/third-party/realsense-file/CMakeLists.txt
@@ -42,7 +42,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
$<$<BOOL:${USE_EXTERNAL_LZ4}>:lz4::lz4>
)
-#set_target_properties(${PROJECT_NAME} PROPERTIES VERSION "${LIBVERSION}" SOVERSION "${LIBSOVERSION}")
+set_target_properties(${LRS_TARGET} PROPERTIES VERSION ${REALSENSE_VERSION_STRING} SOVERSION "${REALSENSE_VERSION_MAJOR}.${REALSENSE_VERSION_MINOR}")
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER Library)
diff --git a/third-party/rsutils/CMakeLists.txt b/third-party/rsutils/CMakeLists.txt
index bb27360b37ec..15153a1fffac 100644
--- a/third-party/rsutils/CMakeLists.txt
+++ b/third-party/rsutils/CMakeLists.txt
@@ -8,6 +8,7 @@ add_library( ${PROJECT_NAME} "" )
#target_link_libraries( ${PROJECT_NAME} PUBLIC nlohmann_json )
target_compile_features( ${PROJECT_NAME} PUBLIC cxx_std_14 )
set_target_properties( ${PROJECT_NAME} PROPERTIES FOLDER Library )
+set_target_properties( ${PROJECT_NAME} PROPERTIES VERSION ${REALSENSE_VERSION_STRING} SOVERSION "${REALSENSE_VERSION_MAJOR}.${REALSENSE_VERSION_MINOR}")
target_include_directories( ${PROJECT_NAME}
PUBLIC
--
2.50.1

3
_scmsync.obsinfo Normal file
View File

@@ -0,0 +1,3 @@
mtime: 1755152033
commit: d9fe70adeda62d51e0be7151542d5dd3ee3e60e0823aae74e5ab64e5b4a813a8
url: https://src.opensuse.org/jirislaby/h-librealsense

3
build.specials.obscpio Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:652ee474d92a245ae5af96a4921bd9d4346c66111615c4b79839e159ac70b4bb
size 256

View File

@@ -1,4 +1,4 @@
From: Alessandro de Oliveira Faria <cabelo@opensuse.org>
From: Jiri Slaby <jslaby@suse.cz>
Subject: disable -pedantic
Patch-mainline: no
@@ -8,10 +8,10 @@ that we can see more important warnings.
CMake/unix_config.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/CMake/unix_config.cmake 2023-09-07 11:05:08.000000000 -0300
+++ b/CMake/unix_config.cmake 2023-10-10 16:42:30.551153632 -0300
@@ -13,8 +13,8 @@
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE})
--- a/CMake/unix_config.cmake
+++ b/CMake/unix_config.cmake
@@ -14,8 +14,8 @@ macro(os_set_flags)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE})
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -D_DEFAULT_SOURCE")

View File

@@ -1,35 +0,0 @@
From: Jiri Slaby <jslaby@suse.cz>
Date: Tue, 28 Mar 2023 06:48:50 +0200
Subject: (gcc-13) include cstdint for *int*_t
Patch-mainline: https://github.com/IntelRealSense/librealsense/pull/11622
References: gcc13
Otherwise we see errors like this with gcc13:
common/sw-update/http-downloader.h:16:47: error: 'uint64_t' was not declared in this scope
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
common/sw-update/http-downloader.h | 1 +
third-party/rsutils/include/rsutils/version.h | 1 +
2 files changed, 2 insertions(+)
--- a/common/sw-update/http-downloader.h
+++ b/common/sw-update/http-downloader.h
@@ -7,6 +7,7 @@
#include <string>
#include <functional>
#include <vector>
+#include <cstdint>
namespace rs2
{
--- a/third-party/rsutils/include/rsutils/version.h
+++ b/third-party/rsutils/include/rsutils/version.h
@@ -3,6 +3,7 @@
#pragma once
+#include <cstdint>
#include <string>
#include <iosfwd>

View File

@@ -1,3 +1,82 @@
-------------------------------------------------------------------
Thu Aug 14 05:40:19 UTC 2025 - Jiri Slaby <jslaby@suse.cz>
- Update to 2.56.5
* see release notes here:
https://github.com/IntelRealSense/librealsense/releases/tag/v2.56.5
-------------------------------------------------------------------
Wed Jul 9 12:02:31 UTC 2025 - Ralf Habacker <ralf.habacker@freenet.de>
- Build all installed libraries as shared libraries to fix a problem
when building the monado package
- Add patches:
* 0001-cmake-add-support-to-build-shared-libraries.patch
* 0002-cmake-Use-the-same-version-for-all-libraries-that-ca.patch
- Rebased patches:
* rsutils.patch
- Removed obsolete patches:
* realsense_file.patch
-------------------------------------------------------------------
Tue May 13 05:46:06 UTC 2025 - Jiri Slaby <jslaby@suse.cz>
- .spec cleanup
* no need for -DBUILD_SHARED_LIBS=ON, %cmake already does this
- .changes cleanup
* reference new patches
* remove spaces at the ends of lines
- fix shared library patches
* set SOVERSION properly
* what are the patches good for after all? The static libs were
included in .so already, right?
- Update to 2.56.3
* see release notes here:
https://github.com/IntelRealSense/librealsense/releases/tag/v2.56.3
-------------------------------------------------------------------
Sat May 3 05:58:32 UTC 2025 - Alessandro de Oliveira Faria <cabelo@opensuse.org>
- Update to 2.56.2
* see release notes here:
https://github.com/IntelRealSense/librealsense/releases/tag/v2.56.2
* Feature - Introducing a new depth & IR post processing
(90/180/270 deg) frame rotation filter [GitHub #6023,
RSDSO-19843]
* Platform - ARM NEON CPU acceleration support included in the
SDK (align, pointcloud) [PR #13396 , #13389]
* Platform - Updated minimal Jetson version support to v5.0.2
* Wrapper - Updated minimal Python version support to v3.9
Python 3.8 is EOL, can be built from source) [LRS-1154]
* Use Case - Water safety alert system using RealSense camera
reference (in collaboration with the Technion™)
* Refresh D457 device information after DFU [LRS-686]
* Added support for D457 recovery mode [RSDSO-19297]
* Optimize USB enumeration time [RSDSO-19750]
* Broken metadata timestamp in D457 GMSL mode [RSDSO-19754]
* D405 UV errors and intrinsic misalignment [RSDSO-17488,
RSDSO-18999]
* Switched on security for compilation and linkage flags by
default [PR #13378, LRS-1183]
-------------------------------------------------------------------
Sat May 3 03:21:36 UTC 2025 - Alessandro de Oliveira Faria <cabelo@opensuse.org>
- I added two patches which fix the issue with the installation of
static .a libs by forcing their build as shared library
Thanks David Lanzendörfer (leviathanch)
* rsutils.patch
* realsense_file.patch
-------------------------------------------------------------------
Mon Sep 30 06:31:11 UTC 2024 - Jiri Slaby <jslaby@suse.cz>
- Update to 2.56.1
* see release notes here:
https://github.com/IntelRealSense/librealsense/releases/tag/v2.56.1
- drop gcc-13-include-cstdint-for-int-_t.patch (in upstream)
- add 0001-third-party-use-nlohmann_json-from-system.patch
-------------------------------------------------------------------
Wed Oct 4 02:58:09 UTC 2023 - Alessandro de Oliveira Faria <cabelo@opensuse.org>

View File

@@ -1,7 +1,8 @@
#
# spec file for package librealsense
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 Alessandro de Oliveira Faria (A.K.A. CABELO) <cabelo@opensuse.org> or <alessandro.faria@owasp.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,27 +20,32 @@
%define libver %(echo %version|sed 's@^\\([0-9]*\\)\\.\\([0-9]*\\).*@\\1_\\2@')
Name: librealsense
Version: 2.54.2
Version: 2.56.5
Release: 0
Summary: Library for Intel RealSense depth cameras
License: Apache-2.0
Group: Development/Libraries/C and C++
URL: https://github.com/IntelRealSense/librealsense
Source: https://github.com/IntelRealSense/librealsense/archive/v%{version}.tar.gz
Patch0: presets_path.patch
Patch1: disable-pedantic.patch
Patch2: gcc-13-include-cstdint-for-int-_t.patch
# see https://github.com/IntelRealSense/librealsense/pull/14125
Patch0: 0001-cmake-add-support-to-build-shared-libraries.patch
Patch1: 0002-cmake-Use-the-same-version-for-all-libraries-that-ca.patch
Patch2: presets_path.patch
Patch3: disable-pedantic.patch
Patch4: 0001-third-party-use-nlohmann_json-from-system.patch
Patch5: rsutils.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: freeglut-devel
BuildRequires: gcc-c++
BuildRequires: libglvnd-devel
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: cmake(FreeGLUT)
BuildRequires: cmake(glfw3) >= 3.3
BuildRequires: cmake(nlohmann_json) >= 3.11.3
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(libglvnd)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(x11)
%description
The SDK allows depth and color streaming, and provides intrinsic and extrinsic
@@ -80,7 +86,8 @@ export CXXFLAGS='%optflags -Wno-reorder -Wno-unused-variable -Wno-sign-compare -
sed -i "s/\|\/\'/g" %{_builddir}/%{name}-%{version}/src/libusb/libusb.h
%cmake \
-DOpenGL_GL_PREFERENCE=GLVND \
-DCHECK_FOR_UPDATES=OFF
-DCHECK_FOR_UPDATES=OFF \
-DIMPORT_DEPTH_CAM_FW=OFF
%cmake_build
%install
@@ -97,7 +104,7 @@ install -m 644 -t %{buildroot}/%{_udevrulesdir} config/99-realsense-libusb.rules
%postun -n %{name}%{libver} -p /sbin/ldconfig
%files
%doc readme.md CONTRIBUTING.md code-of-conduct.md NOTICE
%doc readme.md CONTRIBUTING.md code-of-conduct.md NOTICE.md Security.md
%{_bindir}/realsense-viewer
%dir %{_datadir}/librealsense2/
%dir %{_datadir}/librealsense2/presets/
@@ -107,11 +114,13 @@ install -m 644 -t %{buildroot}/%{_udevrulesdir} config/99-realsense-libusb.rules
%files -n %{name}%{libver}
%license LICENSE
%{_libdir}/librealsense*.so.*
%{_libdir}/librsutils.so.*
%files devel
%{_includedir}/librealsense2
%{_includedir}/librealsense2-gl
%{_libdir}/librealsense*.so
%{_libdir}/librsutils.so
%dir %{_libdir}/cmake/realsense2
%dir %{_libdir}/cmake/realsense2-gl
%{_libdir}/cmake/realsense2/*.cmake

View File

@@ -9,7 +9,7 @@ And not to home of a random (abuild) user.
--- a/tools/realsense-viewer/CMakeLists.txt
+++ b/tools/realsense-viewer/CMakeLists.txt
@@ -253,7 +253,7 @@ install(
@@ -254,7 +254,7 @@ install(
)
#https://cmake.org/cmake/help/latest/command/install.html
install(DIRECTORY presets/

47
rsutils.patch Normal file
View File

@@ -0,0 +1,47 @@
From: Alessandro de Oliveira Faria <cabelo@opensuse.org>
Subject: rsutils: build as shared
Patch-mainline: never
> I added two patches which fix the issue with the installation of
> static .a libs by forcing their build as shared library
> Thanks David Lanzendörfer (leviathanch)
---
src/gl/rs-gl.cpp | 2 +-
src/log.cpp | 2 +-
third-party/rsutils/CMakeLists.txt | 5 +++--
3 files changed, 5 insertions(+), 4 deletions(-)
--- a/src/gl/rs-gl.cpp
+++ b/src/gl/rs-gl.cpp
@@ -270,7 +270,7 @@ HANDLE_EXCEPTIONS_AND_RETURN(nullptr, ap
#ifdef BUILD_EASYLOGGINGPP
#ifdef SHARED_LIBS
-INITIALIZE_EASYLOGGINGPP
+//INITIALIZE_EASYLOGGINGPP
#endif
char log_gl_name[] = LIBREALSENSE_ELPP_ID;
static logger_type<log_gl_name> logger_gl;
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -5,7 +5,7 @@
#ifdef BUILD_EASYLOGGINGPP
-INITIALIZE_EASYLOGGINGPP
+//INITIALIZE_EASYLOGGINGPP
namespace librealsense
{
--- a/third-party/rsutils/CMakeLists.txt
+++ b/third-party/rsutils/CMakeLists.txt
@@ -47,7 +48,7 @@ if( BUILD_EASYLOGGINGPP )
PRIVATE "${REPO_ROOT}/third-party/easyloggingpp/src/easylogging++.cc" )
# We want to disable any default ELPP log-file!
target_compile_definitions( ${PROJECT_NAME}
- PUBLIC ELPP_NO_DEFAULT_LOG_FILE )
+ PUBLIC ELPP_NO_DEFAULT_LOG_FILE AUTO_INITIALIZE_EASYLOGGINGPP )
endif()
target_sources( ${PROJECT_NAME} PRIVATE ${UTILITIES_SOURCE_FILES} )
source_group(

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e3a767337ff40ae41000049a490ab84bd70b00cbfef65e8cdbadf17fd2e1e5a8
size 62165166

BIN
v2.56.5.tar.gz LFS Normal file

Binary file not shown.