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.16.2.ebuild (6140B)


  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. inherit flag-o-matic gstreamer
  6. DESCRIPTION="Basepack of plugins for gstreamer"
  7. HOMEPAGE="https://gstreamer.freedesktop.org/"
  8. LICENSE="GPL-2+ LGPL-2+"
  9. 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"
  10. # For OpenGL we have three separate concepts, with a list of possibilities in each:
  11. # * 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
  12. # * 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.
  13. # * 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
  14. # With the following limitations:
  15. # * 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
  16. # * If opengl and/or gles2 is enabled, a windowing system has to be enabled - x11, wayland or gbm in our case
  17. # * glx platform requires opengl API
  18. # * wayland, gbm and most other non-glx WSIs require egl platform
  19. # Additionally there is optional dmabuf support with egl for additional dmabuf based upload/download/eglimage options;
  20. # and optional graphene usage for gltransformation and glvideoflip elements and more GLSL Uniforms support in glshader;
  21. # and libpng/jpeg are required for gloverlay element;
  22. # Keep default IUSE options for relevant ones mirrored with gst-plugins-gtk and gst-plugins-bad
  23. IUSE="alsa +egl gbm gles2 +introspection ivorbis +ogg +opengl +orc +pango theora +vorbis wayland +X"
  24. GL_REQUIRED_USE="
  25. || ( gbm wayland X )
  26. wayland? ( egl )
  27. gbm? ( egl )
  28. "
  29. REQUIRED_USE="
  30. ivorbis? ( ogg )
  31. theora? ( ogg )
  32. vorbis? ( ogg )
  33. opengl? ( || ( egl X ) ${GL_REQUIRED_USE} )
  34. gles2? ( egl ${GL_REQUIRED_USE} )
  35. "
  36. # Dependencies needed by opengl library and plugin (enabled via USE gles2 and/or opengl)
  37. # 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
  38. GL_DEPS="
  39. >=media-libs/mesa-9.0[egl?,gbm?,gles2?,wayland?,${MULTILIB_USEDEP}]
  40. egl? (
  41. x11-libs/libdrm
  42. )
  43. gbm? (
  44. >=dev-libs/libgudev-147[${MULTILIB_USEDEP}]
  45. >=x11-libs/libdrm-2.4.55[${MULTILIB_USEDEP}]
  46. )
  47. wayland? (
  48. dev-libs/wayland[${MULTILIB_USEDEP}]
  49. )
  50. media-libs/libpng:0[${MULTILIB_USEDEP}]
  51. virtual/jpeg:0[${MULTILIB_USEDEP}]
  52. " # graphene for optional gltransformation and glvideoflip elements and more GLSL Uniforms support in glshader; libpng/jpeg for gloverlay element
  53. # >=media-libs/graphene-1.4.0[${MULTILIB_USEDEP}]
  54. RDEPEND="
  55. app-text/iso-codes
  56. >=dev-libs/glib-2.40.0:2[${MULTILIB_USEDEP}]
  57. >=media-libs/gstreamer-${PV}:1.0[introspection?,${MULTILIB_USEDEP}]
  58. >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
  59. alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
  60. introspection? ( >=dev-libs/gobject-introspection-1.31.1:= )
  61. ivorbis? ( >=media-libs/tremor-0_pre20130223[${MULTILIB_USEDEP}] )
  62. ogg? ( >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] )
  63. orc? ( >=dev-lang/orc-0.4.24[${MULTILIB_USEDEP}] )
  64. pango? ( >=x11-libs/pango-1.36.3[${MULTILIB_USEDEP}] )
  65. theora? ( >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] )
  66. vorbis? ( >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] )
  67. X? (
  68. >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
  69. >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
  70. >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
  71. )
  72. gles2? ( ${GL_DEPS} )
  73. opengl? ( ${GL_DEPS} )
  74. !<media-libs/gst-plugins-bad-1.15.0:1.0
  75. "
  76. DEPEND="${RDEPEND}
  77. dev-util/glib-utils
  78. >=dev-util/gtk-doc-am-1.12
  79. X? ( x11-base/xorg-proto )
  80. "
  81. PATCHES=(
  82. "${FILESDIR}"/${PN}-1.14.5-make43.patch # remove when bumping and switching to Meson
  83. )
  84. src_prepare() {
  85. # Disable GL tests for now; prone to fail with EGL_NOT_INITIALIZED, etc
  86. sed -i -e '/^@USE_GL_TRUE@/d' tests/check/Makefile.in
  87. default
  88. }
  89. multilib_src_configure() {
  90. filter-flags -mno-sse -mno-sse2 -mno-sse4.1 #610340
  91. local myconf=()
  92. # FIXME: Automagic gbm and x11 wsi
  93. if use opengl || use gles2; then
  94. myconf+=(
  95. --enable-gl
  96. $(use_enable egl)
  97. $(use_enable gles2)
  98. $(use_enable opengl)
  99. $(use_enable wayland)
  100. $(use_enable X x11)
  101. )
  102. else
  103. myconf+=(
  104. --disable-gl
  105. --disable-egl
  106. --disable-gles2
  107. --disable-opengl
  108. --disable-wayland
  109. --disable-x11
  110. )
  111. fi
  112. if use opengl && use X; then
  113. # GLX requires desktop OpenGL and X
  114. myconf+=( --enable-glx )
  115. else
  116. myconf+=( --disable-glx )
  117. fi
  118. myconf+=(
  119. --disable-cocoa
  120. --disable-dispmanx
  121. --disable-wgl
  122. )
  123. gstreamer_multilib_src_configure \
  124. $(use_enable alsa) \
  125. $(multilib_native_use_enable introspection) \
  126. $(use_enable ivorbis) \
  127. $(use_enable ogg) \
  128. $(use_enable orc) \
  129. $(use_enable pango) \
  130. $(use_enable theora) \
  131. $(use_enable vorbis) \
  132. $(use_enable X x) \
  133. $(use_enable X xshm) \
  134. $(use_enable X xvideo) \
  135. --enable-iso-codes \
  136. --enable-zlib \
  137. --disable-debug \
  138. --disable-examples \
  139. --disable-static \
  140. "${myconf[@]}"
  141. # bug #366931, flag-o-matic for the whole thing is overkill
  142. if [[ ${CHOST} == *86-*-darwin* ]] ; then
  143. sed -i \
  144. -e '/FLAGS = /s|-O[23]|-O1|g' \
  145. gst/audioconvert/Makefile \
  146. gst/volume/Makefile || die
  147. fi
  148. if multilib_is_native_abi; then
  149. local x
  150. for x in libs plugins; do
  151. ln -s "${S}"/docs/${x}/html docs/${x}/html || die
  152. done
  153. fi
  154. }
  155. multilib_src_install_all() {
  156. DOCS="AUTHORS NEWS README RELEASE"
  157. einstalldocs
  158. find "${ED}" -name '*.la' -delete || die
  159. }
  160. multilib_src_test() {
  161. unset GSETTINGS_BACKEND
  162. emake check
  163. }