[packages/OpenTimelineIO] - new, with two parches from Mageia

witekfl witekfl at pld-linux.org
Wed Apr 30 14:48:49 CEST 2025


commit 7ecf06ad252cfb19fdad170580681ce8030cca0d
Author: Witold Filipczyk <witekfl at poczta.onet.pl>
Date:   Wed Apr 30 14:03:58 2025 +0200

    - new, with two parches from Mageia

 0001-Use-system-rapidjson.patch | 118 ++++++++++++++++++++++++++++++++++++++++
 0002-CMake-fixes.patch          | 115 +++++++++++++++++++++++++++++++++++++++
 OpenTimelineIO.spec             |  88 ++++++++++++++++++++++++++++++
 3 files changed, 321 insertions(+)
---
diff --git a/OpenTimelineIO.spec b/OpenTimelineIO.spec
new file mode 100644
index 0000000..2a8fe57
--- /dev/null
+++ b/OpenTimelineIO.spec
@@ -0,0 +1,88 @@
+#
+# Conditional build:
+%bcond_with	tests		# build with tests
+Summary:	OpenTimelineIO
+Name:		OpenTimelineIO
+Version:	0.17.0
+Release:	1
+License:	Apache v2.0
+Group:		X11/Libraries
+Source0:	https://github.com/AcademySoftwareFoundation/OpenTimelineIO/archive/refs/tags/v%{version}.tar.gz
+# Source0-md5:	efc3dff4adb57164e83afb68908018eb
+Patch0:		0001-Use-system-rapidjson.patch
+Patch1:		0002-CMake-fixes.patch
+URL:		http://opentimeline.io/
+BuildRequires:	Imath-devel
+BuildRequires:	cmake >= 3.16
+BuildRequires:	ninja
+BuildRequires:	rapidjson-devel >= 1.1.1
+BuildRequires:	rpmbuild(macros) >= 1.164
+BuildRequires:	tar >= 1:1.22
+BuildRequires:	xz
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		qt6dir		%{_libdir}/qt6
+
+%description
+OpenTimelineIO is an interchange format and API for editorial cut
+information. OTIO contains information about the order and length of
+cuts and references to external media. It is not however, a container
+format for media.
+
+%package devel
+Summary:	Header files for %{name} development
+Summary(pl.UTF-8):	Pliki nagłówkowe dla programistów używających %{name}
+Group:		X11/Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for %{name} development.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe dla programistów używających %{name}.
+
+%prep
+%setup -q
+%patch -P0 -p1
+%patch -P1 -p1
+
+%build
+%cmake -B build \
+	-G Ninja \
+	%{!?with_tests:-DBUILD_TESTING=OFF} \
+	-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+	-DOTIO_FIND_IMATH=ON
+
+%ninja_build -C build
+
+%if %{with tests}
+%ninja_build -C build test
+%endif
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%ninja_install -C build
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc *.md *.pdf *.txt
+%ghost %{_libdir}/libopentime.so.0
+%attr(755,root,root) %{_libdir}/libopentime.so.*.*
+%ghost %{_libdir}/libopentimelineio.so.0
+%attr(755,root,root) %{_libdir}/libopentimelineio.so.*.*
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/opentime
+%{_includedir}/opentimelineio
+%{_libdir}/cmake/opentime
+%{_libdir}/cmake/opentimelineio
+%{_libdir}/libopentime.so
+%{_libdir}/libopentimelineio.so
diff --git a/0001-Use-system-rapidjson.patch b/0001-Use-system-rapidjson.patch
new file mode 100644
index 0000000..dd1aa93
--- /dev/null
+++ b/0001-Use-system-rapidjson.patch
@@ -0,0 +1,118 @@
+From 2bd90edfb4730780b71fcacae9e492ff15a16268 Mon Sep 17 00:00:00 2001
+From: Christophe Marin <christophe at krop.fr>
+Date: Fri, 7 Mar 2025 10:42:48 +0100
+Subject: [PATCH 1/2] Use system rapidjson
+
+---
+ CMakeLists.txt                    | 56 +++----------------------------
+ src/opentimelineio/CMakeLists.txt |  5 ++-
+ 2 files changed, 7 insertions(+), 54 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 825ad9d..0a4d0ce 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,7 +28,7 @@ project(OpenTimelineIO VERSION ${OTIO_VERSION} LANGUAGES C CXX)
+ # Installation options
+ option(OTIO_CXX_INSTALL               "Install the C++ bindings" ON)
+ option(OTIO_PYTHON_INSTALL            "Install the Python bindings" OFF)
+-option(OTIO_DEPENDENCIES_INSTALL      "Install OTIO's C++ header dependencies (any and nonstd)" ON)
++option(OTIO_DEPENDENCIES_INSTALL      "Install OTIO's C++ header dependencies (any and nonstd)" OFF)
+ option(OTIO_INSTALL_PYTHON_MODULES    "Install OTIO pure Python modules/files" ON)
+ option(OTIO_INSTALL_COMMANDLINE_TOOLS "Install the OTIO command line tools" ON)
+ option(OTIO_INSTALL_CONTRIB           "Install the opentimelineio_contrib Python package" ON)
+@@ -149,63 +149,16 @@ endif()
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ set(CMAKE_CXX_EXTENSIONS OFF)
+ 
+-if(OTIO_CXX_COVERAGE AND NOT MSVC)
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
+-    # this causes cmake to produce file.gcno instead of file.cpp.gcno
+-    set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1)
+-    message(STATUS "Building C++ with Coverage: ON")
+-else()
+-    message(STATUS "Building C++ with Coverage: OFF")
+-endif()
+ 
+-if(WIN32)
+-    # Windows debug builds for Python require a d in order for the module to
+-    # load. This also helps ensure that debug builds in general are matched
+-    # to the Microsoft debug CRT.
+-    set(OTIO_DEBUG_POSTFIX "d")
+-endif()
++
++
+ 
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+ 
+ #------------------------------------------------------------------------------
+ # Fetch or refresh submodules if requested
+ #
+-if (OTIO_AUTOMATIC_SUBMODULES)
+-    # make sure that git submodules are up to date when building
+-    find_package(Git QUIET)
+-    if (GIT_FOUND)
+-        message(STATUS "Checking git repo is available:")
+-        execute_process(
+-            # the following command returns true if cwd is in the repo
+-            COMMAND ${GIT_EXECUTABLE} rev-parse --is-inside-work-tree
+-            WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+-            RESULT_VARIABLE IN_A_GIT_REPO_RETCODE
+-        )
+-    endif()
+ 
+-    if (GIT_FOUND AND IN_A_GIT_REPO_RETCODE EQUAL 0)
+-        # you might want to turn this off if you're working in one of the submodules
+-        # or trying it out with a different version of the submodule
+-        option(GIT_UPDATE_SUBMODULES "Update submodules each build" ON)
+-        if (GIT_UPDATE_SUBMODULES)
+-            message(
+-                STATUS "root: Updating git submodules to make sure they are up to date"
+-            )
+-            execute_process(
+-                COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
+-                WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+-                RESULT_VARIABLE GIT_UPDATE_SUBMODULES_RESULT
+-            )
+-            if (NOT GIT_UPDATE_SUBMODULES_RESULT EQUAL "0")
+-                message(
+-                    FATAL_ERROR
+-                    "git submodule update --init --recursive failed with \
+-                    ${GIT_UPDATE_SUBMODULES_RESULT}"
+-                )
+-            endif()
+-        endif()
+-    endif()
+-endif()
+ 
+ #------------------------------------------------------------------------------
+ # Setup tests
+@@ -245,7 +198,8 @@ else()
+ endif()
+ 
+ # set up the internally hosted dependencies
+-add_subdirectory(src/deps)
++# add_subdirectory(src/deps)
++find_package(RapidJSON CONFIG REQUIRED)
+ 
+ set (OTIO_IMATH_TARGETS
+     # For OpenEXR/Imath 3.x:
+diff --git a/src/opentimelineio/CMakeLists.txt b/src/opentimelineio/CMakeLists.txt
+index 4b08e6d..e98828b 100644
+--- a/src/opentimelineio/CMakeLists.txt
++++ b/src/opentimelineio/CMakeLists.txt
+@@ -80,9 +80,8 @@ add_library(OTIO::opentimelineio ALIAS opentimelineio)
+ target_include_directories(opentimelineio
+     PRIVATE       "${IMATH_INCLUDES}"
+                   "${PROJECT_SOURCE_DIR}/src"
+-                  "${PROJECT_SOURCE_DIR}/src/deps"
+-                  "${PROJECT_SOURCE_DIR}/src/deps/rapidjson/include"
+-                  "${IMATH_INCLUDES}")
++                  "${IMATH_INCLUDES}"
++                  ${RapidJSON_INCLUDE_DIRS})
+ 
+ target_link_libraries(opentimelineio 
+     PUBLIC opentime ${OTIO_IMATH_TARGETS})
+-- 
+2.48.1
+
diff --git a/0002-CMake-fixes.patch b/0002-CMake-fixes.patch
new file mode 100644
index 0000000..adbe235
--- /dev/null
+++ b/0002-CMake-fixes.patch
@@ -0,0 +1,115 @@
+From 6b4edf8f770982c0fb147fd79322d8967f0795b0 Mon Sep 17 00:00:00 2001
+From: Christophe Marin <christophe at krop.fr>
+Date: Fri, 7 Mar 2025 10:58:24 +0100
+Subject: [PATCH 2/2] CMake fixes
+
+---
+ CMakeLists.txt                    | 4 +++-
+ src/opentime/CMakeLists.txt       | 8 +++++---
+ src/opentimelineio/CMakeLists.txt | 8 +++++---
+ 3 files changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0a4d0ce..36f6e27 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -20,6 +20,8 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING "Minimum OS X deployment ve
+ 
+ project(OpenTimelineIO VERSION ${OTIO_VERSION} LANGUAGES C CXX)
+ 
++include(GNUInstallDirs)
++
+ #------------------------------------------------------------------------------
+ # Options
+ # Add all options and settings here for all subprojects to aid in project
+@@ -100,7 +102,7 @@ if(OTIO_PYTHON_INSTALL)
+     endif()
+ 
+ else()
+-    set(OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib")
++    set(OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
+     message(STATUS "OTIO C++ installing to ${CMAKE_INSTALL_PREFIX}")
+ endif()
+ 
+diff --git a/src/opentime/CMakeLists.txt b/src/opentime/CMakeLists.txt
+index b7cc47c..6ad040f 100644
+--- a/src/opentime/CMakeLists.txt
++++ b/src/opentime/CMakeLists.txt
+@@ -19,6 +19,8 @@ add_library(OTIO::opentime ALIAS opentime)
+ target_include_directories(opentime PRIVATE "${PROJECT_SOURCE_DIR}/src")
+ 
+ set_target_properties(opentime PROPERTIES 
++    VERSION ${OTIO_VERSION}
++    SOVERSION 0
+     DEBUG_POSTFIX "${OTIO_DEBUG_POSTFIX}"
+     LIBRARY_OUTPUT_NAME "opentime"
+     POSITION_INDEPENDENT_CODE TRUE
+@@ -49,7 +51,7 @@ if(OTIO_CXX_INSTALL)
+             RUNTIME DESTINATION "${OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR}")
+ 
+     install(EXPORT OpenTimeTargets
+-            DESTINATION "${OTIO_RESOLVED_CXX_INSTALL_DIR}/share/opentime"
++            DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/opentime"
+             NAMESPACE OTIO:: )
+ 
+     include(CMakePackageConfigHelpers)
+@@ -57,7 +59,7 @@ if(OTIO_CXX_INSTALL)
+         ${CMAKE_CURRENT_SOURCE_DIR}/OpenTimeConfig.cmake.in
+         ${CMAKE_CURRENT_BINARY_DIR}/OpenTimeConfig.cmake
+         INSTALL_DESTINATION
+-            ${OTIO_RESOLVED_CXX_INSTALL_DIR}/share/opentime
++            ${CMAKE_INSTALL_LIBDIR}/cmake/opentime
+         NO_SET_AND_CHECK_MACRO
+         NO_CHECK_REQUIRED_COMPONENTS_MACRO
+     )
+@@ -66,7 +68,7 @@ if(OTIO_CXX_INSTALL)
+         FILES
+             ${CMAKE_CURRENT_BINARY_DIR}/OpenTimeConfig.cmake
+         DESTINATION
+-            ${OTIO_RESOLVED_CXX_INSTALL_DIR}/share/opentime
++            ${CMAKE_INSTALL_LIBDIR}/cmake/opentime
+     )
+ endif()
+ 
+diff --git a/src/opentimelineio/CMakeLists.txt b/src/opentimelineio/CMakeLists.txt
+index e98828b..22828a6 100644
+--- a/src/opentimelineio/CMakeLists.txt
++++ b/src/opentimelineio/CMakeLists.txt
+@@ -87,6 +87,8 @@ target_link_libraries(opentimelineio
+     PUBLIC opentime ${OTIO_IMATH_TARGETS})
+ 
+ set_target_properties(opentimelineio PROPERTIES
++    VERSION ${OTIO_VERSION}
++    SOVERSION 0
+     DEBUG_POSTFIX "${OTIO_DEBUG_POSTFIX}"
+     LIBRARY_OUTPUT_NAME "opentimelineio"
+     POSITION_INDEPENDENT_CODE TRUE
+@@ -123,7 +125,7 @@ if(OTIO_CXX_INSTALL)
+            RUNTIME DESTINATION "${OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR}")
+ 
+     install(EXPORT OpenTimelineIOTargets
+-           DESTINATION "${OTIO_RESOLVED_CXX_INSTALL_DIR}/share/opentimelineio"
++           DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/opentimelineio"
+            NAMESPACE OTIO:: )
+ 
+     include(CMakePackageConfigHelpers)
+@@ -131,7 +133,7 @@ if(OTIO_CXX_INSTALL)
+         ${CMAKE_CURRENT_SOURCE_DIR}/OpenTimelineIOConfig.cmake.in
+         ${CMAKE_CURRENT_BINARY_DIR}/OpenTimelineIOConfig.cmake
+         INSTALL_DESTINATION
+-            ${OTIO_RESOLVED_CXX_INSTALL_DIR}/share/opentimelineio
++            ${CMAKE_INSTALL_LIBDIR}/cmake/opentimelineio
+         NO_SET_AND_CHECK_MACRO
+         NO_CHECK_REQUIRED_COMPONENTS_MACRO
+     )
+@@ -140,6 +142,6 @@ if(OTIO_CXX_INSTALL)
+         FILES
+             ${CMAKE_CURRENT_BINARY_DIR}/OpenTimelineIOConfig.cmake
+         DESTINATION
+-            ${OTIO_RESOLVED_CXX_INSTALL_DIR}/share/opentimelineio
++            ${CMAKE_INSTALL_LIBDIR}/cmake/opentimelineio
+     )
+ endif()
+-- 
+2.48.1
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/OpenTimelineIO.git/commitdiff/7ecf06ad252cfb19fdad170580681ce8030cca0d



More information about the pld-cvs-commit mailing list