summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-11-20 15:18:44 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-21 11:54:14 +0000
commit5ce58802e03fa8c32212d85f99d57aeabf8d3b53 (patch)
tree736765e522155dc57ff655a8977a81a176cdac1f
parent01aa606e5391dd683143b07dc95471a4cc38193c (diff)
downloadpoky-5ce58802e03fa8c32212d85f99d57aeabf8d3b53.tar.gz
xcb-proto: use python3native to have reproducible pyc files
(From OE-Core rev: 7709b2551c07cfad591bb37817474fd106e7c2f1) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/xorg-proto/xcb-proto_1.13.bb26
1 files changed, 2 insertions, 24 deletions
diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.13.bb b/meta/recipes-graphics/xorg-proto/xcb-proto_1.13.bb
index d5037868d5..7467090920 100644
--- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.13.bb
+++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.13.bb
@@ -12,40 +12,18 @@ 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
14SRC_URI = "http://xcb.freedesktop.org/dist/${BP}.tar.bz2" 14SRC_URI = "http://xcb.freedesktop.org/dist/${BP}.tar.bz2"
15
16SRC_URI[md5sum] = "abe9aa4886138150bbc04ae4f29b90e3" 15SRC_URI[md5sum] = "abe9aa4886138150bbc04ae4f29b90e3"
17SRC_URI[sha256sum] = "7b98721e669be80284e9bbfeab02d2d0d54cd11172b72271e47a2fe875e2bde1" 16SRC_URI[sha256sum] = "7b98721e669be80284e9bbfeab02d2d0d54cd11172b72271e47a2fe875e2bde1"
18 17
19inherit autotools pkgconfig 18inherit autotools pkgconfig python3native
20
21# Force the use of Python 3 and a specific library path so we don't need to
22# depend on python3-native
23CACHED_CONFIGUREVARS += "PYTHON=python3 am_cv_python_pythondir=${libdir}/xcb-proto"
24 19
25PACKAGES += "python-xcbgen" 20PACKAGES += "python-xcbgen"
26 21
27FILES_${PN} = "" 22FILES_${PN} = ""
28FILES_${PN}-dev += "${datadir}/xcb/*.xml ${datadir}/xcb/*.xsd" 23FILES_${PN}-dev += "${datadir}/xcb/*.xml ${datadir}/xcb/*.xsd"
29FILES_python-xcbgen = "${libdir}/xcb-proto" 24FILES_python-xcbgen = "${PYTHON_SITEPACKAGES_DIR}"
30 25
31RDEPENDS_${PN}-dev = "" 26RDEPENDS_${PN}-dev = ""
32RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" 27RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
33 28
34BBCLASSEXTEND = "native nativesdk" 29BBCLASSEXTEND = "native nativesdk"
35
36# Need to do this dance because we're forcing the use of host Python above and
37# if xcb-proto is built with Py3.5 and then re-used from sstate on a host with
38# Py3.6 the second build will write new cache files into the sysroot which won't
39# be listed in the manifest so won't be deleted, resulting in an error on
40# rebuilds. Solve this by deleting the entire cache directory when this package
41# is removed from the sysroot.
42SSTATEPOSTINSTFUNCS += "xcb_sstate_postinst"
43xcb_sstate_postinst() {
44 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
45 then
46 cat <<EOF >${SSTATE_INST_POSTRM}
47#!/bin/sh
48rm -rf ${libdir}/xcb-proto/xcbgen/__pycache__
49EOF
50 fi
51}