logo

overlay

My own overlay for experimentations, use with caution, no support is provided

gst-plugins-base-1.18.0-r0.ebuild (5411B)


      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 inherit flag-o-matic gstreamer-meson
      8 
      9 DESCRIPTION="Basepack of plugins for gstreamer"
     10 HOMEPAGE="https://gstreamer.freedesktop.org/"
     11 
     12 LICENSE="GPL-2+ LGPL-2+"
     13 #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"
     14 
     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
     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;
     27 
     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 )
     34 "
     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} )
     41 "
     42 
     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 	>=media-libs/mesa-9.0[egl?,gbm?,gles2?,wayland?,${MULTILIB_USEDEP}]
     47 	egl? (
     48 		x11-libs/libdrm
     49 	)
     50 	gbm? (
     51 		>=dev-libs/libgudev-147[${MULTILIB_USEDEP}]
     52 		>=x11-libs/libdrm-2.4.55[${MULTILIB_USEDEP}]
     53 	)
     54 	wayland? (
     55 		dev-libs/wayland[${MULTILIB_USEDEP}]
     56 	)
     57 
     58 	media-libs/libpng:0[${MULTILIB_USEDEP}]
     59 	virtual/jpeg:0[${MULTILIB_USEDEP}]
     60 " # graphene for optional gltransformation and glvideoflip elements and more GLSL Uniforms support in glshader; libpng/jpeg for gloverlay element
     61 # >=media-libs/graphene-1.4.0[${MULTILIB_USEDEP}]
     62 
     63 RDEPEND="
     64 	app-text/iso-codes
     65 	>=dev-libs/glib-2.40.0:2[${MULTILIB_USEDEP}]
     66 	>=media-libs/gstreamer-${PV}:1.0[introspection?,${MULTILIB_USEDEP}]
     67 	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
     68 	alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
     69 	introspection? ( >=dev-libs/gobject-introspection-1.31.1:= )
     70 	ivorbis? ( >=media-libs/tremor-0_pre20130223[${MULTILIB_USEDEP}] )
     71 	ogg? ( >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )
     72 	orc? ( >=dev-lang/orc-0.4.24[${MULTILIB_USEDEP}] )
     73 	pango? ( >=x11-libs/pango-1.36.3[${MULTILIB_USEDEP}] )
     74 	theora? ( >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] )
     75 	vorbis? ( >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] )
     76 	X? (
     77 		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
     78 		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
     79 		>=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
     80 	)
     81 
     82 	gles2? ( ${GL_DEPS} )
     83 	opengl? ( ${GL_DEPS} )
     84 
     85 	!<media-libs/gst-plugins-bad-1.15.0:1.0
     86 "
     87 DEPEND="${RDEPEND}
     88 	dev-util/glib-utils
     89 	>=dev-util/gtk-doc-am-1.12
     90 	X? ( x11-base/xorg-proto )
     91 "
     92 
     93 DOCS="AUTHORS NEWS README RELEASE"
     94 
     95 multilib_src_configure() {
     96 	filter-flags -mno-sse -mno-sse2 -mno-sse4.1 #610340
     97 
     98 	gstreamer_environment_reset
     99 
    100 	# opus: split to media-plugins/gst-plugins-opus
    101 	local emesonargs=(
    102 		-Dexamples=disabled
    103 		-Dpackage-name="Gentoo GStreamer ebuild"
    104 		-Dpackage-origin="https://www.gentoo.org"
    105 		-Dopus=disabled
    106 
    107 		$(meson_feature alsa)
    108 		$(meson_feature ogg)
    109 		$(meson_feature orc)
    110 		$(meson_feature pango)
    111 		$(meson_feature theora)
    112 		$(meson_feature vorbis)
    113 		$(meson_feature X x11)
    114 		$(meson_feature X xshm)
    115 		$(meson_feature X xvideo)
    116 	)
    117 
    118 	if use opengl || use gles2; then
    119 		# because meson doesn't likes extraneous commas
    120 		local gl_platform=( $(use X && echo glx) $(use egl && echo egl) )
    121 		local gl_winsys=(
    122 			$(use X && echo x11)
    123 			$(use wayland && echo wayland)
    124 			$(use egl && echo egl)
    125 			$(use gbm && echo gbm)
    126 		)
    127 
    128 		emesonargs+=(
    129 			-Dgl=enabled
    130 			-Dgl_api=opengl$(use gles2 && echo ,gles2)
    131 			-Dgl_platform=$(IFS=, ; echo "${gl_platform[*]}")
    132 			-Dgl_winsys=$(IFS=, ; echo "${gl_winsys[*]}")
    133 		)
    134 	else
    135 		emesonargs+=(
    136 			-Dgl=disabled
    137 			-Dgl_api=
    138 			-Dgl_platform=
    139 			-Dgl_winsys=
    140 		)
    141 	fi
    142 
    143 	meson_src_configure
    144 }