blob: 25a8373e0b9a7a376a25e96d9010521e663d526b [file] [log] [blame]
Patrick Williamsc0f7c042017-02-23 20:41:17 -06001SUMMARY = "XCB: The X protocol C binding headers"
2DESCRIPTION = "Function prototypes for the X protocol C-language Binding \
3(XCB). XCB is a replacement for Xlib featuring a small footprint, \
4latency hiding, direct access to the protocol, improved threading \
5support, and extensibility."
6HOMEPAGE = "http://xcb.freedesktop.org"
7BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=XCB"
8
9SECTION = "x11/libs"
10LICENSE = "MIT"
11LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \
12 file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65"
13
Brad Bishop316dfdd2018-06-25 12:45:53 -040014SRC_URI = "http://xcb.freedesktop.org/dist/${BP}.tar.bz2 \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060015 file://0001-Make-whitespace-use-consistent.patch \
16 file://0002-print-is-a-function-and-needs-parentheses.patch \
17 "
18SRC_URI[md5sum] = "14e60919f859560f28426a685a555962"
19SRC_URI[sha256sum] = "5922aba4c664ab7899a29d92ea91a87aa4c1fc7eb5ee550325c3216c480a4906"
20
21inherit autotools pkgconfig
22
Brad Bishop316dfdd2018-06-25 12:45:53 -040023# Force the use of Python 3 and a specific library path so we don't need to
24# depend on python3-native
25CACHED_CONFIGUREVARS += "PYTHON=python3 am_cv_python_pythondir=${libdir}/xcb-proto"
26
Patrick Williamsc0f7c042017-02-23 20:41:17 -060027PACKAGES += "python-xcbgen"
28
29FILES_${PN} = ""
30FILES_${PN}-dev += "${datadir}/xcb/*.xml ${datadir}/xcb/*.xsd"
31FILES_python-xcbgen = "${libdir}/xcb-proto"
32
33RDEPENDS_${PN}-dev = ""
34RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
35
36BBCLASSEXTEND = "native nativesdk"
37
Brad Bishop316dfdd2018-06-25 12:45:53 -040038# Need to do this dance because we're forcing the use of host Python above and
39# if xcb-proto is built with Py3.5 and then re-used from sstate on a host with
40# Py3.6 the second build will write new cache files into the sysroot which won't
41# be listed in the manifest so won't be deleted, resulting in an error on
42# rebuilds. Solve this by deleting the entire cache directory when this package
43# is removed from the sysroot.
44SSTATEPOSTINSTFUNCS += "xcb_sstate_postinst"
45xcb_sstate_postinst() {
46 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
47 then
48 cat <<EOF >${SSTATE_INST_POSTRM}
49#!/bin/sh
50rm -rf ${libdir}/xcb-proto/xcbgen/__pycache__
51EOF
52 fi
Patrick Williamsc0f7c042017-02-23 20:41:17 -060053}