logo

overlay

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

gstreamer-1.16.2.ebuild (3474B)


  1. # Copyright 1999-2020 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit bash-completion-r1 multilib-minimal pax-utils
  5. DESCRIPTION="Open source multimedia framework"
  6. HOMEPAGE="https://gstreamer.freedesktop.org/"
  7. SRC_URI="https://${PN}.freedesktop.org/src/${PN}/${P}.tar.xz"
  8. LICENSE="LGPL-2+"
  9. SLOT="1.0"
  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. IUSE="+caps +introspection nls +orc test unwind"
  12. RESTRICT="!test? ( test )"
  13. RDEPEND="
  14. >=dev-libs/glib-2.40.0:2[${MULTILIB_USEDEP}]
  15. caps? ( sys-libs/libcap[${MULTILIB_USEDEP}] )
  16. introspection? ( >=dev-libs/gobject-introspection-1.31.1:= )
  17. unwind? (
  18. >=sys-libs/libunwind-1.2_rc1[${MULTILIB_USEDEP}]
  19. dev-libs/elfutils[${MULTILIB_USEDEP}]
  20. )
  21. !<media-libs/gst-plugins-bad-1.13.1:1.0
  22. "
  23. DEPEND="${RDEPEND}
  24. dev-util/glib-utils
  25. >=dev-util/gtk-doc-am-1.12
  26. sys-devel/bison
  27. sys-devel/flex
  28. >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
  29. nls? ( sys-devel/gettext )
  30. "
  31. PATCHES=(
  32. "${FILESDIR}"/${PN}-1.14.5-make43.patch # remove when bumping and switching to Meson
  33. )
  34. src_configure() {
  35. if [[ ${CHOST} == *-interix* ]] ; then
  36. export ac_cv_lib_dl_dladdr=no
  37. export ac_cv_func_poll=no
  38. fi
  39. if [[ ${CHOST} == powerpc-apple-darwin* ]] ; then
  40. # GCC groks this, but then refers to an implementation (___multi3,
  41. # ___udivti3) that don't exist (at least I can't find it), so force
  42. # this one to be off, such that we use 2x64bit emulation code.
  43. export gst_cv_uint128_t=no
  44. fi
  45. multilib-minimal_src_configure
  46. }
  47. multilib_src_configure() {
  48. local completiondir=$(get_bashcompdir)
  49. # Set 'libexecdir' to ABI-specific location for the library spawns
  50. # helpers from there.
  51. # Disable static archives and examples to speed up build time
  52. # Disable debug, as it only affects -g passing (debugging symbols), this must done through make.conf in gentoo
  53. local myconf=(
  54. --libexecdir="${EPREFIX}"/usr/$(get_libdir)
  55. --disable-benchmarks
  56. --disable-debug
  57. --disable-examples
  58. --disable-static
  59. --disable-valgrind
  60. --enable-check
  61. $(use_with unwind)
  62. $(use_with unwind dw)
  63. $(multilib_native_use_enable introspection)
  64. $(use_enable nls)
  65. $(use_enable test tests)
  66. --with-bash-completion-dir="${completiondir%/*}"
  67. --with-package-name="GStreamer ebuild for Gentoo"
  68. --with-package-origin="https://packages.gentoo.org/package/media-libs/gstreamer"
  69. )
  70. if use caps ; then
  71. myconf+=( --with-ptp-helper-permissions=capabilities )
  72. else
  73. myconf+=(
  74. --with-ptp-helper-permissions=setuid-root
  75. --with-ptp-helper-setuid-user=nobody
  76. --with-ptp-helper-setuid-group=nobody
  77. )
  78. fi
  79. ECONF_SOURCE="${S}" econf "${myconf[@]}"
  80. if multilib_is_native_abi; then
  81. local x
  82. for x in gst libs plugins; do
  83. ln -s "${S}"/docs/${x}/html docs/${x}/html || die
  84. done
  85. fi
  86. }
  87. multilib_src_install() {
  88. # can't do "default", we want to install docs in multilib_src_install_all
  89. emake DESTDIR="${D}" install
  90. # Needed for orc-using gst plugins on hardened/PaX systems, bug #421579
  91. use orc && pax-mark -m "${ED}usr/$(get_libdir)/gstreamer-${SLOT}/gst-plugin-scanner"
  92. }
  93. multilib_src_install_all() {
  94. DOCS="AUTHORS ChangeLog NEWS MAINTAINERS README RELEASE"
  95. einstalldocs
  96. find "${ED}" -name '*.la' -delete || die
  97. # Needed for orc-using gst plugins on hardened/PaX systems, bug #421579
  98. use orc && pax-mark -m "${ED}usr/bin/gst-launch-${SLOT}"
  99. }