blob: 493b90a298c9156e3b0e46d91ccc5104ed6713ae [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "X driver"
2HOMEPAGE = "http://www.x.org"
3BUGTRACKER = "https://bugs.freedesktop.org"
4SECTION = "x11/drivers"
5LICENSE = "MIT-X"
6
7PE = "2"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08009DEPENDS = "virtual/xserver xorgproto util-macros"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010
11SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2"
12
13FILES_${PN} += " ${libdir}/xorg/modules/drivers/*.so"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014
Andrew Geissler82c905d2020-04-13 13:39:40 -050015XORGBUILDCLASS ??= "autotools"
16inherit ${XORGBUILDCLASS} pkgconfig features_check
17
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018# depends on virtual/xserver
19REQUIRED_DISTRO_FEATURES = "x11"
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
23do_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.
29def _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()
Brad Bishop6e60e8b2018-02-01 10:27:11 -050037 mlprefix = d.getVar('MLPREFIX') or ''
Patrick Williamsc124f4f2015-09-15 14:41:29 -050038 abi = "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0])
39
Brad Bishop6e60e8b2018-02-01 10:27:11 -050040 pn = d.getVar("PN")
Patrick Williamsc124f4f2015-09-15 14:41:29 -050041 d.appendVar('RDEPENDS_' + pn, ' ' + abi)
Brad Bishop316dfdd2018-06-25 12:45:53 -040042
43SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}"