Hello
I am trying to compile libva-utils package in CentOS 8. Since it is not available in CentOS 8 repo, I'm using EL7 package to compile it. But I don't know how to apply patches.
Steps I followed:
1. Downloaded srpm from
https://download-ib01.fedoraproject....-4.el7.src.rpm
2. Extracted it using command '
rpm2cpio libva-utils-1.8.3-4.el7.src.rpm | cpio -ivd'
3.Extracted files listing
Code:
ls -1
0001-vainfo-add-an-option-device-to-specify-a-drm-device.patch
0002-vainfo-Add-help-to-show-available-options.patch
libva-utils-1.8.3.tar.gz
libva-utils.spec
4. Contents of libva-utils.spec
Code:
Name: libva-utils
Version: 1.8.3
Release: 4%{?dist}
Summary: Tools for VAAPI (including vainfo)
License: MIT and BSD
URL: https://01.org/linuxmedia
Source0: https://github.com/01org/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: 0001-vainfo-add-an-option-device-to-specify-a-drm-device.patch
Patch1: 0002-vainfo-Add-help-to-show-available-options.patch
BuildRequires: libtool
BuildRequires: libXext-devel
BuildRequires: libXfixes-devel
BuildRequires: libdrm-devel
BuildRequires: libva-devel
%{?_with_wayland:
BuildRequires: wayland-devel
BuildRequires: pkgconfig(wayland-client) >= 1
BuildRequires: pkgconfig(wayland-scanner) >= 1
}
%description
The libva-utils package contains tools that are provided as part
of libva, including the vainfo tool for determining what (if any)
libva support is available on a system.
%prep
%autosetup -p1
autoreconf -vif
%build
%configure --disable-static \
%{!?_with_wayland:--disable-wayland}
%make_build
%install
%make_install INSTALL="install -p"
%files
%license COPYING
%doc CONTRIBUTING.md README.md
%{_bindir}/vainfo
%{_bindir}/loadjpeg
%{_bindir}/jpegenc
%{_bindir}/avcenc
%{_bindir}/h264encode
%{_bindir}/mpeg2vldemo
%{_bindir}/mpeg2vaenc
%{_bindir}/putsurface
%{?_with_wayland:%{_bindir}/putsurface_wayland}
5. According to libva-utils.spec file, installed these build prerequistes
Code:
# yum install libtool libXext-devel libXfixes-devel libdrm-devel libva-devel wayland-devel pkgconfig
6. Now I've to apply patch and compile the source. But I don't know how to apply patches as specified in point 4
I really appreciate if someone tells me how to apply those two .patch files
Thanks