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" |
| 5 | LICENSE = "MIT-X" |
| 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 | |
| 11 | SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2" |
| 12 | |
| 13 | FILES_${PN} += " ${libdir}/xorg/modules/drivers/*.so" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 14 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 15 | XORGBUILDCLASS ??= "autotools" |
| 16 | inherit ${XORGBUILDCLASS} pkgconfig features_check |
| 17 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 18 | # depends on virtual/xserver |
| 19 | REQUIRED_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 |
| 23 | do_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. |
| 29 | def _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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 37 | mlprefix = d.getVar('MLPREFIX') or '' |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 38 | abi = "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0]) |
| 39 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 40 | pn = d.getVar("PN") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 41 | d.appendVar('RDEPENDS_' + pn, ' ' + abi) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 42 | |
| 43 | SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}" |