app-admin/awscli: Bump to 1.37.9
[gentoo/gentoo.git] / media-libs / gst-plugins-base / gst-plugins-base-1.24.11.ebuild
bloba0f53734c41e35c8d00646ce998d6cc9d346fae6
1 # Copyright 1999-2025 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
5 GST_ORG_MODULE="gst-plugins-base"
7 inherit flag-o-matic gstreamer-meson
9 DESCRIPTION="Basepack of plugins for gstreamer"
10 HOMEPAGE="https://gstreamer.freedesktop.org/"
12 LICENSE="GPL-2+ LGPL-2+"
13 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
15 # For OpenGL we have three separate concepts, with a list of possibilities in each:
16 #  * opengl APIs - opengl and/or gles2; USE=opengl and USE=gles2 enable these accordingly; if neither is enabled, OpenGL helper library and elements are not built at all and all the other options aren't relevant
17 #  * opengl platforms - glx and/or egl; also cgl, wgl, eagl for non-linux; USE="X opengl" enables glx platform; USE="egl" enables egl platform. Rest is up for relevant prefix teams.
18 #  * opengl windowing system - x11, wayland, win32, cocoa, android, viv_fb, gbm and/or dispmanx; USE=X enables x11 (but for WSI it's automagic - FIXME), USE=wayland enables wayland, USE=gbm enables gbm (automagic upstream - FIXME); rest is up for relevant prefix/arch teams/contributors to test and provide patches
19 # With the following limitations:
20 #  * If opengl and/or gles2 is enabled, a platform has to be enabled - x11 or egl in our case, but x11 (glx) is acceptable only with opengl
21 #  * If opengl and/or gles2 is enabled, a windowing system has to be enabled - x11, wayland or gbm in our case
22 #  * glx platform requires opengl API (but we don't REQUIRED_USE that as USE=X is common, glx is just disabled with USE=-opengl or USE=-X)
23 #  * wayland, gbm and most other non-glx WSIs require egl platform
24 # Additionally there is optional dmabuf support with egl for additional dmabuf based upload/download/eglimage options;
25 #  and optional graphene usage for gltransformation and glvideoflip elements and more GLSL Uniforms support in glshader;
26 #  and libpng/jpeg are required for gloverlay element;
28 # Keep default IUSE options for relevant ones mirrored with gst-plugins-gtk and gst-plugins-bad
29 IUSE="alsa +egl gbm +gles2 +introspection ivorbis +ogg opengl +orc +pango theora +vorbis wayland +X"
30 GL_REQUIRED_USE="
31         || ( gbm wayland X )
32         wayland? ( egl )
33         gbm? ( egl )
35 REQUIRED_USE="
36         ivorbis? ( ogg )
37         theora? ( ogg )
38         vorbis? ( ogg )
39         opengl? ( || ( egl X ) ${GL_REQUIRED_USE} )
40         gles2? ( egl ${GL_REQUIRED_USE} )
43 # Dependencies needed by opengl library and plugin (enabled via USE gles2 and/or opengl)
44 # dmabuf automagic from libdrm headers (drm_fourcc.h) and EGL, so ensure it with USE=egl (platform independent header used only, thus no MULTILIB_USEDEP); provides dmabuf based upload/download/eglimage options
45 GL_DEPS="
46         || (
47                 >=media-libs/mesa-24.1.0_rc1[opengl,wayland?,${MULTILIB_USEDEP}]
48                 <media-libs/mesa-24.1.0_rc1[egl(+)?,gbm(+)?,gles2?,wayland?,${MULTILIB_USEDEP}]
49         )
50         egl? (
51                 x11-libs/libdrm
52         )
53         gbm? (
54                 >=dev-libs/libgudev-147[${MULTILIB_USEDEP}]
55                 >=x11-libs/libdrm-2.4.55[${MULTILIB_USEDEP}]
56         )
57         wayland? (
58                 >=dev-libs/wayland-1.20.0[${MULTILIB_USEDEP}]
59                 >=dev-libs/wayland-protocols-1.15
60         )
62         >=media-libs/graphene-1.4.0[${MULTILIB_USEDEP}]
63         media-libs/libpng:0[${MULTILIB_USEDEP}]
64         media-libs/libjpeg-turbo:0=[${MULTILIB_USEDEP}]
65 " # graphene for optional gltransformation and glvideoflip elements and more GLSL Uniforms support in glshader; libpng/jpeg for gloverlay element
66 # >=media-libs/graphene-1.4.0[${MULTILIB_USEDEP}]
68 RDEPEND="
69         app-text/iso-codes
70         >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
71         alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
72         introspection? ( >=dev-libs/gobject-introspection-1.31.1:= )
73         ivorbis? ( >=media-libs/tremor-0_pre20130223[${MULTILIB_USEDEP}] )
74         ogg? ( >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )
75         orc? ( >=dev-lang/orc-0.4.33[${MULTILIB_USEDEP}] )
76         kernel_linux? ( >=x11-libs/libdrm-2.4.55[${MULTILIB_USEDEP}] )
77         pango? ( >=x11-libs/pango-1.36.3[${MULTILIB_USEDEP}] )
78         theora? ( >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] )
79         vorbis? ( >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] )
80         X? (
81                 >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
82                 >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
83                 >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
84         )
86         gles2? ( ${GL_DEPS} )
87         opengl? ( ${GL_DEPS} )
89 DEPEND="${RDEPEND}
90         dev-util/glib-utils
91         X? ( x11-base/xorg-proto )
94 DOCS=( AUTHORS NEWS README.md RELEASE )
96 PATCHES=(
99 multilib_src_configure() {
100         filter-flags -mno-sse -mno-sse2 -mno-sse4.1 #610340
102         # opus: split to media-plugins/gst-plugins-opus
103         GST_PLUGINS_NOAUTO="alsa gl ogg pango theora vorbis x11 xshm xvideo"
105         local emesonargs=(
106                 -Dtools=enabled
108                 $(meson_feature alsa)
109                 $(meson_feature kernel_linux drm)
110                 $(meson_feature ogg)
111                 $(meson_feature pango)
112                 $(meson_feature theora)
113                 $(meson_feature vorbis)
114                 $(meson_feature X x11)
115                 $(meson_feature X xshm)
116                 $(meson_feature X xvideo)
117         )
119         if use opengl || use gles2; then
120                 # because meson doesn't like extraneous commas
121                 local gl_api=( $(use opengl && echo opengl) $(use gles2 && echo gles2) )
122                 local gl_platform=( $(use X && use opengl && echo glx) $(use egl && echo egl) )
123                 local gl_winsys=(
124                         $(use X && echo x11)
125                         $(use wayland && echo wayland)
126                         $(use egl && echo egl)
127                         $(use gbm && echo gbm)
128                 )
130                 emesonargs+=(
131                         -Dgl=enabled
132                         -Dgl-graphene=enabled
133                         -Dgl_api=$(IFS=, ; echo "${gl_api[*]}")
134                         -Dgl_platform=$(IFS=, ; echo "${gl_platform[*]}")
135                         -Dgl_winsys=$(IFS=, ; echo "${gl_winsys[*]}")
136                 )
137         else
138                 emesonargs+=(
139                         -Dgl=disabled
140                         -Dgl_api=
141                         -Dgl_platform=
142                         -Dgl_winsys=
143                 )
144         fi
146         # Workaround EGL/eglplatform.h being built with X11 present
147         use X || export CFLAGS="${CFLAGS} -DEGL_NO_X11"
149         gstreamer_multilib_src_configure