xorg-driver: add xserver driver ABI dependencies

At build time extract the xserver driver ABI versions that we're building
against and add RDEPENDs on them, so the driver isn't used against an xserver
with a different ABI (which won't work).

(From OE-Core rev: a17faa832798f5c76e344d2662ffdb470974bfe3)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton 2012-10-22 10:37:25 +01:00 committed by Richard Purdie
parent 553d9dbe0e
commit 662189deb6
3 changed files with 23 additions and 1 deletions

View File

@ -5,7 +5,7 @@ SECTION = "x11/drivers"
LICENSE = "MIT-X"
PE = "2"
INC_PR = "r17"
INC_PR = "r18"
DEPENDS = "virtual/xserver xproto randrproto util-macros"
@ -31,3 +31,18 @@ do_configure_prepend () {
do_install_append() {
find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f --
}
# Function to add the relevant ABI dependency to drivers, which should be called
# from a populate_packages append/prepend.
def add_abi_depends(d, name):
# Map of ABI names exposed in the dependencies to pkg-config variables
abis = {
"video": "abi_videodrv",
"input": "abi_xinput"
}
output = os.popen("pkg-config xorg-server --variable=%s" % abis[name]).read()
abi = "xorg-abi-%s-%s" % (name, output.split(".")[0])
pn = d.getVar("PN", True)
d.appendVar('RDEPENDS_' + pn, ' ' + abi)

View File

@ -2,5 +2,9 @@ include xorg-driver-common.inc
DEPENDS += "inputproto kbproto "
python populate_packages_prepend() {
add_abi_depends(d, "input")
}
FILES_${PN} += " ${libdir}/xorg/modules/input/*.so"
FILES_${PN}-dbg += " ${libdir}/xorg/modules/input/.debug"

View File

@ -2,3 +2,6 @@ include xorg-driver-common.inc
DEPENDS =+ "renderproto videoproto xextproto fontsproto"
python populate_packages_prepend() {
add_abi_depends(d, "video")
}