[OE-core] [PATCH] gstreamer1.0-python: add new recipe

Martin Kelly mkelly at xevo.com
Tue Jul 18 16:21:08 UTC 2017


On 07/17/2017 07:47 PM, Khem Raj wrote:
> On Mon, Jul 17, 2017 at 8:21 PM, Martin Kelly <mkelly at xevo.com> wrote:
>> Previously, we had a gst-python recipe, but it supported only GStreamer
>> 0.1. After GStreamer switched the Python bindings to use GObject
>> introspection, we were no longer able to build the bindings, and they
>> were dropped in this patch:
>>
>> https://patchwork.openembedded.org/patch/93793/
>>
>> However, at this point, we have a gobject-introspection class, so we can
>> use the bindings again, this time with GStreamer 1.0.
>>
>> Signed-off-by: Martin Kelly <mkelly at xevo.com>
>> ---
>>  .../gstreamer/gstreamer1.0-python.inc              | 35 ++++++++++++++++++++++
>>  .../gstreamer/gstreamer1.0-python_1.10.4.bb        |  7 +++++
>>  2 files changed, 42 insertions(+)
>>  create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
>>  create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.10.4.bb
>
> I think everything in single file would be better
>

I'm fine with that, but I was just following the convention that the 
rest of the gstreamer packaging uses; all the recipes in 
meta/recipes-multimedia/gstreamer use the same convention. I figured 
it's cleaner to keep all of it consistent. Would you prefer I diverge 
anyway?

>>
>> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
>> new file mode 100644
>> index 0000000000..3299b89daa
>> --- /dev/null
>> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
>> @@ -0,0 +1,35 @@
>> +SUMMARY = "Python bindings for GStreamer 1.0"
>> +HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-python/"
>> +SECTION = "multimedia"
>> +LICENSE = "LGPLv2"
>> +
>
> this should be 2.1 most probably
>

Yes you're right, I'll change it.

>> +DEPENDS = "gstreamer1.0 python3-pygobject"
>> +RDEPENDS_${PN} += "gstreamer1.0 python3-pygobject"
>> +
>> +PNREAL = "gst-python"
>> +
>> +SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
>> +
>> +S = "${WORKDIR}/${PNREAL}-${PV}"
>> +
>> +inherit autotools pkgconfig distutils3-base upstream-version-is-even gobject-introspection
>> +
>> +do_install_append() {
>> +    # gstpythonplugin hardcodes the location of the libpython from the build
>> +    # workspace and then fails at runtime. We can override it using
>> +    # --with-libpython-dir=${libdir}, but it still fails because it looks for a
>> +    # symlinked library ending in .so instead of the actually library with
>> +    # LIBNAME.so.MAJOR.MINOR. Although we could patch the code to use the path
>> +    # we want, it will break again if the library version ever changes. We need
>> +    # to think about the best way of handling this and possibly consult
>> +    # upstream.
>> +    #
>> +    # Note that this particular find line is taken from the Debian packaging for
>> +    # gst-python1.0.
>> +    find "${D}" \
>> +        -name '*.pyc' -o \
>> +        -name '*.pyo' -o \
>> +        -name '*.la' -o \
>> +        -name 'libgstpythonplugin*' \
>> +        -delete
>> +}
>> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.10.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.10.4.bb
>> new file mode 100644
>> index 0000000000..1365f7c6dd
>> --- /dev/null
>> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.10.4.bb
>> @@ -0,0 +1,7 @@
>> +require gstreamer1.0-python.inc
>> +
>> +SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
>> +SRC_URI[md5sum] = "adcdb74f713e28d0b22a0a1e4f831573"
>> +SRC_URI[sha256sum] = "59508174b8bc86c05290aa9a7c5d480ac556a6f36306ddbc1d0eacf4f7868212"
>> +
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
>> --
>> 2.11.0
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list