xref: /OK3568_Linux_fs/buildroot/package/lirc-tools/0002-Fix-python-client-cross-compile.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom 13c4ffcfde07f659a836fba4a604dc1c5024bb90 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Baruch Siach <baruch@tkos.co.il>
3*4882a593SmuzhiyunDate: Tue, 29 Aug 2017 11:37:36 +0300
4*4882a593SmuzhiyunSubject: [PATCH] Fix python client cross compile
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunThe setup.py setuptools wrapper needs to use a version of python built
7*4882a593Smuzhiyunspecifically for cross compiling to cross compile successfully. Allow
8*4882a593Smuzhiyunsetting that in the environment using the SETUPTOOLS_ENV variable.
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunFixes the following build failure:
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun/usr/bin/ld: skipping incompatible .../lirc-tools-0.10.0/lib/.libs/liblirc_client.so when searching for -llirc_client
13*4882a593Smuzhiyun/usr/bin/ld: cannot find -llirc_client
14*4882a593Smuzhiyuncollect2: error: ld returned 1 exit status
15*4882a593Smuzhiyunerror: command '/usr/bin/gcc' failed with exit status 1
16*4882a593SmuzhiyunMakefile:1578: recipe for target 'all-local' failed
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunSigned-off-by: Baruch Siach <baruch@tkos.co.il>
19*4882a593Smuzhiyun---
20*4882a593SmuzhiyunUpstream status: https://sourceforge.net/p/lirc/tickets/308/
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun Makefile.am | 2 ++
23*4882a593Smuzhiyun 1 file changed, 2 insertions(+)
24*4882a593Smuzhiyun
25*4882a593Smuzhiyundiff --git a/Makefile.am b/Makefile.am
26*4882a593Smuzhiyunindex d8164fcd44cf..a16be4278ae2 100644
27*4882a593Smuzhiyun--- a/Makefile.am
28*4882a593Smuzhiyun+++ b/Makefile.am
29*4882a593Smuzhiyun@@ -131,6 +131,7 @@ pep8: $(py_PYTHON)
30*4882a593Smuzhiyun if HAVE_PYTHON35
31*4882a593Smuzhiyun all-local:
32*4882a593Smuzhiyun 	cd python-pkg; \
33*4882a593Smuzhiyun+	    $(SETUPTOOLS_ENV) \
34*4882a593Smuzhiyun 	    CFLAGS="-I$(abs_top_srcdir)/lib -I$(abs_builddir)/lib" \
35*4882a593Smuzhiyun 	    LDFLAGS=-L$(abs_builddir)/lib/.libs $(PYTHON) setup.py \
36*4882a593Smuzhiyun 	    $(if $(VERBOSE),,-q) build
37*4882a593Smuzhiyun@@ -179,6 +180,7 @@ $(abs_builddir)/python-pkg/setup.py:
38*4882a593Smuzhiyun $(PYTHON_TARBALL): $(abs_builddir)/python-pkg/setup.py
39*4882a593Smuzhiyun 	cp $(top_builddir)/VERSION $(abs_builddir)/python-pkg
40*4882a593Smuzhiyun 	cd $(abs_builddir)/python-pkg; CFLAGS=-I$(abs_top_srcdir)/lib \
41*4882a593Smuzhiyun+	    $(SETUPTOOLS_ENV) \
42*4882a593Smuzhiyun 	    LDFLAGS=-L$(abs_builddir)/lib/.libs $(PYTHON) setup.py -q sdist
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun $(top_builddir)/python-pkg/VERSION: VERSION
45*4882a593Smuzhiyun--
46*4882a593Smuzhiyun2.14.1
47*4882a593Smuzhiyun
48