diff options
author | Ross Burton <ross.burton@intel.com> | 2018-02-20 22:43:53 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-02-24 10:31:48 +0000 |
commit | 3abf75f923f4164aadd080596a47037a04bcc933 (patch) | |
tree | 6b34e39c440af1a4b73070bfbc3cc8251cc8364d /meta | |
parent | a63aa5c0e46b7dc7efb1be7272267fab93e2693e (diff) | |
download | poky-3abf75f923f4164aadd080596a47037a04bcc933.tar.gz |
xcb-proto: don't compile for Python 2
Remove the do_install_append to create the Python 2 pyc files, as nothing in the
build is using Python 2 anymore (libxcb is the only user, and that uses Python
3).
Also use variables instead of a patch to control what Python binary and path the
modules are installed to.
(From OE-Core rev: c27c60fe012bf42ea3b22fc1b4496450dc68b50b)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch | 27 | ||||
-rw-r--r-- | meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb | 14 |
2 files changed, 5 insertions, 36 deletions
diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch b/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch deleted file mode 100644 index 09b6088db0..0000000000 --- a/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | Upstream uses AM_PATH_PYTHON to find a python binary and ask it where to install | ||
2 | libraries. This means we either need to depend on python-native (large build | ||
3 | dependency, early in the build) or use the host python (pythondir reflects the | ||
4 | host and not the target, breaks builds). | ||
5 | |||
6 | The third option is to just hardcode the path where the module goes, as most | ||
7 | callers of the code use pkg-config to find where it was installed anyway. | ||
8 | |||
9 | Upstream-Status: Inappropriate | ||
10 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
11 | |||
12 | diff --git a/configure.ac b/configure.ac | ||
13 | index d140bfe..c7b68da 100644 | ||
14 | --- a/configure.ac | ||
15 | +++ b/configure.ac | ||
16 | @@ -14,7 +14,10 @@ if test "$XMLLINT" = "no"; then | ||
17 | AC_MSG_WARN([xmllint not found; unable to validate against schema.]) | ||
18 | fi | ||
19 | |||
20 | -AM_PATH_PYTHON([2.5]) | ||
21 | +pythondir="${libdir}/xcb-proto" | ||
22 | +AC_SUBST(pythondir) | ||
23 | +PYTHON="python3" | ||
24 | +AC_SUBST(PYTHON) | ||
25 | |||
26 | xcbincludedir='${datadir}/xcb' | ||
27 | AC_SUBST(xcbincludedir) | ||
diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb b/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb index be6b1a0200..712ab6c59a 100644 --- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb +++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb | |||
@@ -11,8 +11,7 @@ LICENSE = "MIT" | |||
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \ | 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \ |
12 | file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65" | 12 | file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65" |
13 | 13 | ||
14 | SRC_URI = "http://xcb.freedesktop.org/dist/xcb-proto-${PV}.tar.bz2 \ | 14 | SRC_URI = "http://xcb.freedesktop.org/dist/${BP}.tar.bz2 \ |
15 | file://no-python-native.patch \ | ||
16 | file://0001-Make-whitespace-use-consistent.patch \ | 15 | file://0001-Make-whitespace-use-consistent.patch \ |
17 | file://0002-print-is-a-function-and-needs-parentheses.patch \ | 16 | file://0002-print-is-a-function-and-needs-parentheses.patch \ |
18 | " | 17 | " |
@@ -21,6 +20,10 @@ SRC_URI[sha256sum] = "5922aba4c664ab7899a29d92ea91a87aa4c1fc7eb5ee550325c3216c48 | |||
21 | 20 | ||
22 | inherit autotools pkgconfig | 21 | inherit autotools pkgconfig |
23 | 22 | ||
23 | # Force the use of Python 3 and a specific library path so we don't need to | ||
24 | # depend on python3-native | ||
25 | CACHED_CONFIGUREVARS += "PYTHON=python3 am_cv_python_pythondir=${libdir}/xcb-proto" | ||
26 | |||
24 | PACKAGES += "python-xcbgen" | 27 | PACKAGES += "python-xcbgen" |
25 | 28 | ||
26 | FILES_${PN} = "" | 29 | FILES_${PN} = "" |
@@ -31,10 +34,3 @@ RDEPENDS_${PN}-dev = "" | |||
31 | RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" | 34 | RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" |
32 | 35 | ||
33 | BBCLASSEXTEND = "native nativesdk" | 36 | BBCLASSEXTEND = "native nativesdk" |
34 | |||
35 | do_install_append() { | ||
36 | # Makefile's do_install creates .pyc files for python3, now also create | ||
37 | # them for python2 so that they will be recorded by manifest, and can be | ||
38 | # cleaned correctly. | ||
39 | (cd ${D}; python -m py_compile ./${libdir}/xcb-proto/xcbgen/*.py) | ||
40 | } | ||