commit 186c7b0820e468af3cc14da23a4c81a554c73a99
Author: Jan Rękorajski <bagg...@pld-linux.org>
Date:   Sun Oct 15 14:22:08 2023 +0200

    - enable ffmpeg explicitely

 ffmpeg6.patch | 11 +++++++++++
 vtk.spec      | 24 +++++++++++++++++++-----
 2 files changed, 30 insertions(+), 5 deletions(-)
---
diff --git a/vtk.spec b/vtk.spec
index 78d2d42..ea5971f 100644
--- a/vtk.spec
+++ b/vtk.spec
@@ -35,6 +35,7 @@ Source1:      
https://www.vtk.org/files/release/9.2/VTKData-%{version}.tar.gz
 # Source1-md5: 159bcc3d94aa8e40fba6f28f2db34ac7
 Patch0:                stdcpp.patch
 Patch1:                proj6-bad-test.patch
+Patch2:                ffmpeg6.patch
 URL:           https://vtk.org/
 %{?with_OSMesa:BuildRequires: Mesa-libOSMesa-devel}
 BuildRequires: OpenGL-GLX-devel
@@ -309,6 +310,7 @@ potrzebne do uruchamiania różnych przykładów z pakietu 
vtk-examples.
 %setup -q -n VTK-%{version} -b 1
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 # Replace relative path ../../../VTKData with destination filesystem path
 grep -Erl '(\.\./)+VTKData' Examples | xargs \
@@ -395,6 +397,12 @@ cd build
        -DVTK_MODULE_USE_EXTERNAL_VTK_cli11:BOOL=OFF \
        %{!?with_system_fmt:-DVTK_MODULE_USE_EXTERNAL_VTK_fmt:BOOL=OFF} \
        %{!?with_system_gl2ps:-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps:BOOL=OFF} \
+%if %{with ffmpeg}
+       -DVTK_MODULE_ENABLE_VTK_IOFFMPEG:STRING=YES \
+       -DVTK_MODULE_ENABLE_VTK_RenderingFFMPEGOpenGL2:STRING=YES \
+%else
+       -DVTK_MODULE_ENABLE_VTK_IOFFMPEG:STRING=NO \
+%endif
 %if %{with java}
        -DVTK_WRAP_JAVA:BOOL=ON \
        -DJAVA_INCLUDE_PATH:PATH=$JAVA_HOME/include \
@@ -430,11 +438,6 @@ for f in build/bin/*Tests build/bin/Test*; do
        install $f $RPM_BUILD_ROOT%{_bindir}
 done
 
-#install -p build/bin/vtkpython $RPM_BUILD_ROOT%{_bindir}
-
-# unwanted doxygen files
-%{?with_doc:%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/vtk*/doxygen}
-
 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
 
 %clean
@@ -544,6 +547,10 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %ghost %{_libdir}/libvtkIOExport.so.1
 %attr(755,root,root) %{_libdir}/libvtkIOExportPDF.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libvtkIOExportPDF.so.1
+%if %{with ffmpeg}
+%attr(755,root,root) %{_libdir}/libvtkIOFFMPEG.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libvtkIOFFMPEG.so.1
+%endif
 %attr(755,root,root) %{_libdir}/libvtkIOGeometry.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libvtkIOGeometry.so.1
 %attr(755,root,root) %{_libdir}/libvtkIOImage.so.*.*.*
@@ -626,6 +633,10 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %ghost %{_libdir}/libvtkRenderingCore.so.1
 %attr(755,root,root) %{_libdir}/libvtkRenderingFreeType.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libvtkRenderingFreeType.so.1
+%if %{with ffmpeg}
+%attr(755,root,root) %{_libdir}/libvtkRenderingFFMPEGOpenGL2.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libvtkRenderingFFMPEGOpenGL2.so.1
+%endif
 %attr(755,root,root) %{_libdir}/libvtkRenderingGL2PSOpenGL2.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libvtkRenderingGL2PSOpenGL2.so.1
 %attr(755,root,root) %{_libdir}/libvtkRenderingImage.so.*.*.*
@@ -719,6 +730,7 @@ rm -rf $RPM_BUILD_ROOT
 %files devel
 %defattr(644,root,root,755)
 %doc Utilities/Upgrading/*
+%{?with_doc:%doc %{_docdir}/vtk}
 %attr(755,root,root) %{_bindir}/vtkProbeOpenGLVersion
 %attr(755,root,root) %{_bindir}/vtkWrapHierarchy
 %attr(755,root,root) %{_libdir}/libvtkChartsCore.so
@@ -786,6 +798,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libvtkIOExportGL2PS.so
 %attr(755,root,root) %{_libdir}/libvtkIOExportPDF.so
 %attr(755,root,root) %{_libdir}/libvtkIOExport.so
+%{?with_ffmpeg:%attr(755,root,root) %{_libdir}/libvtkIOFFMPEG.so}
 %attr(755,root,root) %{_libdir}/libvtkIOGeometry.so
 %attr(755,root,root) %{_libdir}/libvtkIOHDF.so
 %attr(755,root,root) %{_libdir}/libvtkIOImage.so
@@ -817,6 +830,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libvtkRenderingContextOpenGL2.so
 %attr(755,root,root) %{_libdir}/libvtkRenderingCore.so
 %attr(755,root,root) %{_libdir}/libvtkRenderingFreeType.so
+%{?with_ffmpeg:%attr(755,root,root) %{_libdir}/libvtkRenderingFFMPEGOpenGL2.so}
 %attr(755,root,root) %{_libdir}/libvtkRenderingGL2PSOpenGL2.so
 %attr(755,root,root) %{_libdir}/libvtkRenderingHyperTreeGrid.so
 %attr(755,root,root) %{_libdir}/libvtkRenderingImage.so
diff --git a/ffmpeg6.patch b/ffmpeg6.patch
new file mode 100644
index 0000000..78b669c
--- /dev/null
+++ b/ffmpeg6.patch
@@ -0,0 +1,11 @@
+--- VTK-9.2.6/IO/FFMPEG/CMakeLists.txt~        2023-02-15 05:03:53.000000000 
+0100
++++ VTK-9.2.6/IO/FFMPEG/CMakeLists.txt 2023-10-15 13:24:47.450115460 +0200
+@@ -24,7 +24,7 @@
+ endif ()
+ 
+ set(ffmpeg_libraries)
+-if (NOT FFMPEG_VERSION VERSION_LESS "5.0")
++if (NOT FFMPEG_VERSION VERSION_LESS "6.0")
+   if (NOT FFMPEG_swresample_FOUND)
+     message(FATAL_ERROR
+       "FFMPEG 5.0 requires the `swresample` library.")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vtk.git/commitdiff/186c7b0820e468af3cc14da23a4c81a554c73a99

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to