import CS libva-2.20.0-1.el9

This commit is contained in:
eabdullin 2024-03-28 10:53:35 +00:00
parent db4947fa08
commit 78efcec1cd
4 changed files with 29 additions and 99 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libva-2.11.0.tar.gz
SOURCES/libva-2.20.0.tar.gz

View File

@ -1 +1 @@
f3cd6fb4b578435d8d67ab1caf8eaff8f55882d4 SOURCES/libva-2.11.0.tar.gz
4845b6e18b9ad0fd0713fe2aada837f0051960c9 SOURCES/libva-2.20.0.tar.gz

View File

@ -1,74 +0,0 @@
diff --git a/configure.ac b/configure.ac
index 878284d..9e2ba4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -214,21 +214,46 @@ AC_SEARCH_LIBS([dlopen], [dl], [], [
AC_MSG_ERROR([unable to find the dlopen() function])
])
-# Check for -fstack-protector
-ssp_cc=yes
+# Check for -fstack-protector and -fstack-protector-strong
+SSP_CC_FLAG=""
if test "X$CC-cc" != "X"; then
- AC_MSG_CHECKING([whether ${CC-cc} accepts -fstack-protector])
+ # Do not duplicate options in CFLAGS
+ ssp_sp_set=no
+ ssp_sps_set=no
+ for ssp_x in $CFLAGS; do
+ case "X$ssp_x" in
+ X-fstack-protector) ssp_sp_set=yes ;;
+ X-fstack-protector-strong) ssp_sps_set=yes ;;
+ esac
+ done
ssp_old_cflags="$CFLAGS"
- CFLAGS="$CFLAGS -fstack-protector"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[alloca(100);]])], [], [ssp_cc=no])
+ # Prefer -fstack-protector-strong over -fstack-protector
+ if test "X$ssp_sps_set" = "Xno"; then
+ SSP_CC_FLAG="-fstack-protector-strong"
+ fi
+ AC_MSG_CHECKING([whether ${CC-cc} accepts -fstack-protector-strong])
+ CFLAGS="$ssp_old_cflags $SSP_CC_FLAG"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[alloca(100);]])], [ssp_cc=yes], [ssp_cc=no])
AC_MSG_RESULT([$ssp_cc])
if test "X$ssp_cc" = "Xno"; then
- CFLAGS="$ssp_old_cflags"
- else
+ # Fallback to -fstack-protector
+ if test "X$ssp_sp_set" = "Xno"; then
+ SSP_CC_FLAG="-fstack-protector"
+ fi
+ AC_MSG_CHECKING([whether ${CC-cc} accepts -fstack-protector])
+ CFLAGS="$ssp_old_cflags $SSP_CC_FLAG"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[alloca(100);]])], [ssp_cc=yes], [ssp_cc=no])
+ AC_MSG_RESULT([$ssp_cc])
+ if test "X$ssp_cc" = "Xno"; then
+ SSP_CC_FLAG=""
+ fi
+ fi
+ CFLAGS="$ssp_old_cflags $SSP_CC_FLAG"
+ if test "X$ssp_cc" = "Xyes"; then
AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
fi
fi
-AM_CONDITIONAL(USE_SSP, test "$ssp_cc" = "yes")
+AC_SUBST(SSP_CC_FLAG)
# Check for DRM (mandatory)
LIBDRM_VERSION=libdrm_version
diff --git a/va/Makefile.am b/va/Makefile.am
index 0d8eff1..5ee49c4 100644
--- a/va/Makefile.am
+++ b/va/Makefile.am
@@ -83,9 +83,7 @@ libva_cflags = \
-Wall \
$(NULL)
-if USE_SSP
-libva_cflags += -fstack-protector
-endif
+libva_cflags += $(SSP_CC_FLAG)
lib_LTLIBRARIES = libva.la
libvaincludedir = ${includedir}/va

View File

@ -1,33 +1,33 @@
#global pre_release .pre1
Name: libva
Version: 2.11.0
Release: 5%{?dist}
Version: 2.20.0
Release: 1%{?dist}
Summary: Video Acceleration (VA) API for Linux
License: MIT
URL: https://github.com/intel/libva
Source0: %{url}/archive/%{version}%{?pre_release}/%{name}-%{version}%{?pre_release}.tar.gz
# Prefer -fstack-protector-strong over -fstack-protector
Patch0: libva-2.11.0-fstack-protector-strong.patch
BuildRequires: libtool
BuildRequires: meson
BuildRequires: gcc
BuildRequires: libudev-devel
%{!?_without_xorg:
BuildRequires: libXext-devel
BuildRequires: libXfixes-devel
}
BuildRequires: libdrm-devel
BuildRequires: libpciaccess-devel
BuildRequires: mesa-libEGL-devel
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libGLES-devel
%{!?_without_wayland:
BuildRequires: wayland-devel
BuildRequires: pkgconfig(wayland-client) >= 1
BuildRequires: pkgconfig(wayland-scanner) >= 1
BuildRequires: make
BuildRequires: wayland-devel
BuildRequires: pkgconfig(wayland-client) >= 1
BuildRequires: pkgconfig(wayland-scanner) >= 1
}
# owns the %%{_libdir}/dri directory
Requires: mesa-dri-filesystem
Requires: mesa-filesystem%{_isa}
%description
Libva is a library providing the VA API video acceleration API.
@ -35,7 +35,6 @@ Libva is a library providing the VA API video acceleration API.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{_isa} = %{version}-%{release}
Requires: pkgconfig
%description devel
The %{name}-devel package contains libraries and header files for
@ -44,22 +43,16 @@ developing applications that use %{name}.
%prep
%autosetup -p1 -n %{name}-%{version}%{?pre_release}
autoreconf -vif
%build
%configure --disable-static \
--enable-glx \
%{?_without_wayland:--disable-wayland}
%meson \
%{?_without_xorg: -Dwith_glx=no -Dwith_x11=no} \
%{?_without_wayland: -Dwith_wayland=no}
# remove rpath from libtool
sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_build
%meson_build
%install
%make_install INSTALL="install -p"
find %{buildroot} -regex ".*\.la$" | xargs rm -f --
%meson_install
%ldconfig_scriptlets
@ -67,7 +60,15 @@ find %{buildroot} -regex ".*\.la$" | xargs rm -f --
%doc NEWS
%license COPYING
%ghost %{_sysconfdir}/libva.conf
%{_libdir}/libva*.so.*
%{_libdir}/libva.so.2*
%{_libdir}/libva-drm.so.2*
%{!?_without_wayland:
%{_libdir}/libva-wayland.so.2*
}
%{!?_without_xorg:
%{_libdir}/libva-x11.so.2*
%{_libdir}/libva-glx.so.2*
}
%files devel
%{_includedir}/va
@ -75,6 +76,9 @@ find %{buildroot} -regex ".*\.la$" | xargs rm -f --
%{_libdir}/pkgconfig/libva*.pc
%changelog
* Tue Oct 24 2023 Than Ngo <than@redhat.com> - 2.20.0-1
- RHEL-6895, rebase to 2.20.0
* Tue Apr 26 2022 Jiri Kucera <jkucera@redhat.com> - 2.11.0-5
- Rebuild
Resolves: #2059006