commit:     0fef00f8da5ebfdab0d96471f9bb94bda61c2c45
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 20 20:16:39 2023 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Dec 20 20:23:09 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fef00f8

media-video/libva-utils: Version bump to 2.20.1

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 media-video/libva-utils/Manifest                  |  1 +
 media-video/libva-utils/libva-utils-2.20.1.ebuild | 91 +++++++++++++++++++++++
 2 files changed, 92 insertions(+)

diff --git a/media-video/libva-utils/Manifest b/media-video/libva-utils/Manifest
index b04413c7ad26..f592ae195cb3 100644
--- a/media-video/libva-utils/Manifest
+++ b/media-video/libva-utils/Manifest
@@ -1 +1,2 @@
 DIST libva-utils-2.20.0.tar.gz 1280967 BLAKE2B 
b4d80eb3301a27b9e9ea31edf77f0f6d0bad8660d350fbc0ce4502a5f09b613b7d71ded94c1ce94697c3d679f9b06c099ebce4bf6c57b0e02f92f14458a12787
 SHA512 
e0edf08f90fc5b360c0123cd77fcb125be289700e62e3d53c92312175e0ee082f3714af3784f4b087de1379bb384c1cfc0f5f881e5a9b31d4806bc3216eacbf0
+DIST libva-utils-2.20.1.tar.gz 1281764 BLAKE2B 
9561270811a3d9c314a1f3b73a363b1c7fdda2f38a45404a3e1760eb8ee2384288a589e7b6e001e902e8b9d5ee9611839eccec9a9a89fd5676670a5792e3d3ab
 SHA512 
65f7e03a242a520aae4f9e7ea16ea1c437d7915582a21287f23a05c246b92f1691be3e47d9d92cab9eb6eabb190ba77c6cd0bb3a5fec88898a33b352fc70b5a0

diff --git a/media-video/libva-utils/libva-utils-2.20.1.ebuild 
b/media-video/libva-utils/libva-utils-2.20.1.ebuild
new file mode 100644
index 000000000000..f2d6709a0a66
--- /dev/null
+++ b/media-video/libva-utils/libva-utils-2.20.1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson
+
+DESCRIPTION="Collection of utilities and tests for VA-API"
+HOMEPAGE="https://01.org/linuxmedia/vaapi";
+if [[ ${PV} = *9999 ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/intel/libva-utils";
+else
+       SRC_URI="https://github.com/intel/libva-utils/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="examples putsurface test +vainfo wayland X"
+RESTRICT="test" # Tests must be run manually
+
+REQUIRED_USE="
+       putsurface? ( || ( wayland X ) )
+       || ( examples putsurface test vainfo )
+"
+
+DEPEND="
+       x11-libs/libdrm
+       wayland? ( >=dev-libs/wayland-1.0.6 )
+       X? ( >=x11-libs/libX11-1.6.2 )
+"
+if [[ ${PV} = *9999 ]] ; then
+       DEPEND+="~media-libs/libva-${PV}:=[wayland?,X?]"
+else
+       DEPEND+=">=media-libs/libva-$(ver_cut 1-2).0:=[wayland?,X?]"
+fi
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+src_prepare() {
+       default
+
+       local sed_args=()
+
+       if ! use examples ; then
+               sed_args+=(
+                       -e "/^  subdir('decode')$/d"
+                       -e "/^  subdir('encode')$/d"
+                       -e "/^  subdir('videoprocess')$/d"
+                       -e "/^  subdir('vendor\/intel')$/d"
+                       -e "/^  subdir('vendor\/intel\/sfcsample')$/d"
+               )
+       fi
+
+       if ! use putsurface ; then
+               sed_args+=(-e "/^  subdir('putsurface')$/d")
+       fi
+
+       if ! use vainfo ; then
+               sed_args+=(-e "/^subdir('vainfo')$/d")
+       fi
+
+       if [[ ${#sed_args[@]} -gt 0 ]] ; then
+               sed "${sed_args[@]}" -i meson.build || die
+       fi
+}
+
+src_configure() {
+       local emesonargs=(
+               -Ddrm=true
+               $(meson_use X x11)
+               $(meson_use wayland)
+               $(meson_use test tests)
+       )
+       meson_src_configure
+}
+
+src_install() {
+       meson_src_install
+
+       if ! use test ; then
+               rm -f "${ED}"/usr/bin/test_va_api || die
+       fi
+}
+
+pkg_postinst() {
+       if use test ; then
+               elog "Tests must be run manually with the test_va_api binary"
+       fi
+}

Reply via email to