diff options
author | Ross Burton <ross.burton@intel.com> | 2012-10-22 10:37:25 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-24 12:50:47 +0100 |
commit | 662189deb638a538f814621f6ef62871d6e4084b (patch) | |
tree | d7f02ed24a06b9fef412b832c9275a7637be842a | |
parent | 553d9dbe0e426a4f933bef291cabfea7ae80f51a (diff) | |
download | poky-662189deb638a538f814621f6ef62871d6e4084b.tar.gz |
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>
3 files changed, 23 insertions, 1 deletions
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc index 9a474b76de..f9f25ffe95 100644 --- a/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc +++ b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc | |||
@@ -5,7 +5,7 @@ SECTION = "x11/drivers" | |||
5 | LICENSE = "MIT-X" | 5 | LICENSE = "MIT-X" |
6 | 6 | ||
7 | PE = "2" | 7 | PE = "2" |
8 | INC_PR = "r17" | 8 | INC_PR = "r18" |
9 | 9 | ||
10 | DEPENDS = "virtual/xserver xproto randrproto util-macros" | 10 | DEPENDS = "virtual/xserver xproto randrproto util-macros" |
11 | 11 | ||
@@ -31,3 +31,18 @@ do_configure_prepend () { | |||
31 | do_install_append() { | 31 | do_install_append() { |
32 | find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f -- | 32 | find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f -- |
33 | } | 33 | } |
34 | |||
35 | # Function to add the relevant ABI dependency to drivers, which should be called | ||
36 | # from a populate_packages append/prepend. | ||
37 | def add_abi_depends(d, name): | ||
38 | # Map of ABI names exposed in the dependencies to pkg-config variables | ||
39 | abis = { | ||
40 | "video": "abi_videodrv", | ||
41 | "input": "abi_xinput" | ||
42 | } | ||
43 | |||
44 | output = os.popen("pkg-config xorg-server --variable=%s" % abis[name]).read() | ||
45 | abi = "xorg-abi-%s-%s" % (name, output.split(".")[0]) | ||
46 | |||
47 | pn = d.getVar("PN", True) | ||
48 | d.appendVar('RDEPENDS_' + pn, ' ' + abi) | ||
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc index bf4ca6cb77..a544d71bf2 100644 --- a/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc +++ b/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc | |||
@@ -2,5 +2,9 @@ include xorg-driver-common.inc | |||
2 | 2 | ||
3 | DEPENDS += "inputproto kbproto " | 3 | DEPENDS += "inputproto kbproto " |
4 | 4 | ||
5 | python populate_packages_prepend() { | ||
6 | add_abi_depends(d, "input") | ||
7 | } | ||
8 | |||
5 | FILES_${PN} += " ${libdir}/xorg/modules/input/*.so" | 9 | FILES_${PN} += " ${libdir}/xorg/modules/input/*.so" |
6 | FILES_${PN}-dbg += " ${libdir}/xorg/modules/input/.debug" | 10 | FILES_${PN}-dbg += " ${libdir}/xorg/modules/input/.debug" |
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc index 57c80d1017..4fe33491b7 100644 --- a/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc +++ b/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc | |||
@@ -2,3 +2,6 @@ include xorg-driver-common.inc | |||
2 | 2 | ||
3 | DEPENDS =+ "renderproto videoproto xextproto fontsproto" | 3 | DEPENDS =+ "renderproto videoproto xextproto fontsproto" |
4 | 4 | ||
5 | python populate_packages_prepend() { | ||
6 | add_abi_depends(d, "video") | ||
7 | } | ||