[packages/libultrahdr] - allow building with system libsmpte2094-50
qboosh
qboosh at pld-linux.org
Sun Sep 13 15:28:43 CEST 2026
commit 22275ea79377106ce067f789ee931da58281e6ad
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Sep 13 15:28:50 2026 +0200
- allow building with system libsmpte2094-50
libultrahdr-system-libsmpte2094-50.patch | 46 ++++++++++++++++++++++++++++++++
libultrahdr.spec | 6 ++++-
2 files changed, 51 insertions(+), 1 deletion(-)
---
diff --git a/libultrahdr.spec b/libultrahdr.spec
index 2da1175..6c571d5 100644
--- a/libultrahdr.spec
+++ b/libultrahdr.spec
@@ -3,7 +3,7 @@
# Conditional build:
%bcond_with java # Java interface (JNI wrapper+Java classes)
%bcond_with gles # GPU acceleration (via EGL+GLES)
-%bcond_with smpte2094 # SMPTE 2094-50 support (TODO: finish)
+%bcond_with smpte2094 # SMPTE 2094-50 support
#
Summary: Library for encoding and decoding ultrahdr images
Summary(pl.UTF-8): Biblioteka do kodowania i dekodowania obrazów ultrahdr
@@ -16,6 +16,7 @@ Group: Libraries
Source0: https://github.com/google/libultrahdr/archive/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 4f2d0d25b9f54eeefb69f1e2be9dd254
Patch0: %{name}-opt.patch
+Patch1: %{name}-system-libsmpte2094-50.patch
URL: https://github.com/google/libultrahdr
%if %{with gles}
BuildRequires: EGL-devel
@@ -24,8 +25,10 @@ BuildRequires: OpenGLESv3-devel >= 3.0
BuildRequires: cmake >= 3.15
%{?with_java:BuildRequires: jdk}
BuildRequires: libjpeg-devel
+%{?with_smpte2094:BuildRequires: libsmpte2094-50-devel >= 0.1.4}
BuildRequires: libstdc++-devel >= 6:7
BuildRequires: rpmbuild(macros) >= 1.605
+%{?with_smpte2094:Requires: libsmpte2094-50 >= 0.1.4}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -84,6 +87,7 @@ Statyczna biblioteka libuhdr.
%prep
%setup -q
%patch -P0 -p1
+%patch -P1 -p1
%build
# .pc file generation expects relative INCLUDEDIR/LIBDIR
diff --git a/libultrahdr-system-libsmpte2094-50.patch b/libultrahdr-system-libsmpte2094-50.patch
new file mode 100644
index 0000000..5555f33
--- /dev/null
+++ b/libultrahdr-system-libsmpte2094-50.patch
@@ -0,0 +1,46 @@
+--- libultrahdr-1.5.1/CMakeLists.txt.orig 2026-09-11 21:02:10.235321744 +0200
++++ libultrahdr-1.5.1/CMakeLists.txt 2026-09-13 10:44:52.046503523 +0200
+@@ -230,6 +230,9 @@ endif()
+ if(UHDR_WRITE_ISO)
+ add_compile_options(-DUHDR_WRITE_ISO)
+ endif()
++if(UHDR_ENABLE_SMPTE2094_50)
++ add_compile_options(-DUHDR_ENABLE_SMPTE2094_50)
++endif()
+
+ include(CheckCXXCompilerFlag)
+ function(CheckCompilerOption opt res)
+@@ -378,24 +381,6 @@ find_package(Threads REQUIRED)
+
+ include(ExternalProject)
+
+-if(UHDR_ENABLE_SMPTE2094_50)
+- if(UHDR_BUILD_DEPS)
+- add_compile_options(-DUHDR_ENABLE_SMPTE2094_50)
+- include(FetchContent)
+- FetchContent_Declare(
+- libsmpte2094_50
+- GIT_REPOSITORY https://github.com/webmproject/libsmpte2094-50.git
+- GIT_TAG v0.1.4)
+- set(OLD_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
+- set(BUILD_SHARED_LIBS OFF)
+- FetchContent_MakeAvailable(libsmpte2094_50)
+- set(BUILD_SHARED_LIBS ${OLD_BUILD_SHARED_LIBS})
+- else()
+- message(WARNING "libsmpte2094-50 package not available")
+- set(UHDR_ENABLE_SMPTE2094_50 OFF)
+- endif()
+-endif()
+-
+ get_directory_property(UHDR_COMPILE_FLAGS COMPILE_OPTIONS)
+ string (REPLACE ";" " " UHDR_COMPILE_FLAGS_STR "${UHDR_COMPILE_FLAGS}")
+ set(UHDR_CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${UHDR_COMPILE_FLAGS_STR}")
+@@ -589,7 +589,7 @@ file(GLOB IMAGE_IO_SRCS_LIST "${THIRD_PA
+ set(PRIVATE_INCLUDE_DIR ${SOURCE_DIR}/include/ ${JPEG_INCLUDE_DIRS})
+ set(PRIVATE_LINK_LIBS ${JPEG_LIBRARIES} Threads::Threads)
+ if(UHDR_ENABLE_SMPTE2094_50)
+- list(APPEND PRIVATE_LINK_LIBS smpte2094_50_utils)
++ list(APPEND PRIVATE_LINK_LIBS smpte2094_50_utils absl_statusor absl_status)
+ endif()
+ if(UHDR_ENABLE_GLES)
+ list(APPEND PRIVATE_INCLUDE_DIR ${EGL_INCLUDE_DIRS} ${OPENGLES3_INCLUDE_DIRS})
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libultrahdr.git/commitdiff/22275ea79377106ce067f789ee931da58281e6ad
More information about the pld-cvs-commit
mailing list