Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "X driver" |
| 2 | HOMEPAGE = "http://www.x.org" |
| 3 | BUGTRACKER = "https://bugs.freedesktop.org" |
| 4 | SECTION = "x11/drivers" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 5 | LICENSE = "MIT" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | |
| 7 | PE = "2" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 9 | DEPENDS = "virtual/xserver xorgproto util-macros" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 10 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 11 | XORG_DRIVER_COMPRESSOR ?= ".tar.bz2" |
| 12 | SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}${XORG_DRIVER_COMPRESSOR}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 13 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 14 | FILES:${PN} += " ${libdir}/xorg/modules/drivers/*.so" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 16 | XORGBUILDCLASS ??= "autotools" |
| 17 | inherit ${XORGBUILDCLASS} pkgconfig features_check |
| 18 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | # depends on virtual/xserver |
| 20 | REQUIRED_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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 24 | do_install:append() { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | 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. |
| 30 | def _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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 38 | mlprefix = d.getVar('MLPREFIX') or '' |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 39 | abi = "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0]) |
| 40 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 41 | pn = d.getVar("PN") |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 42 | d.appendVar('RDEPENDS:' + pn, ' ' + abi) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 43 | |
| 44 | SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}" |