public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sayan Paul <paul.sayan@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/librealsense] rawhide: spec: upgrade to libresense 2.58.2
Date: Wed, 24 Jun 2026 13:06:17 GMT	[thread overview]
Message-ID: <178230637790.1.13987789837034221786.rpms-librealsense-0c6bbc233c0c@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/librealsense
            Branch : rawhide
            Commit : 0c6bbc233c0cf8f86a37cae6ad76858b8c607afc
            Author : Sayan Paul <paul.sayan@gmail.com>
            Date   : 2026-06-24T17:41:24+05:30
            Stats  : +69/-21 in 8 file(s)
            URL    : https://src.fedoraproject.org/rpms/librealsense/c/0c6bbc233c0cf8f86a37cae6ad76858b8c607afc?branch=rawhide

            Log:
            spec: upgrade to libresense 2.58.2

move to python 3.15

Signed-off-by: Sayan Paul <paul.sayan@gmail.com>

---
diff --git a/.gitignore b/.gitignore
index 6fccdf3..9bf499d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,3 +43,4 @@
 /librealsense-2.56.5.tar.gz
 /librealsense-2.57.6.tar.gz
 /librealsense-2.57.7.tar.gz
+/librealsense-2.58.2.tar.gz

diff --git a/librealsense-2.58.2-1.fc45.src.rpm b/librealsense-2.58.2-1.fc45.src.rpm
new file mode 100644
index 0000000..79ced65
Binary files /dev/null and b/librealsense-2.58.2-1.fc45.src.rpm differ

diff --git a/librealsense.fix-pybind11-keep-alive.patch b/librealsense.fix-pybind11-keep-alive.patch
new file mode 100644
index 0000000..804f848
--- /dev/null
+++ b/librealsense.fix-pybind11-keep-alive.patch
@@ -0,0 +1,21 @@
+Author: Sayan Paul <paul.sayan@gmail.com>
+Date:   Tue Jun 24 16:00:00 2026 +0530
+
+    Fix pybind11 3.x incompatibility: def_property does not support keep_alive
+
+    pybind11 >= 3.0 added a static_assert rejecting py::keep_alive passed
+    directly to def_property/def_property_readonly. Wrap the getter in
+    py::cpp_function instead, as recommended by pybind11.
+
+diff --git a/wrappers/python/pyrs_frame.cpp b/wrappers/python/pyrs_frame.cpp
+--- a/wrappers/python/pyrs_frame.cpp
++++ b/wrappers/python/pyrs_frame.cpp
+@@ -148,7 +148,7 @@
+         .def_property_readonly("frame_number", &rs2::frame::get_frame_number, "The frame number. Identical to calling get_frame_number.")
+         .def("get_data_size", &rs2::frame::get_data_size, "Retrieve data size from frame handle.")
+         .def("get_data", get_frame_data, "Retrieve data from the frame handle.", py::keep_alive<0, 1>())
+-        .def_property_readonly("data", get_frame_data, "Data from the frame handle. Identical to calling get_data.", py::keep_alive<0, 1>())
++        .def_property_readonly("data", py::cpp_function(get_frame_data, py::keep_alive<0, 1>()), "Data from the frame handle. Identical to calling get_data.")
+         .def("get_profile", &rs2::frame::get_profile, "Retrieve stream profile from frame handle.")
+         .def_property_readonly("profile", &rs2::frame::get_profile, "Stream profile from frame handle. Identical to calling get_profile.")
+         .def("keep", &rs2::frame::keep, "Keep the frame, otherwise if no refernce to the frame, the frame will be released.")

diff --git a/librealsense.realsense-file-shared-library.patch b/librealsense.realsense-file-shared-library.patch
index 3753029..54be09e 100644
--- a/librealsense.realsense-file-shared-library.patch
+++ b/librealsense.realsense-file-shared-library.patch
@@ -4,23 +4,24 @@ Date:   Thu Dec 26 11:01:49 2024 +0100
 
     Build realsense-file as shared library
 
+    Refreshed for v2.58.2 by Sayan Paul <paul.sayan@gmail.com>
+
 diff --git a/third-party/realsense-file/CMakeLists.txt b/third-party/realsense-file/CMakeLists.txt
-index 45c323b8b..fb7138587 100644
 --- a/third-party/realsense-file/CMakeLists.txt
 +++ b/third-party/realsense-file/CMakeLists.txt
-@@ -24,13 +24,14 @@ endif()
+@@ -30,13 +30,14 @@
  
  set_property(GLOBAL PROPERTY USE_FOLDERS ON)
  
--add_library(${PROJECT_NAME} STATIC
-+add_library(${PROJECT_NAME} SHARED
+-add_library(${REALSENSE_FILE_TARGET} STATIC
++add_library(${REALSENSE_FILE_TARGET} SHARED
      ${AllSources}
      ${HEADER_FILES_ROSBAG}
      ${SOURCE_FILES_ROSBAG}
      ${SOURCE_FILES_COMPRESSION}
  )
  
-+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${REALSENSE_VERSION_STRING} SOVERSION "${REALSENSE_VERSION_MAJOR}.${REALSENSE_VERSION_MINOR}")
- target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11)
++set_target_properties(${REALSENSE_FILE_TARGET} PROPERTIES VERSION ${REALSENSE_VERSION_STRING} SOVERSION "${REALSENSE_VERSION_MAJOR}.${REALSENSE_VERSION_MINOR}")
+ target_compile_features(${REALSENSE_FILE_TARGET} PUBLIC cxx_std_14)
  
- target_include_directories(${PROJECT_NAME} PRIVATE
+ foreach(_dir ${ROSBAG_HEADER_DIRS})

diff --git a/librealsense.remove-cflags.patch b/librealsense.remove-cflags.patch
index 66276d9..0787644 100644
--- a/librealsense.remove-cflags.patch
+++ b/librealsense.remove-cflags.patch
@@ -3,14 +3,15 @@ Author: Till Hofmann <thofmann@fedoraproject.org>
 Date:   Wed Jan 23 11:22:55 2019 +0000
 
     Remove some CFLAGS modification
-    
+
     We want to use the distro's CFLAGS as close as possible.
 
+    Refreshed for v2.58.2 by Sayan Paul <paul.sayan@gmail.com>
+
 diff --git a/CMake/unix_config.cmake b/CMake/unix_config.cmake
-index 50371cd66..4d8f8cc73 100644
 --- a/CMake/unix_config.cmake
 +++ b/CMake/unix_config.cmake
-@@ -14,29 +14,10 @@ macro(os_set_flags)
+@@ -14,37 +14,10 @@
      set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE})
  
      set(CMAKE_POSITION_INDEPENDENT_CODE ON)
@@ -22,11 +23,18 @@ index 50371cd66..4d8f8cc73 100644
  
 -    execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE MACHINE)
 -    if(${MACHINE} MATCHES "arm64-*" OR ${MACHINE} MATCHES "aarch64-*")
+-        if(BUILD_WITH_NEON)
+-            message(STATUS "Building for ARM64 with NEON optimizations")
+-        else()
+-            message(STATUS "Building for ARM64 without NEON optimizations")
+-        endif()
 -        set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -mstrict-align -ftree-vectorize")
 -        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstrict-align -ftree-vectorize")
 -    elseif(${MACHINE} MATCHES "arm-*")
--        set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -mfpu=neon -mfloat-abi=hard -ftree-vectorize -latomic")
--        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -mfloat-abi=hard -ftree-vectorize -latomic")
+-        # 32-bit ARM - NEON not supported via BUILD_WITH_NEON flag
+-        message(STATUS "Building for 32-bit ARM - using compiler default FPU settings")
+-        set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -ftree-vectorize -latomic")
+-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftree-vectorize -latomic")
 -    elseif(${MACHINE} MATCHES "powerpc64(le)?-linux-gnu")
 -        set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -ftree-vectorize")
 -        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftree-vectorize")
@@ -34,6 +42,7 @@ index 50371cd66..4d8f8cc73 100644
 -        set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -mstrict-align -ftree-vectorize")
 -        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstrict-align -ftree-vectorize")
 -    else()
+-        message(STATUS "Building with SSE optimizations")
 -        set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -mssse3")
 -        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mssse3")
 -        set(LRS_TRY_USE_AVX true)

diff --git a/librealsense.rsutils-shared-library.patch b/librealsense.rsutils-shared-library.patch
index 1268f9f..d436d90 100644
--- a/librealsense.rsutils-shared-library.patch
+++ b/librealsense.rsutils-shared-library.patch
@@ -1,19 +1,29 @@
+Author: Sayan Paul <paul.sayan@gmail.com>
+Date:   Tue Jun 24 16:00:00 2026 +0530
+
+    Build rsutils as shared library
+
+    Refreshed for v2.58.2
+
 diff --git a/third-party/rsutils/CMakeLists.txt b/third-party/rsutils/CMakeLists.txt
-index 943dc1766..3f6babcee 100644
 --- a/third-party/rsutils/CMakeLists.txt
 +++ b/third-party/rsutils/CMakeLists.txt
-@@ -3,11 +3,10 @@
+@@ -3,15 +3,14 @@
  cmake_minimum_required(VERSION 3.10)  # source_group(TREE)
  project( rsutils )
  
 -add_library( ${PROJECT_NAME} STATIC "" )
 -# 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 )
 +add_library( ${PROJECT_NAME} SHARED "" )
+ # rsutilgpu.cpp uses dlopen on POSIX / LoadLibrary on Windows to probe for CUDA at
+ # runtime; propagate the dl dependency so consumers of rsutils link it transitively.
+ # CMAKE_DL_LIBS is empty on Windows (LoadLibrary is in kernel32, linked by default).
+ target_link_libraries( ${PROJECT_NAME} PUBLIC ${CMAKE_DL_LIBS} )
+-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_compile_features(${PROJECT_NAME} PUBLIC cxx_std_14)
++target_compile_features( ${PROJECT_NAME} PUBLIC cxx_std_14 )
  
  target_include_directories( ${PROJECT_NAME}
      PUBLIC

diff --git a/librealsense.spec b/librealsense.spec
index f5d68b8..7e35c82 100644
--- a/librealsense.spec
+++ b/librealsense.spec
@@ -1,12 +1,12 @@
-%global abiver 2.57
+%global abiver 2.58
 Name:           librealsense
-Version:        2.57.7
+Version:        2.58.2
 Release:        %autorelease
 Summary:        Cross-platform camera capture for Intel RealSense
 
 License:        Apache-2.0
-URL:            https://github.com/IntelRealSense/librealsense
-Source0:        https://github.com/IntelRealSense/librealsense/archive/v%{version}.tar.gz#/librealsense-%{version}.tar.gz
+URL:            https://github.com/realsenseai/librealsense
+Source0:        https://github.com/realsenseai/librealsense/archive/v%{version}.tar.gz#/librealsense-%{version}.tar.gz
 # Remove custom CFLAGS that override ours.
 # This was discussed with upstream, but upstream wants to keep those flags.
 # https://github.com/morxa/librealsense/tree/remove-cflags
@@ -23,6 +23,8 @@ Patch4:         librealsense.rsutils-shared-library.patch
 Patch5:         librealsense.use-system-json.patch
 # https://github.com/morxa/librealsense/tree/utf8-string-literals
 Patch6:         librealsense.utf8-string-literals.patch
+# Fix pybind11 3.x incompatibility: def_property does not support keep_alive
+Patch7:         librealsense.fix-pybind11-keep-alive.patch
 
 BuildRequires:  cmake
 BuildRequires:  cmake(glfw3)
@@ -97,6 +99,7 @@ with %{name}.
 %build
 %cmake \
   -DBUILD_UNIT_TESTS=NO \
+  -DBUILD_ROSBAG2=NO \
   -DCHECK_FOR_UPDATES=NO \
   -DCMAKE_INSTALL_BINDIR=%{_bindir} \
   -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
@@ -120,6 +123,8 @@ popd
 %install
 %cmake_install
 
+rm -f %{buildroot}/%{_libdir}/librs_lz4.a
+
 mkdir -p %{buildroot}/%{_udevrulesdir}
 install -p -m644 config/99-realsense-libusb.rules %{buildroot}/%{_udevrulesdir}
 mkdir -p %{buildroot}/%{_datadir}/realsense
@@ -161,6 +166,7 @@ mv %{buildroot}/builddir/Documents/librealsense2/presets %{buildroot}/%{_datadir
 %{_bindir}/rs-measure
 %{_bindir}/rs-motion
 %{_bindir}/rs-multicam
+%{_bindir}/rs-object-detection
 %{_bindir}/rs-on-chip-calib
 %{_bindir}/rs-pointcloud
 %{_bindir}/rs-post-processing

diff --git a/sources b/sources
index b047fdb..e6956ec 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (librealsense-2.57.7.tar.gz) = 37db1fad7d0aa24a51190d6f9ebcd0704d3d53ba345f57dca5d7daa47a837bc40c79d5506ca3d6b8a075b3978b0f280de7579f89eeeb0b5f5930307f21614980
+SHA512 (librealsense-2.58.2.tar.gz) = f03414bc6a134fa991add6a32c1044adef0caca1b12b5cdb5dddccffa46f4edb5067037f1259355d359d6f31c0284ccd0a180f220c955ccd3f346125cd8a93a7

                 reply	other threads:[~2026-06-24 13:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178230637790.1.13987789837034221786.rpms-librealsense-0c6bbc233c0c@fedoraproject.org \
    --to=paul.sayan@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox