blob: 8b3f19426bc622fb4e89854eeae4b559f63e8ef3 [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"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00005LICENSE = "MIT"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006
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
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000011XORG_DRIVER_COMPRESSOR ?= ".tar.bz2"
12SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}${XORG_DRIVER_COMPRESSOR}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013
Patrick Williams213cb262021-08-07 19:21:33 -050014FILES:${PN} += " ${libdir}/xorg/modules/drivers/*.so"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015
Andrew Geissler82c905d2020-04-13 13:39:40 -050016XORGBUILDCLASS ??= "autotools"
17inherit ${XORGBUILDCLASS} pkgconfig features_check
18
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019# depends on virtual/xserver
20REQUIRED_DISTRO_FEATURES = "x11"
21
22# FIXME: We don't want to include the libtool archives (*.la) from modules
23# directory, as they serve no useful purpose. Upstream should fix Makefile.am
Patrick Williams213cb262021-08-07 19:21:33 -050024do_install:append() {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025 find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f --
26}
27
28# Function to add the relevant ABI dependency to drivers, which should be called
29# from a PACKAGEFUNC.
30def _add_xorg_abi_depends(d, name):
31 # Map of ABI names exposed in the dependencies to pkg-config variables
32 abis = {
33 "video": "abi_videodrv",
34 "input": "abi_xinput"
35 }
36
37 output = os.popen("pkg-config xorg-server --variable=%s" % abis[name]).read()
Brad Bishop6e60e8b2018-02-01 10:27:11 -050038 mlprefix = d.getVar('MLPREFIX') or ''
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039 abi = "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0])
40
Brad Bishop6e60e8b2018-02-01 10:27:11 -050041 pn = d.getVar("PN")
Patrick Williams213cb262021-08-07 19:21:33 -050042 d.appendVar('RDEPENDS:' + pn, ' ' + abi)
Brad Bishop316dfdd2018-06-25 12:45:53 -040043
44SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}"