diff options
| -rw-r--r-- | meta-oe/recipes-support/libgusb/libgusb/0001-generate-version-script-Don-t-hard-code-the-path-of-.patch | 53 | ||||
| -rw-r--r-- | meta-oe/recipes-support/libgusb/libgusb_0.3.4.bb (renamed from meta-oe/recipes-support/libgusb/libgusb_git.bb) | 7 |
2 files changed, 57 insertions, 3 deletions
diff --git a/meta-oe/recipes-support/libgusb/libgusb/0001-generate-version-script-Don-t-hard-code-the-path-of-.patch b/meta-oe/recipes-support/libgusb/libgusb/0001-generate-version-script-Don-t-hard-code-the-path-of-.patch new file mode 100644 index 0000000000..41e64d7d80 --- /dev/null +++ b/meta-oe/recipes-support/libgusb/libgusb/0001-generate-version-script-Don-t-hard-code-the-path-of-.patch | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | From 76c23503ed1002d3aad0118795006fe2128006ae Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ting-Wei Lan <lantw@src.gnome.org> | ||
| 3 | Date: Sat, 21 Mar 2020 22:13:57 +0800 | ||
| 4 | Subject: [PATCH] generate-version-script: Don't hard-code the path of python3 | ||
| 5 | |||
| 6 | Python can be installed in different directories on different operating | ||
| 7 | systems, so we can't hard-code the path of it. Instead, use meson to | ||
| 8 | find it to avoid 'no such file or directory' error on the bad path. | ||
| 9 | |||
| 10 | Upstream-Status: Backport [https://github.com/hughsie/libgusb/pull/36] | ||
| 11 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
| 12 | --- | ||
| 13 | contrib/generate-version-script.py | 1 - | ||
| 14 | gusb/meson.build | 4 ++++ | ||
| 15 | 2 files changed, 4 insertions(+), 1 deletion(-) | ||
| 16 | mode change 100755 => 100644 contrib/generate-version-script.py | ||
| 17 | |||
| 18 | diff --git a/contrib/generate-version-script.py b/contrib/generate-version-script.py | ||
| 19 | old mode 100755 | ||
| 20 | new mode 100644 | ||
| 21 | index c4ee238ab0ab..0fe2b24e47e3 | ||
| 22 | --- a/contrib/generate-version-script.py | ||
| 23 | +++ b/contrib/generate-version-script.py | ||
| 24 | @@ -1,4 +1,3 @@ | ||
| 25 | -#!/usr/bin/python3 | ||
| 26 | # pylint: disable=invalid-name,missing-docstring | ||
| 27 | # | ||
| 28 | # Copyright (C) 2017 Richard Hughes <richard@hughsie.com> | ||
| 29 | diff --git a/gusb/meson.build b/gusb/meson.build | ||
| 30 | index 10a6f537a642..28ca3c63e595 100644 | ||
| 31 | --- a/gusb/meson.build | ||
| 32 | +++ b/gusb/meson.build | ||
| 33 | @@ -142,6 +142,9 @@ libgusb_girtarget = gnome.generate_gir(gusb, | ||
| 34 | libgusb_gir = libgusb_girtarget[0] | ||
| 35 | libgusb_typelib = libgusb_girtarget[1] | ||
| 36 | |||
| 37 | +pymod = import('python') | ||
| 38 | +py_installation = pymod.find_installation('python3') | ||
| 39 | + | ||
| 40 | # Verify the map file is correct -- note we can't actually use the generated | ||
| 41 | # file for two reasons: | ||
| 42 | # | ||
| 43 | @@ -154,6 +157,7 @@ mapfile_target = custom_target('gusb_mapfile', | ||
| 44 | input: libgusb_girtarget[0], | ||
| 45 | output: 'libgusb.ver', | ||
| 46 | command: [ | ||
| 47 | + py_installation, | ||
| 48 | join_paths(meson.source_root(), 'contrib', 'generate-version-script.py'), | ||
| 49 | 'LIBGUSB', | ||
| 50 | '@INPUT@', | ||
| 51 | -- | ||
| 52 | 2.17.1 | ||
| 53 | |||
diff --git a/meta-oe/recipes-support/libgusb/libgusb_git.bb b/meta-oe/recipes-support/libgusb/libgusb_0.3.4.bb index e3c0bdd15e..bd88c8ed4c 100644 --- a/meta-oe/recipes-support/libgusb/libgusb_git.bb +++ b/meta-oe/recipes-support/libgusb/libgusb_0.3.4.bb | |||
| @@ -6,7 +6,8 @@ DEPENDS = "glib-2.0 libusb" | |||
| 6 | 6 | ||
| 7 | inherit meson gobject-introspection gtk-doc gettext vala | 7 | inherit meson gobject-introspection gtk-doc gettext vala |
| 8 | 8 | ||
| 9 | SRC_URI = "git://github.com/hughsie/libgusb.git" | 9 | SRC_URI = "git://github.com/hughsie/libgusb.git \ |
| 10 | SRCREV = "636efc0624aa2a88174220fcabc9764c13d7febf" | 10 | file://0001-generate-version-script-Don-t-hard-code-the-path-of-.patch \ |
| 11 | PV = "0.3.0+git${SRCPV}" | 11 | " |
| 12 | SRCREV = "377917fed85476d615f72279d0c97bc391d0f191" | ||
| 12 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
