diff options
Diffstat (limited to 'package/lirc-tools/0003-python-pkg-Fix-lirc-version-detection-when-cross-com.patch')
-rw-r--r-- | package/lirc-tools/0003-python-pkg-Fix-lirc-version-detection-when-cross-com.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/package/lirc-tools/0003-python-pkg-Fix-lirc-version-detection-when-cross-com.patch b/package/lirc-tools/0003-python-pkg-Fix-lirc-version-detection-when-cross-com.patch new file mode 100644 index 0000000000..04fbfe6ea2 --- /dev/null +++ b/package/lirc-tools/0003-python-pkg-Fix-lirc-version-detection-when-cross-com.patch @@ -0,0 +1,51 @@ +From 732fd31610a6790a927ea9ed6d660796a1641254 Mon Sep 17 00:00:00 2001 +From: Baruch Siach <baruch@tkos.co.il> +Date: Thu, 7 Sep 2017 08:12:01 +0200 +Subject: [PATCH] build: Fix lirc version detection when cross compiling. + +The setup.py script that runs on the host can't use the client library +built for target. So setup.py falls back to a wrong hard-coded VERSION +value. + +Instead of importing the target library, use exec() to read +lirc/config.py directly for its VERSION value. + +Fixes build failure: + +/usr/bin/install -c -m 644 ./python-pkg/dist/lirc-0.10.0.tar.gz \ + '.../output/host/arm-buildroot-linux-musleabihf/sysroot/usr/share/lirc' +/usr/bin/install: cannot stat './python-pkg/dist/lirc-0.10.0.tar.gz': \ + No such file or directory + +Signed-off-by: Baruch Siach <baruch@tkos.co.il> +--- +Upstream status: commit 732fd31610a6 + + python-pkg/setup.py | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/python-pkg/setup.py b/python-pkg/setup.py +index e9b33690f828..a2d92e0432aa 100644 +--- a/python-pkg/setup.py ++++ b/python-pkg/setup.py +@@ -6,14 +6,11 @@ import subprocess + import os.path + import os + +-try: +- import lirc.config +- VERSION = lirc.config.VERSION.replace('-devel','') +-except ImportError: +- VERSION='0.0.0' +- + from setuptools import setup, Extension + ++exec(open("lirc/config.py").read()) ++VERSION = VERSION.replace('-devel','') ++ + if 'CFLAGS' in os.environ: + cflags = os.environ['CFLAGS'].split() + if 'LDFLAGS' in os.environ: +-- +2.14.1 + |