[packages/libajantv2] - updated to 17.1.3, patched to use system mbedtls

qboosh qboosh at pld-linux.org
Fri Mar 21 21:52:55 CET 2025


commit bfa96fc07255a7f4c168402107912c33b9eb6527
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Mar 21 21:49:10 2025 +0100

    - updated to 17.1.3, patched to use system mbedtls

 libajantv2-system-mbedtls.patch | 75 +++++++++++++++++++++++++++++++++++++++++
 libajantv2.spec                 | 11 ++++--
 2 files changed, 83 insertions(+), 3 deletions(-)
---
diff --git a/libajantv2.spec b/libajantv2.spec
index 3a302d8..b44c2f1 100644
--- a/libajantv2.spec
+++ b/libajantv2.spec
@@ -2,19 +2,22 @@
 Summary:	Open-source library for AJA Video Systems desktop I/O cards
 Summary(pl.UTF-8):	Biblioteka o otwartych źródłach do kart we/wy AJA Video Systems
 Name:		libajantv2
-Version:	17.0.1
+Version:	17.1.3
 %define	gitref	ntv2_%(echo %{version} | tr . _)
 Release:	1
 License:	MIT
 Group:		Libraries
 #Source0Download: https://github.com/aja-video/libajantv2/releases
 Source0:	https://github.com/aja-video/libajantv2/archive/%{gitref}/%{name}-%{version}.tar.gz
-# Source0-md5:	562606360d6de2487d9e7916156da8a8
+# Source0-md5:	255d6ce495baf576fbbb4cae31e6bd25
+Patch0:		%{name}-system-mbedtls.patch
 URL:		https://github.com/aja-video/libajantv2
 BuildRequires:	Qt5Core-devel >= 5
 BuildRequires:	cmake >= 3.15
 BuildRequires:	libstdc++-devel
+BuildRequires:	mbedtls-devel
 BuildRequires:	rpmbuild(macros) >= 1.605
+BuildRequires:	udev-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -41,6 +44,7 @@ Pliki nagłówkowe biblioteki AJA NTV2.
 
 %prep
 %setup -q -n %{name}-%{gitref}
+%patch -P0 -p1
 
 %build
 %cmake -B build \
@@ -96,10 +100,11 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/pciwhacker
 %attr(755,root,root) %{_bindir}/regio
 %attr(755,root,root) %{_bindir}/supportlog
-%attr(755,root,root) %{_libdir}/libajantv2.so.17.0.1.0
+%attr(755,root,root) %{_libdir}/libajantv2.so.17.1.3.0
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libajantv2.so
 %{_includedir}/libajantv2
 %{_pkgconfigdir}/libajantv2.pc
+%{_libdir}/cmake/ajantv2
diff --git a/libajantv2-system-mbedtls.patch b/libajantv2-system-mbedtls.patch
new file mode 100644
index 0000000..7e97f17
--- /dev/null
+++ b/libajantv2-system-mbedtls.patch
@@ -0,0 +1,75 @@
+--- libajantv2-ntv2_17_1_3/ajantv2/CMakeLists.txt.orig	2024-11-26 23:20:59.000000000 +0100
++++ libajantv2-ntv2_17_1_3/ajantv2/CMakeLists.txt	2025-03-21 21:06:15.799265763 +0100
+@@ -52,49 +52,7 @@ if (AJANTV2_DISABLE_PLUGIN_LOAD)
+ else()
+     message(STATUS "NTV2 SDK will load signed 3rd-party plugins")
+ 
+-    set(MBEDTLS_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/mbedtls-install)
+-    set(MBEDTLS_INCLUDE_DIR ${MBEDTLS_INSTALL_DIR}/include)
+-    set(MBEDTLS_LIBRARY_DIR ${MBEDTLS_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR})
+-
+-    if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+-        set(MBEDTLS_LIBRARY ${MBEDTLS_LIBRARY_DIR}/mbedtls.lib)
+-        set(MBEDX509_LIBRARY ${MBEDTLS_LIBRARY_DIR}/mbedx509.lib)
+-        set(MBEDCRYPTO_LIBRARY ${MBEDTLS_LIBRARY_DIR}/mbedcrypto.lib)
+-        set(MBEDTLS_EXTRA_CONFIG_FLAGS
+-                "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON"
+-                "-DMSVC_STATIC_RUNTIME=ON"
+-                "-DCMAKE_MSVC_RUNTIME_LIBRARY=${CMAKE_MSVC_RUNTIME_LIBRARY}")
+-    elseif (CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin)$")
+-        set(MBEDTLS_LIBRARY ${MBEDTLS_LIBRARY_DIR}/libmbedtls.a)
+-        set(MBEDX509_LIBRARY ${MBEDTLS_LIBRARY_DIR}/libmbedx509.a)
+-        set(MBEDCRYPTO_LIBRARY ${MBEDTLS_LIBRARY_DIR}/libmbedcrypto.a)
+-        set(MBEDTLS_C_FLAGS -fPIC)
+-    endif()
+-
+-    # BUILD_BYPRODUCTS informing CMake where the .a files are located is required to make Ninja build work
+-    ExternalProject_Add(
+-        mbedtls
+-        GIT_REPOSITORY https://github.com/aja-video/mbedtls.git
+-        GIT_TAG fix-win-dll-cmake
+-        CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${MBEDTLS_INSTALL_DIR}
+-                    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+-                    -DENABLE_TESTING=OFF 
+-                    -DENABLE_PROGRAMS=OFF
+-                    -DCMAKE_C_FLAGS=${MBEDTLS_C_FLAGS}
+-                    -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
+-                    -DUSE_STATIC_MBEDTLS_LIBRARY=ON
+-                    -DUSE_SHARED_MBEDTLS_LIBRARY=OFF
+-                    ${MBEDTLS_EXTRA_CONFIG_FLAGS}
+-        BUILD_ALWAYS TRUE
+-        BUILD_BYPRODUCTS ${MBEDTLS_LIBRARY} ${MBEDX509_LIBRARY} ${MBEDCRYPTO_LIBRARY}
+-    )
+-
+-    list(APPEND TARGET_INCLUDE_DIRS
+-            ${MBEDTLS_INCLUDE_DIR})
+-    list(APPEND MBEDTLS_LINK_LIBS
+-            ${MBEDTLS_LIBRARY}
+-            ${MBEDCRYPTO_LIBRARY}
+-            ${MBEDX509_LIBRARY})
++    list(APPEND MBEDTLS_LINK_LIBS mbedtls mbedx509 mbedcrypto)
+ endif()
+ 
+ 
+@@ -627,10 +627,6 @@ if (NOT TARGET ${PROJECT_NAME})
+ 
+         add_library(${PROJECT_NAME} SHARED ${TARGET_SOURCES})
+         
+-        if (NOT AJANTV2_DISABLE_PLUGIN_LOAD)
+-            add_dependencies(${PROJECT_NAME} mbedtls)
+-        endif()
+-
+         target_compile_definitions(${PROJECT_NAME} PUBLIC
+             ${TARGET_COMPILE_DEFS_DYNAMIC}
+             ${AJANTV2_TARGET_COMPILE_DEFS})
+@@ -645,10 +641,6 @@ if (NOT TARGET ${PROJECT_NAME})
+ 
+         add_library(${PROJECT_NAME} STATIC ${TARGET_SOURCES})
+ 
+-        if (NOT AJANTV2_DISABLE_PLUGIN_LOAD)
+-            add_dependencies(${PROJECT_NAME} mbedtls)
+-        endif()
+-
+         target_compile_definitions(${PROJECT_NAME} PUBLIC
+             ${TARGET_COMPILE_DEFS_STATIC}
+             ${AJANTV2_TARGET_COMPILE_DEFS})
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libajantv2.git/commitdiff/bfa96fc07255a7f4c168402107912c33b9eb6527



More information about the pld-cvs-commit mailing list