logo

overlay

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

gstreamer-1.18.0.ebuild (2957B)


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