diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..062ee0d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/intel-mediasdk-19.3.0.tar.gz diff --git a/intel-mediasdk-no-icd.patch b/intel-mediasdk-no-icd.patch new file mode 100644 index 0000000..cc26ece --- /dev/null +++ b/intel-mediasdk-no-icd.patch @@ -0,0 +1,17 @@ +diff -up MediaSDK-intel-mediasdk-19.3.0/builder/FindOpenCL.cmake.no-icd MediaSDK-intel-mediasdk-19.3.0/builder/FindOpenCL.cmake +--- MediaSDK-intel-mediasdk-19.3.0/builder/FindOpenCL.cmake.no-icd 2019-09-30 16:51:56.000000000 +0200 ++++ MediaSDK-intel-mediasdk-19.3.0/builder/FindOpenCL.cmake 2019-10-11 13:38:03.003392957 +0200 +@@ -25,13 +25,11 @@ set( OCL_LIBS "" ) + + if ( NOT OPENCL_INCLUDE MATCHES NOTFOUND ) + if ( NOT OPENCL_LIBRARY MATCHES NOTFOUND ) +- if ( EXISTS /etc/OpenCL/vendors/intel.icd ) + set ( OPENCL_FOUND TRUE ) + + get_filename_component( OPENCL_LIBRARY_PATH ${OPENCL_LIBRARY} PATH ) + + list( APPEND OPENCL_LIBS OpenCL ) +- endif() + endif() + endif() + diff --git a/intel-mediasdk.spec b/intel-mediasdk.spec new file mode 100644 index 0000000..a3af0c0 --- /dev/null +++ b/intel-mediasdk.spec @@ -0,0 +1,109 @@ +%global mfx_abi 1 +%global mfx_version %{mfx_abi}.30 + +Summary: Hardware-accelerated video processing on Intel integrated GPUs library +Name: intel-mediasdk +Version: 19.3.0 +Release: 2%{?dist} +URL: http://mediasdk.intel.com +Source0: https://github.com/Intel-Media-SDK/MediaSDK/archive/%{name}-%{version}.tar.gz +# don't require Intel ICD at build time +Patch0: %{name}-no-icd.patch +License: MIT +ExclusiveArch: x86_64 +BuildRequires: cmake3 +BuildRequires: gcc-c++ +BuildRequires: gmock-devel +BuildRequires: libdrm-devel +BuildRequires: libpciaccess-devel +BuildRequires: libva-devel +BuildRequires: libX11-devel +BuildRequires: ocl-icd-devel +BuildRequires: wayland-devel +Obsoletes: libmfx < %{mfx_version} +Provides: libmfx = %{mfx_version} +Provides: libmfx%{_isa} = %{mfx_version} + +%global __provides_exclude_from ^%{_libdir}/mfx/libmfx_.*\\.so$ + +%description +Intel Media SDK provides a plain C API to access hardware-accelerated video +decode, encode and filtering on Intel Gen graphics hardware platforms. +Implementation written in C++ 11 with parts in C-for-Media (CM). + +Supported video encoders: HEVC, AVC, MPEG-2, JPEG, VP9 Supported video decoders: +HEVC, AVC, VP8, VP9, MPEG-2, VC1, JPEG Supported video pre-processing filters: +Color Conversion, Deinterlace, Denoise, Resize, Rotate, Composition + +%package devel +Summary: SDK for hardware-accelerated video processing on Intel integrated GPUs +Provides: libmfx-devel = %{mfx_version} +Provides: libmfx%{_isa}-devel = %{mfx_version} +Requires: %{name}%{_isa} = %{version}-%{release} + +%description devel +Intel Media SDK provides a plain C API to access hardware-accelerated video +decode, encode and filtering on Intel Gen graphics hardware platforms. +Implementation written in C++ 11 with parts in C-for-Media (CM). + +Supported video encoders: HEVC, AVC, MPEG-2, JPEG, VP9 Supported video decoders: +HEVC, AVC, VP8, VP9, MPEG-2, VC1, JPEG Supported video pre-processing filters: +Color Conversion, Deinterlace, Denoise, Resize, Rotate, Composition + +%prep +%setup -q -n MediaSDK-%{name}-%{version} +%patch0 -p1 -b .no-icd +mkdir build + +%build +pushd build +%cmake3 \ + -DBUILD_DISPATCHER=ON \ + -DBUILD_SAMPLES=OFF \ + -DBUILD_TESTS=ON \ + -DBUILD_TOOLS=OFF \ + -DENABLE_OPENCL=ON \ + -DENABLE_WAYLAND=ON \ + -DENABLE_X11=ON \ + -DENABLE_X11_DRI3=ON \ + -DUSE_SYSTEM_GTEST=ON \ + .. +%make_build +popd + +%install +pushd build +%make_install +popd + +%check +pushd build +%make_build test +popd + +%files +%license LICENSE +%doc CHANGELOG.md CONTRIBUTING.md README.md +%{_libdir}/libmfx.so.%{mfx_abi} +%{_libdir}/libmfx.so.%{mfx_version} +%{_libdir}/libmfxhw64.so.%{mfx_abi} +%{_libdir}/libmfxhw64.so.%{mfx_version} +%{_libdir}/mfx/libmfx_*_hw64.so +%{_datadir}/mfx/plugins.cfg + +%files devel +%dir %{_includedir}/mfx +%{_includedir}/mfx/mfx*.h +%{_libdir}/libmfx.so +%{_libdir}/libmfxhw64.so +%{_libdir}/pkgconfig/libmfx.pc +%{_libdir}/pkgconfig/libmfxhw64.pc +%{_libdir}/pkgconfig/mfx.pc + +%changelog +* Sat Nov 09 2019 Dominik Mierzejewski 19.3.0-2 +- Add missing Obsoletes: and Requires: +- Add license text and docs + +* Fri Oct 11 2019 Dominik Mierzejewski 19.3.0-1 +- initial build diff --git a/sources b/sources new file mode 100644 index 0000000..7ad579b --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (intel-mediasdk-19.3.0.tar.gz) = 4a2ff2347a2b178aced351d8528536a4dae073cb9e81025dcccbf37a88e88560df2ada704805f5b1825f5b528d0ffc9a464b661e0a3da37486fb12335700f5ab