Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 1 | SUMMARY = "XCB: The X protocol C binding headers" |
| 2 | DESCRIPTION = "Function prototypes for the X protocol C-language Binding \ |
| 3 | (XCB). XCB is a replacement for Xlib featuring a small footprint, \ |
| 4 | latency hiding, direct access to the protocol, improved threading \ |
| 5 | support, and extensibility." |
| 6 | HOMEPAGE = "http://xcb.freedesktop.org" |
| 7 | BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=XCB" |
| 8 | |
| 9 | SECTION = "x11/libs" |
| 10 | LICENSE = "MIT" |
| 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \ |
| 12 | file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65" |
| 13 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 14 | SRC_URI = "http://xcb.freedesktop.org/dist/${BP}.tar.bz2 \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 15 | file://0001-Make-whitespace-use-consistent.patch \ |
| 16 | file://0002-print-is-a-function-and-needs-parentheses.patch \ |
| 17 | " |
| 18 | SRC_URI[md5sum] = "14e60919f859560f28426a685a555962" |
| 19 | SRC_URI[sha256sum] = "5922aba4c664ab7899a29d92ea91a87aa4c1fc7eb5ee550325c3216c480a4906" |
| 20 | |
| 21 | inherit autotools pkgconfig |
| 22 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 27 | PACKAGES += "python-xcbgen" |
| 28 | |
| 29 | FILES_${PN} = "" |
| 30 | FILES_${PN}-dev += "${datadir}/xcb/*.xml ${datadir}/xcb/*.xsd" |
| 31 | FILES_python-xcbgen = "${libdir}/xcb-proto" |
| 32 | |
| 33 | RDEPENDS_${PN}-dev = "" |
| 34 | RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" |
| 35 | |
| 36 | BBCLASSEXTEND = "native nativesdk" |
| 37 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 38 | # 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. |
| 44 | SSTATEPOSTINSTFUNCS += "xcb_sstate_postinst" |
| 45 | xcb_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 |
| 50 | rm -rf ${libdir}/xcb-proto/xcbgen/__pycache__ |
| 51 | EOF |
| 52 | fi |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 53 | } |