summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2018-06-21 10:48:35 +0300
committerMart Raudsepp <leio@gentoo.org>2018-06-21 10:49:09 +0300
commitcb705acfd1c949abed72397382bfa7cb26596b67 (patch)
tree9b21bdaf50a813ae365cf6f2271bc7288a9ae157 /dev-python/gst-python/gst-python-1.14.1.ebuild
parentsys-apps/xinetd: Re-keyword ~amd64-fbsd (diff)
downloadgentoo-cb705acfd1c949abed72397382bfa7cb26596b67.tar.gz
gentoo-cb705acfd1c949abed72397382bfa7cb26596b67.tar.bz2
gentoo-cb705acfd1c949abed72397382bfa7cb26596b67.zip
dev-python/gst-python: bump to 1.14.1, run tests, don't install plugin
The plugin must be single-python, otherwise multiple plugin files (due to different python plugin naming suffixes) get installed, gst-inspect-1.0 and co will load both into memory, end up with multiple libpython.so's loaded in, causing ABI issues and crashes from clashing symbols. python-r1 and python-single-r1 can't co-exist, so stop building and installing the plugin in this package, as this package is mainly about the GI overrides for things like correct Gst.Fraction, and is consumed as such. The plugin is of limited use, as that's about supporting writing and using gstreamer plugins in python, but GIL gets in the way of writing good plugins, so it's not used much in practice. Debian didn't even build the plugin before 1.14 either. If it's ever requested/needed, we'll package it as media-plugins/gst-plugins-python that build and installs just the plugin/ directory. Fix tests to work in the multibuild setup and properly xdg_environment_reset, which was missing and made apparent by tests printing an ERROR about it (though passing). Remove redundant IUSE=test Use ltprune.eclass instead of eutils.eclass Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'dev-python/gst-python/gst-python-1.14.1.ebuild')
-rw-r--r--dev-python/gst-python/gst-python-1.14.1.ebuild69
1 files changed, 69 insertions, 0 deletions
diff --git a/dev-python/gst-python/gst-python-1.14.1.ebuild b/dev-python/gst-python/gst-python-1.14.1.ebuild
new file mode 100644
index 000000000000..8fcc0e29741f
--- /dev/null
+++ b/dev-python/gst-python/gst-python-1.14.1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python{3_4,3_5,3_6} )
+
+inherit ltprune python-r1 xdg-utils
+
+DESCRIPTION="A Python Interface to GStreamer"
+HOMEPAGE="https://gstreamer.freedesktop.org/"
+SRC_URI="https://gstreamer.freedesktop.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="LGPL-2+"
+SLOT="1.0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ >=dev-python/pygobject-3.8:3[${PYTHON_USEDEP}]
+ >=media-libs/gstreamer-${PV}:1.0[introspection]
+ >=media-libs/gst-plugins-base-${PV}:1.0[introspection]
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ default
+ xdg_environment_reset
+ prepare_gst() {
+ mkdir -p "${BUILD_DIR}" || die
+ }
+ python_foreach_impl prepare_gst
+}
+
+src_configure() {
+ ECONF_SOURCE="${S}" python_foreach_impl run_in_build_dir econf
+}
+
+src_compile() {
+ # Avoid building plugin - it must NOT be multi-python as gst-inspect will map in all libpython.so versions and crash or behave mysteriously.
+ # Python plugin support is of limited use (GIL gets in the way). If it's ever requested or needed, it should be a
+ # separate python-single-r1 media-plugins/gst-plugins-python package that only builds the plugin directory.
+ compile_gst() {
+ emake -C common || die "emake common failed"
+ emake -C gi || die "emake gi failed"
+ emake -C testsuite || die "emake testsuite failed"
+ }
+ python_foreach_impl run_in_build_dir compile_gst
+}
+
+src_install() {
+ install_gst() {
+ emake DESTDIR="${D}" install -C common || die "emake install common failed"
+ emake DESTDIR="${D}" install -C gi || die "emake install gi failed"
+ emake DESTDIR="${D}" install -C testsuite || die "emake install testsuite failed"
+ }
+ python_foreach_impl run_in_build_dir install_gst
+ prune_libtool_files --modules
+ einstalldocs
+}
+
+src_test() {
+ test_gst() {
+ emake check -C testsuite || die "emake check failed"
+ }
+ python_foreach_impl run_in_build_dir default
+}