diff options
Diffstat (limited to 'meta/recipes-graphics/xorg-driver/xorg-driver-common.inc')
-rw-r--r-- | meta/recipes-graphics/xorg-driver/xorg-driver-common.inc | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc new file mode 100644 index 0000000000..17fac8b8c0 --- /dev/null +++ b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc | |||
@@ -0,0 +1,41 @@ | |||
1 | SUMMARY = "X driver" | ||
2 | HOMEPAGE = "http://www.x.org" | ||
3 | BUGTRACKER = "https://bugs.freedesktop.org" | ||
4 | SECTION = "x11/drivers" | ||
5 | LICENSE = "MIT-X" | ||
6 | |||
7 | PE = "2" | ||
8 | INC_PR = "r21" | ||
9 | |||
10 | DEPENDS = "virtual/xserver xproto randrproto util-macros" | ||
11 | |||
12 | SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2" | ||
13 | |||
14 | S = "${WORKDIR}/${BPN}-${PV}" | ||
15 | |||
16 | FILES_${PN} += " ${libdir}/xorg/modules/drivers/*.so" | ||
17 | FILES_${PN}-dbg += " ${libdir}/xorg/modules/drivers/.debug" | ||
18 | |||
19 | inherit autotools pkgconfig | ||
20 | |||
21 | # FIXME: We don't want to include the libtool archives (*.la) from modules | ||
22 | # directory, as they serve no useful purpose. Upstream should fix Makefile.am | ||
23 | do_install_append() { | ||
24 | find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f -- | ||
25 | } | ||
26 | |||
27 | # Function to add the relevant ABI dependency to drivers, which should be called | ||
28 | # from a PACKAGEFUNC. | ||
29 | def _add_xorg_abi_depends(d, name): | ||
30 | # Map of ABI names exposed in the dependencies to pkg-config variables | ||
31 | abis = { | ||
32 | "video": "abi_videodrv", | ||
33 | "input": "abi_xinput" | ||
34 | } | ||
35 | |||
36 | output = os.popen("pkg-config xorg-server --variable=%s" % abis[name]).read() | ||
37 | mlprefix = d.getVar('MLPREFIX', True) or '' | ||
38 | abi = "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0]) | ||
39 | |||
40 | pn = d.getVar("PN", True) | ||
41 | d.appendVar('RDEPENDS_' + pn, ' ' + abi) | ||