From 6797ccb9fb80f8099bee8cdde68344f99ed1ae86 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 21 Oct 2024 18:52:29 -0400 Subject: media-libs/libva-intel-driver: Add patch to fix wayland Closes: https://bugs.gentoo.org/941253 Signed-off-by: Matt Turner --- .../files/2.4.1-Make-wl_drm-optional.patch | 52 ++++++++++++++++++ .../libva-intel-driver-2.4.1-r4.ebuild | 60 -------------------- .../libva-intel-driver-2.4.1-r5.ebuild | 64 ++++++++++++++++++++++ 3 files changed, 116 insertions(+), 60 deletions(-) create mode 100644 media-libs/libva-intel-driver/files/2.4.1-Make-wl_drm-optional.patch delete mode 100644 media-libs/libva-intel-driver/libva-intel-driver-2.4.1-r4.ebuild create mode 100644 media-libs/libva-intel-driver/libva-intel-driver-2.4.1-r5.ebuild (limited to 'media-libs') diff --git a/media-libs/libva-intel-driver/files/2.4.1-Make-wl_drm-optional.patch b/media-libs/libva-intel-driver/files/2.4.1-Make-wl_drm-optional.patch new file mode 100644 index 000000000000..4cc3ee2017c4 --- /dev/null +++ b/media-libs/libva-intel-driver/files/2.4.1-Make-wl_drm-optional.patch @@ -0,0 +1,52 @@ +https://bugs.gentoo.org/941253 +https://github.com/intel/intel-vaapi-driver/pull/566 + +From 1c3c43371d45e1d072faa9a5cd850c1722a06569 Mon Sep 17 00:00:00 2001 +From: Simon Ser +Date: Mon, 11 Mar 2024 23:48:17 +0100 +Subject: [PATCH] Make wl_drm optional + +Don't error out when vtable->wl_interface is NULL. + +Fetching wl_drm_interface from libEGL used to work but doesn't +anymore: it's now a private symbol (wayland-scanner private-code). +--- + src/i965_output_wayland.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/i965_output_wayland.c b/src/i965_output_wayland.c +index a6120b7..a002cae 100644 +--- a/src/i965_output_wayland.c ++++ b/src/i965_output_wayland.c +@@ -154,7 +154,7 @@ registry_handle_global( + struct va_wl_output * const wl_output = i965->wl_output; + struct wl_vtable * const wl_vtable = &wl_output->vtable; + +- if (strcmp(interface, "wl_drm") == 0) { ++ if (strcmp(interface, "wl_drm") == 0 && wl_vtable->drm_interface) { + wl_output->wl_drm_name = name; + wl_output->wl_drm = registry_bind(wl_vtable, wl_output->wl_registry, + name, wl_vtable->drm_interface, +@@ -472,6 +472,7 @@ i965_output_wayland_init(VADriverContextP ctx) + + wl_vtable = &i965->wl_output->vtable; + ++ /* drm_interface is optional */ + if (vtable->wl_interface) + wl_vtable->drm_interface = vtable->wl_interface; + else { +@@ -483,9 +484,8 @@ i965_output_wayland_init(VADriverContextP ctx) + } + + dso_handle = i965->wl_output->libegl_handle; +- if (!dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable), +- libegl_symbols)) +- goto error; ++ dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable), ++ libegl_symbols); + } + + i965->wl_output->libwl_client_handle = dso_open(LIBWAYLAND_CLIENT_NAME); +-- +2.45.2 + diff --git a/media-libs/libva-intel-driver/libva-intel-driver-2.4.1-r4.ebuild b/media-libs/libva-intel-driver/libva-intel-driver-2.4.1-r4.ebuild deleted file mode 100644 index 4a0de8f43ac2..000000000000 --- a/media-libs/libva-intel-driver/libva-intel-driver-2.4.1-r4.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -MY_PN="intel-vaapi-driver" -if [[ ${PV} = *9999* ]] ; then # Live ebuild - inherit git-r3 - EGIT_REPO_URI="https://github.com/intel/intel-vaapi-driver" -fi - -inherit autotools multilib-minimal - -DESCRIPTION="HW video decode support for Intel integrated graphics" -HOMEPAGE="https://github.com/intel/intel-vaapi-driver" -if [[ ${PV} != *9999* ]] ; then - SRC_URI="https://github.com/intel/${MY_PN}/releases/download/${PV}/${MY_PN}-${PV}.tar.bz2" - S="${WORKDIR}/${MY_PN}-${PV}" - KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux" -fi - -LICENSE="MIT" -SLOT="0" -IUSE="hybrid wayland X" -RESTRICT="test" # No tests - -RDEPEND=" - >=x11-libs/libdrm-2.4.52[video_cards_intel,${MULTILIB_USEDEP}] - >=media-libs/libva-2.4.0:=[X?,wayland?,${MULTILIB_USEDEP}] - - hybrid? ( - >=media-libs/intel-hybrid-codec-driver-2.0.0[X?,wayland?] - ) - - wayland? ( - >=dev-libs/wayland-1.11[${MULTILIB_USEDEP}] - >=media-libs/mesa-9.1.6[egl(+),${MULTILIB_USEDEP}] - ) -" -DEPEND="${RDEPEND}" -BDEPEND="virtual/pkgconfig" - -src_prepare() { - eapply_user - sed -e 's/intel-gen4asm/\0diSaBlEd/g' -i configure.ac || die - eautoreconf -} - -multilib_src_configure() { - local myconf=( - $(use_enable hybrid hybrid-codec) - $(use_enable wayland) - $(use_enable X x11) - ) - ECONF_SOURCE="${S}" econf "${myconf[@]}" -} - -multilib_src_install_all() { - find "${D}" -name "*.la" -delete || die -} diff --git a/media-libs/libva-intel-driver/libva-intel-driver-2.4.1-r5.ebuild b/media-libs/libva-intel-driver/libva-intel-driver-2.4.1-r5.ebuild new file mode 100644 index 000000000000..493e54089192 --- /dev/null +++ b/media-libs/libva-intel-driver/libva-intel-driver-2.4.1-r5.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PN="intel-vaapi-driver" +if [[ ${PV} = *9999* ]] ; then # Live ebuild + inherit git-r3 + EGIT_REPO_URI="https://github.com/intel/intel-vaapi-driver" +fi + +inherit autotools multilib-minimal + +DESCRIPTION="HW video decode support for Intel integrated graphics" +HOMEPAGE="https://github.com/intel/intel-vaapi-driver" +if [[ ${PV} != *9999* ]] ; then + SRC_URI="https://github.com/intel/${MY_PN}/releases/download/${PV}/${MY_PN}-${PV}.tar.bz2" + S="${WORKDIR}/${MY_PN}-${PV}" + KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="hybrid wayland X" +RESTRICT="test" # No tests + +RDEPEND=" + >=x11-libs/libdrm-2.4.52[video_cards_intel,${MULTILIB_USEDEP}] + >=media-libs/libva-2.4.0:=[X?,wayland?,${MULTILIB_USEDEP}] + + hybrid? ( + >=media-libs/intel-hybrid-codec-driver-2.0.0[X?,wayland?] + ) + + wayland? ( + >=dev-libs/wayland-1.11[${MULTILIB_USEDEP}] + >=media-libs/mesa-9.1.6[egl(+),${MULTILIB_USEDEP}] + ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PV}-Make-wl_drm-optional.patch +) + +src_prepare() { + eapply_user + sed -e 's/intel-gen4asm/\0diSaBlEd/g' -i configure.ac || die + eautoreconf +} + +multilib_src_configure() { + local myconf=( + $(use_enable hybrid hybrid-codec) + $(use_enable wayland) + $(use_enable X x11) + ) + ECONF_SOURCE="${S}" econf "${myconf[@]}" +} + +multilib_src_install_all() { + find "${D}" -name "*.la" -delete || die +} -- cgit v1.2.3-65-gdbad