xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "X driver"
2*4882a593SmuzhiyunHOMEPAGE = "http://www.x.org"
3*4882a593SmuzhiyunBUGTRACKER = "https://bugs.freedesktop.org"
4*4882a593SmuzhiyunSECTION = "x11/drivers"
5*4882a593SmuzhiyunLICENSE = "MIT"
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunPE = "2"
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunDEPENDS = "virtual/xserver xorgproto util-macros"
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunXORG_DRIVER_COMPRESSOR ?= ".tar.bz2"
12*4882a593SmuzhiyunSRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}${XORG_DRIVER_COMPRESSOR}"
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunFILES:${PN} += " ${libdir}/xorg/modules/drivers/*.so"
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunXORGBUILDCLASS ??= "autotools"
17*4882a593Smuzhiyuninherit ${XORGBUILDCLASS} pkgconfig features_check
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun# depends on virtual/xserver
20*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "x11"
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun# FIXME: We don't want to include the libtool archives (*.la) from modules
23*4882a593Smuzhiyun# directory, as they serve no useful purpose. Upstream should fix Makefile.am
24*4882a593Smuzhiyundo_install:append() {
25*4882a593Smuzhiyun	find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f --
26*4882a593Smuzhiyun}
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun# Function to add the relevant ABI dependency to drivers, which should be called
29*4882a593Smuzhiyun# from a PACKAGEFUNC.
30*4882a593Smuzhiyundef _add_xorg_abi_depends(d, name):
31*4882a593Smuzhiyun    # Map of ABI names exposed in the dependencies to pkg-config variables
32*4882a593Smuzhiyun    abis = {
33*4882a593Smuzhiyun      "video": "abi_videodrv",
34*4882a593Smuzhiyun      "input": "abi_xinput"
35*4882a593Smuzhiyun    }
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun    output = os.popen("pkg-config xorg-server --variable=%s" % abis[name]).read()
38*4882a593Smuzhiyun    mlprefix = d.getVar('MLPREFIX') or ''
39*4882a593Smuzhiyun    abi = "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0])
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun    pn = d.getVar("PN")
42*4882a593Smuzhiyun    d.appendVar('RDEPENDS:' + pn, ' ' + abi)
43*4882a593Smuzhiyun
44*4882a593SmuzhiyunSECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}"
45