logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

gst-plugins-base-1.18.1.ebuild (5648B)


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