Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-plugins/gst-plugins-vaapi/
Date: Tue, 27 Aug 2019 21:30:32
Message-Id: 1566941410.b6d888360d3cb29617fe7209a5340f93eb9d5f56.leio@gentoo
1 commit: b6d888360d3cb29617fe7209a5340f93eb9d5f56
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 27 21:27:26 2019 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 27 21:30:10 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6d88836
7
8 media-plugins/gst-plugins-vaapi: bump to 1.14.5 for upstream bug fixes
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
11 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
12
13 media-plugins/gst-plugins-vaapi/Manifest | 1 +
14 .../gst-plugins-vaapi-1.14.5.ebuild | 110 +++++++++++++++++++++
15 2 files changed, 111 insertions(+)
16
17 diff --git a/media-plugins/gst-plugins-vaapi/Manifest b/media-plugins/gst-plugins-vaapi/Manifest
18 index 81d87f3f002..c0b345dffbb 100644
19 --- a/media-plugins/gst-plugins-vaapi/Manifest
20 +++ b/media-plugins/gst-plugins-vaapi/Manifest
21 @@ -1,2 +1,3 @@
22 DIST gstreamer-vaapi-1.14.1.tar.xz 1064992 BLAKE2B bae42e3cafc6d1e5799a8ef795f9e1f6a6ac60b6878aea1aed81550fd7e408c5104b5ea89d6e5f7535ac8d21fe5f14fccf061e15eb68a7c1c60c29ad4a4deabb SHA512 f1eecb61cb92439d93a47ac162a5cda8a456dbb205594f378e8adf98c45e4cd59553ccfd3bbcf1c6a568c6af5e7834bbfb0ea17610f0c7e7c9e268a4eeb5b020
23 DIST gstreamer-vaapi-1.14.3.tar.xz 1070536 BLAKE2B 7e3458702072d96acc31c1ac5c4ec9f23f6d618ba922884fb141a0897a04959da7f34c7abff7765f086357d3f8f7532a1582508d117c199f76338ebd3723c6ae SHA512 b89acf63c2900b0cd588cce1a06d959a4f8bbe929c237fce985d3cfce7b94d43a3317f06a42fa77e3ff790fff8a81c8bbeeed7ac797794e4cc3342f18faa69e3
24 +DIST gstreamer-vaapi-1.14.5.tar.xz 1068344 BLAKE2B b98363981dc7f111fc8c15188d31dea394b7f6cf300050b95d564b75020931a0f8690d11410f2d3d18d6649ef2ee290c933c3731b4bc3ca43bffb57a4c1bf542 SHA512 287df56ad9bb3fd0754b9f307082eb180c8f0b622e2c9436c5dcf2272a5fb620cb18970726d231688837d52cb169a10e98e14160e51fd82198c34ea612c0d60b
25
26 diff --git a/media-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.14.5.ebuild b/media-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.14.5.ebuild
27 new file mode 100644
28 index 00000000000..7212411033f
29 --- /dev/null
30 +++ b/media-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.14.5.ebuild
31 @@ -0,0 +1,110 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +inherit multilib-minimal
38 +
39 +MY_PN="gstreamer-vaapi"
40 +DESCRIPTION="Hardware accelerated video decoding through VA-API plugin for GStreamer"
41 +HOMEPAGE="https://cgit.freedesktop.org/gstreamer/gstreamer-vaapi"
42 +SRC_URI="https://gstreamer.freedesktop.org/src/${MY_PN}/${MY_PN}-${PV}.tar.xz"
43 +
44 +LICENSE="LGPL-2.1+"
45 +SLOT="1.0"
46 +KEYWORDS="~amd64 ~arm64 ~x86"
47 +IUSE="+drm +egl gles2 +opengl wayland +X" # Keep default enabled IUSE in sync with gst-plugins-base and libva
48 +
49 +# gst-vaapi configure is based around GL platform mainly, unlike gst-plugins-bad that goes by GL API mainly; for less surprises,
50 +# we design gst-vaapi ebuild in terms of GL API as main choice as well, meaning that USE opengl and/or gles2 is required to
51 +# enable opengl support at all and choices get chained from there.
52 +# One or multiple video output are required: drm, x11, glx, egl and/or wayland;
53 +# but GL API is our main trigger, thus USE=egl should be ineffective if neither gles2 or opengl is enabled;
54 +# So "|| ( drm egl opengl wayland X )" would be wrong, because egl isn't built with USE="egl -opengl -gles2", ending up with no video outputs.
55 +# As we ensure at least one working GL output with other REQUIRED_USE, we can put gles2/opengl in REQUIRED_USE instead of egl, solving the issue.
56 +# gles2 API only supported windowing system (on linux) is EGL, so require it
57 +# opengl API only supported windowing systems (on linux) are EGL and GLX, so require one of them (glx is enabled with USE="opengl X")
58 +REQUIRED_USE="
59 + || ( drm gles2 opengl wayland X )
60 + gles2? ( egl )
61 + opengl? ( || ( egl X ) )
62 +"
63 +
64 +# glx doesn't require libva-glx (libva[opengl]) afaics, only by tests/test-display.c
65 +# USE flag behavior:
66 +# 'drm' enables vaapi drm support
67 +# 'egl' enables EGL platform support (but only if also 'opengl||gles2')
68 +# - 'egl' is exposed as a USE flag mainly to get EGL support instead of or in addition to GLX support with desktop GL while keeping it optional for pure GLX cases;
69 +# it's always required with USE=gles2, thus USE="gles2 opengl X" will require and build desktop GL EGL platform support as well on top of GLX, which doesn't add extra deps at that point.
70 +# 'gles2' enables GLESv2 or GLESv3 based GL API support
71 +# 'opengl' enables desktop OpenGL based GL API support
72 +# 'wayland' enables non-GL Wayland support; wayland EGL support when combined with 'egl' (but only if also 'opengl||gles2')
73 +# 'X' enables non-GL X support; GLX support when combined with 'opengl'
74 +# gst-plugins-bad still needed for codecparsers (GL libraries moved to -base); checked for 1.14 (recheck for 1.16)
75 +GST_REQ="${PV}"
76 +GL_DEPS="
77 + >=media-libs/gst-plugins-base-${GST_REQ}:${SLOT}[egl?,gles2?,opengl?,wayland?,X?]
78 + media-libs/mesa[gles2?,egl?,X(+),${MULTILIB_USEDEP}]
79 +"
80 +RDEPEND="
81 + >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
82 + >=media-libs/gstreamer-${GST_REQ}:${SLOT}[${MULTILIB_USEDEP}]
83 + >=media-libs/gst-plugins-base-${GST_REQ}:${SLOT}[${MULTILIB_USEDEP}]
84 + >=media-libs/gst-plugins-bad-${GST_REQ}:${SLOT}[${MULTILIB_USEDEP}]
85 + >=x11-libs/libva-1.4.0:=[drm?,wayland?,X?,${MULTILIB_USEDEP}]
86 + drm? (
87 + >=virtual/libudev-208:=[${MULTILIB_USEDEP}]
88 + >=x11-libs/libdrm-2.4.46[${MULTILIB_USEDEP}]
89 + )
90 + gles2? ( ${GL_DEPS} )
91 + opengl? ( ${GL_DEPS} )
92 + wayland? ( >=dev-libs/wayland-1.0.6[${MULTILIB_USEDEP}] )
93 + X? (
94 + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
95 + >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
96 + x11-libs/libXrender[${MULTILIB_USEDEP}] )
97 +"
98 +DEPEND="${RDEPEND}
99 + >=dev-util/gtk-doc-am-1.12
100 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
101 +"
102 +
103 +S="${WORKDIR}/${MY_PN}-${PV}"
104 +
105 +multilib_src_configure() {
106 + local myconf=()
107 + if use opengl || use gles2; then
108 + myconf+=(
109 + $(use_enable egl)
110 + --with-glapi=$(usex opengl 'gl,' '')$(usex gles2 'gles2,gles3' '') # It's fine to have extra commas passed
111 + )
112 + else
113 + myconf+=(
114 + --disable-egl
115 + --without-glapi
116 + )
117 + fi
118 +
119 + if use opengl && use X; then
120 + myconf+=( --enable-glx )
121 + else
122 + myconf+=( --disable-glx )
123 + fi
124 +
125 + ECONF_SOURCE=${S} \
126 + econf \
127 + --disable-static \
128 + --disable-debug \
129 + --disable-examples \
130 + --enable-encoders \
131 + $(use_enable drm) \
132 + $(use_enable X x11) \
133 + $(use_enable wayland) \
134 + --without-gtk \
135 + "${myconf[@]}"
136 +}
137 +
138 +multilib_src_install_all() {
139 + einstalldocs
140 + find "${ED}" -name '*.la' -delete || die
141 +}