blob: c61cdd05b353e72f304b6a2959581cbd9464482b [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
Patrick Williams56b44a92024-01-19 08:49:29 -060016inherit pkgconfig features_check
Andrew Geissler82c905d2020-04-13 13:39:40 -050017XORGBUILDCLASS ??= "autotools"
Patrick Williams56b44a92024-01-19 08:49:29 -060018inherit_defer ${XORGBUILDCLASS}
Andrew Geissler82c905d2020-04-13 13:39:40 -050019
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020# depends on virtual/xserver
21REQUIRED_DISTRO_FEATURES = "x11"
22
23# FIXME: We don't want to include the libtool archives (*.la) from modules
24# directory, as they serve no useful purpose. Upstream should fix Makefile.am
Patrick Williams213cb262021-08-07 19:21:33 -050025do_install:append() {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026 find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f --
27}
28
29# Function to add the relevant ABI dependency to drivers, which should be called
30# from a PACKAGEFUNC.
31def _add_xorg_abi_depends(d, name):
32 # Map of ABI names exposed in the dependencies to pkg-config variables
33 abis = {
34 "video": "abi_videodrv",
35 "input": "abi_xinput"
36 }
37
38 output = os.popen("pkg-config xorg-server --variable=%s" % abis[name]).read()
Brad Bishop6e60e8b2018-02-01 10:27:11 -050039 mlprefix = d.getVar('MLPREFIX') or ''
Patrick Williamsc124f4f2015-09-15 14:41:29 -050040 abi = "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0])
41
Brad Bishop6e60e8b2018-02-01 10:27:11 -050042 pn = d.getVar("PN")
Patrick Williams213cb262021-08-07 19:21:33 -050043 d.appendVar('RDEPENDS:' + pn, ' ' + abi)
Brad Bishop316dfdd2018-06-25 12:45:53 -040044
45SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}"