gst-plugins-base-1.18.0-r1.ebuild (5856B)
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 GST_ORG_MODULE="gst-plugins-base"
6
7 # List done from editing meson_options.txt in app-editors/vis
8 # - Get only the ones with no-external deps (nicely in their own block)
9 # - :x/option\('([^']*)'.*/ c/\1/
10 # - Press J
11 GST_PLUGINS_BUILD="adder app audioconvert audiomixer audiorate audioresample audiotestsrc compositor encoding gio gio-typefinder overlaycomposition pbtypes playback rawparse subparse tcp typefind videoconvert videorate videoscale videotestsrc volume"
12
13 inherit flag-o-matic gstreamer-meson
14
15 DESCRIPTION="Basepack of plugins for gstreamer"
16 HOMEPAGE="https://gstreamer.freedesktop.org/"
17
18 LICENSE="GPL-2+ LGPL-2+"
19 #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
20
21 # For OpenGL we have three separate concepts, with a list of possibilities in each:
22 # * 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
23 # * 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.
24 # * 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
25 # With the following limitations:
26 # * 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
27 # * If opengl and/or gles2 is enabled, a windowing system has to be enabled - x11, wayland or gbm in our case
28 # * glx platform requires opengl API
29 # * wayland, gbm and most other non-glx WSIs require egl platform
30 # Additionally there is optional dmabuf support with egl for additional dmabuf based upload/download/eglimage options;
31 # and optional graphene usage for gltransformation and glvideoflip elements and more GLSL Uniforms support in glshader;
32 # and libpng/jpeg are required for gloverlay element;
33
34 # Keep default IUSE options for relevant ones mirrored with gst-plugins-gtk and gst-plugins-bad
35 IUSE="alsa +egl gbm gles2 +introspection ivorbis +ogg +opengl +orc +pango theora +vorbis wayland +X"
36 GL_REQUIRED_USE="
37 || ( gbm wayland X )
38 wayland? ( egl )
39 gbm? ( egl )
40 "
41 REQUIRED_USE="
42 ivorbis? ( ogg )
43 theora? ( ogg )
44 vorbis? ( ogg )
45 opengl? ( || ( egl X ) ${GL_REQUIRED_USE} )
46 gles2? ( egl ${GL_REQUIRED_USE} )
47 "
48
49 # Dependencies needed by opengl library and plugin (enabled via USE gles2 and/or opengl)
50 # 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
51 GL_DEPS="
52 >=media-libs/mesa-9.0[egl?,gbm?,gles2?,wayland?,${MULTILIB_USEDEP}]
53 egl? (
54 x11-libs/libdrm
55 )
56 gbm? (
57 >=dev-libs/libgudev-147[${MULTILIB_USEDEP}]
58 >=x11-libs/libdrm-2.4.55[${MULTILIB_USEDEP}]
59 )
60 wayland? (
61 dev-libs/wayland[${MULTILIB_USEDEP}]
62 )
63
64 media-libs/libpng:0[${MULTILIB_USEDEP}]
65 virtual/jpeg:0[${MULTILIB_USEDEP}]
66 " # graphene for optional gltransformation and glvideoflip elements and more GLSL Uniforms support in glshader; libpng/jpeg for gloverlay element
67 # >=media-libs/graphene-1.4.0[${MULTILIB_USEDEP}]
68
69 RDEPEND="
70 app-text/iso-codes
71 >=dev-libs/glib-2.40.0:2[${MULTILIB_USEDEP}]
72 >=media-libs/gstreamer-${PV}:1.0[introspection?,${MULTILIB_USEDEP}]
73 >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
74 alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
75 introspection? ( >=dev-libs/gobject-introspection-1.31.1:= )
76 ivorbis? ( >=media-libs/tremor-0_pre20130223[${MULTILIB_USEDEP}] )
77 ogg? ( >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )
78 orc? ( >=dev-lang/orc-0.4.24[${MULTILIB_USEDEP}] )
79 pango? ( >=x11-libs/pango-1.36.3[${MULTILIB_USEDEP}] )
80 theora? ( >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] )
81 vorbis? ( >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] )
82 X? (
83 >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
84 >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
85 >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
86 )
87
88 gles2? ( ${GL_DEPS} )
89 opengl? ( ${GL_DEPS} )
90
91 !<media-libs/gst-plugins-bad-1.15.0:1.0
92 "
93 DEPEND="${RDEPEND}
94 dev-util/glib-utils
95 >=dev-util/gtk-doc-am-1.12
96 X? ( x11-base/xorg-proto )
97 "
98
99 DOCS="AUTHORS NEWS README RELEASE"
100
101 multilib_src_configure() {
102 filter-flags -mno-sse -mno-sse2 -mno-sse4.1 #610340
103
104 gstreamer_environment_reset
105
106 # opus: split to media-plugins/gst-plugins-opus
107 local emesonargs=(
108 -Dexamples=disabled
109 -Dpackage-name="Gentoo GStreamer ebuild"
110 -Dpackage-origin="https://www.gentoo.org"
111 -Dopus=disabled
112
113 $(meson_feature alsa)
114 $(meson_feature ogg)
115 $(meson_feature orc)
116 $(meson_feature pango)
117 $(meson_feature theora)
118 $(meson_feature vorbis)
119 $(meson_feature X x11)
120 $(meson_feature X xshm)
121 $(meson_feature X xvideo)
122 )
123
124 if use opengl || use gles2; then
125 # because meson doesn't likes extraneous commas
126 local gl_platform=( $(use X && echo glx) $(use egl && echo egl) )
127 local gl_winsys=(
128 $(use X && echo x11)
129 $(use wayland && echo wayland)
130 $(use egl && echo egl)
131 $(use gbm && echo gbm)
132 )
133
134 emesonargs+=(
135 -Dgl=enabled
136 -Dgl_api=opengl$(use gles2 && echo ,gles2)
137 -Dgl_platform=$(IFS=, ; echo "${gl_platform[*]}")
138 -Dgl_winsys=$(IFS=, ; echo "${gl_winsys[*]}")
139 )
140 else
141 emesonargs+=(
142 -Dgl=disabled
143 -Dgl_api=
144 -Dgl_platform=
145 -Dgl_winsys=
146 )
147 fi
148
149 gstreamer_multilib_src_configure
150 }