logo

overlay

My own overlay for experimentations, use with caution, no support is provided
commit: fef017eafa918ec7320e362eddfd68990beb896b
parent: 88687e960f052a5f4eb4dd789aec0aa90e6b39c2
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri,  3 Jan 2020 00:35:02 +0100

media-plugins/gst-plugins-vaapi: Bump to 1.16.2

Diffstat:

Amedia-plugins/gst-plugins-dash/Manifest1+
Amedia-plugins/gst-plugins-dash/gst-plugins-dash-1.16.2.ebuild40++++++++++++++++++++++++++++++++++++++++
Amedia-plugins/gst-plugins-dash/metadata.xml8++++++++
Amedia-plugins/gst-plugins-vaapi/Manifest1+
Amedia-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.16.2.ebuild110+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amedia-plugins/gst-plugins-vaapi/metadata.xml13+++++++++++++
6 files changed, 173 insertions(+), 0 deletions(-)

diff --git a/media-plugins/gst-plugins-dash/Manifest b/media-plugins/gst-plugins-dash/Manifest @@ -0,0 +1 @@ +DIST gst-plugins-bad-1.16.2.tar.xz 4887812 BLAKE2B edf10aeb365d9a7cf4b5172af29b46cff4c7a49a3e4dde881469f5738b5a525eb51a6f70bb1dd6f680e4e48977d65769ac8e8f41d914b7ce7719b9fa260a7bd4 SHA512 aeaf3388156fe7317e193a3f940d391a6d8a1187f93e6925cee4cb02c4e78d9b456c22c27c318f0f9b2212ca68887c5cdcc256adaf068bfab8ec5c091a1e8805 diff --git a/media-plugins/gst-plugins-dash/gst-plugins-dash-1.16.2.ebuild b/media-plugins/gst-plugins-dash/gst-plugins-dash-1.16.2.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +GST_ORG_MODULE=gst-plugins-bad + +inherit gstreamer + +DESCRIPTION="MPEG-DASH plugin for GStreamer" +KEYWORDS="amd64 x86" +IUSE="" + +RDEPEND=">=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND}" + +src_prepare() { + default + + # FIXME: gsturidownloader does not have a .pc + # gstreamer_system_link \ + # gst-libs/gst/uridownloader:gsturidownloader \ + # gst-libs/gst/adaptivedemux:gstadaptivedemux \ + # gst-libs/gst/isoff:gstisoff + + local directory libs + directory="gst-libs/gst/uridownloader" + libs="-lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -lgsturidownloader-1.0" + sed -e "s:\$(top_builddir)/${directory}/.*\.la:${libs}:" \ + -i ext/dash/Makefile.{am,in} || die + + directory="gst-libs/gst/adaptivedemux" + libs="-lgsturidownloader-1.0 -lgstapp-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -lgstadaptivedemux-1.0" + sed -e "s:\$(top_builddir)/${directory}/.*\.la:${libs}:" \ + -i ext/dash/Makefile.{am,in} || die + + directory="gst-libs/gst/isoff" + libs="-lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -lgstisoff-1.0" + sed -e "s:\$(top_builddir)/${directory}/.*\.la:${libs}:" \ + -i ext/dash/Makefile.{am,in} || die +} diff --git a/media-plugins/gst-plugins-dash/metadata.xml b/media-plugins/gst-plugins-dash/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>contact@hacktivis.me</email> + <name>Haelwenn (lanodan) Monnier</name> + </maintainer> +</pkgmetadata> diff --git a/media-plugins/gst-plugins-vaapi/Manifest b/media-plugins/gst-plugins-vaapi/Manifest @@ -0,0 +1 @@ +DIST gstreamer-vaapi-1.16.2.tar.xz 1095012 BLAKE2B 5bf3d34db429d180dfc09cfeccab32f57f7fdad9d05e27ac1aab2ea89e1b14442d4bdb4fd768408b9aee25a117232081adb28447b252c5d553da9d9e0f5b8676 SHA512 61554b5496dca595fa6e278a5634112e225784e9f0a7e731800fd04b395ba4e11dc467b8d074cb8cfed182fa9b9511c104192aecbba3ac755a4c32372061ac9f diff --git a/media-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.16.2.ebuild b/media-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.16.2.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit multilib-minimal + +MY_PN="gstreamer-vaapi" +DESCRIPTION="Hardware accelerated video decoding through VA-API plugin for GStreamer" +HOMEPAGE="https://cgit.freedesktop.org/gstreamer/gstreamer-vaapi" +SRC_URI="https://gstreamer.freedesktop.org/src/${MY_PN}/${MY_PN}-${PV}.tar.xz" + +LICENSE="LGPL-2.1+" +SLOT="1.0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="+drm +egl gles2 +opengl wayland +X" # Keep default enabled IUSE in sync with gst-plugins-base and libva + +# gst-vaapi configure is based around GL platform mainly, unlike gst-plugins-bad that goes by GL API mainly; for less surprises, +# 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 +# enable opengl support at all and choices get chained from there. +# One or multiple video output are required: drm, x11, glx, egl and/or wayland; +# but GL API is our main trigger, thus USE=egl should be ineffective if neither gles2 or opengl is enabled; +# 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. +# 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. +# gles2 API only supported windowing system (on linux) is EGL, so require it +# opengl API only supported windowing systems (on linux) are EGL and GLX, so require one of them (glx is enabled with USE="opengl X") +REQUIRED_USE=" + || ( drm gles2 opengl wayland X ) + gles2? ( egl ) + opengl? ( || ( egl X ) ) +" + +# glx doesn't require libva-glx (libva[opengl]) afaics, only by tests/test-display.c +# USE flag behavior: +# 'drm' enables vaapi drm support +# 'egl' enables EGL platform support (but only if also 'opengl||gles2') +# - '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; +# 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. +# 'gles2' enables GLESv2 or GLESv3 based GL API support +# 'opengl' enables desktop OpenGL based GL API support +# 'wayland' enables non-GL Wayland support; wayland EGL support when combined with 'egl' (but only if also 'opengl||gles2') +# 'X' enables non-GL X support; GLX support when combined with 'opengl' +# gst-plugins-bad still needed for codecparsers (GL libraries moved to -base); checked for 1.14 (recheck for 1.16) +GST_REQ="${PV}" +GL_DEPS=" + >=media-libs/gst-plugins-base-${GST_REQ}:${SLOT}[egl?,gles2?,opengl?,wayland?,X?] + media-libs/mesa[gles2?,egl?,X(+),${MULTILIB_USEDEP}] +" +RDEPEND=" + >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}] + >=media-libs/gstreamer-${GST_REQ}:${SLOT}[${MULTILIB_USEDEP}] + >=media-libs/gst-plugins-base-${GST_REQ}:${SLOT}[${MULTILIB_USEDEP}] + >=media-libs/gst-plugins-bad-${GST_REQ}:${SLOT}[${MULTILIB_USEDEP}] + >=x11-libs/libva-1.4.0:=[drm?,wayland?,X?,${MULTILIB_USEDEP}] + drm? ( + >=virtual/libudev-208:=[${MULTILIB_USEDEP}] + >=x11-libs/libdrm-2.4.46[${MULTILIB_USEDEP}] + ) + gles2? ( ${GL_DEPS} ) + opengl? ( ${GL_DEPS} ) + wayland? ( >=dev-libs/wayland-1.11.0[${MULTILIB_USEDEP}] ) + X? ( + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] + >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}] + x11-libs/libXrender[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND} + >=dev-util/gtk-doc-am-1.12 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] +" + +S="${WORKDIR}/${MY_PN}-${PV}" + +multilib_src_configure() { + local myconf=() + if use opengl || use gles2; then + myconf+=( + $(use_enable egl) + --with-glapi=$(usex opengl 'gl,' '')$(usex gles2 'gles2,gles3' '') # It's fine to have extra commas passed + ) + else + myconf+=( + --disable-egl + --without-glapi + ) + fi + + if use opengl && use X; then + myconf+=( --enable-glx ) + else + myconf+=( --disable-glx ) + fi + + ECONF_SOURCE=${S} \ + econf \ + --disable-static \ + --disable-debug \ + --disable-examples \ + --enable-encoders \ + $(use_enable drm) \ + $(use_enable X x11) \ + $(use_enable wayland) \ + --without-gtk \ + "${myconf[@]}" +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -name '*.la' -delete || die +} diff --git a/media-plugins/gst-plugins-vaapi/metadata.xml b/media-plugins/gst-plugins-vaapi/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>contact@hacktivis.me</email> + <name>Haelwenn (lanodan) Monnier</name> + </maintainer> + <use> + <flag name="drm">Enable DRM renderer</flag> + <flag name="egl">Enable EGL support</flag> + <flag name="gles2">Enable GLESv2 and GLESv3 support</flag> + </use> +</pkgmetadata>