citadel/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
brl 098b8f982b Squashed 'poky/' content from commit 4469acdf1d
git-subtree-dir: poky
git-subtree-split: 4469acdf1d0338220f3fe2ecb5e079eea6fda375
2017-12-04 16:35:29 -05:00

41 lines
1.2 KiB
PHP

SUMMARY = "X driver"
HOMEPAGE = "http://www.x.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "x11/drivers"
LICENSE = "MIT-X"
PE = "2"
INC_PR = "r21"
DEPENDS = "virtual/xserver xproto randrproto util-macros"
SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2"
FILES_${PN} += " ${libdir}/xorg/modules/drivers/*.so"
inherit autotools pkgconfig distro_features_check
# depends on virtual/xserver
REQUIRED_DISTRO_FEATURES = "x11"
# FIXME: We don't want to include the libtool archives (*.la) from modules
# directory, as they serve no useful purpose. Upstream should fix Makefile.am
do_install_append() {
find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f --
}
# Function to add the relevant ABI dependency to drivers, which should be called
# from a PACKAGEFUNC.
def _add_xorg_abi_depends(d, name):
# Map of ABI names exposed in the dependencies to pkg-config variables
abis = {
"video": "abi_videodrv",
"input": "abi_xinput"
}
output = os.popen("pkg-config xorg-server --variable=%s" % abis[name]).read()
mlprefix = d.getVar('MLPREFIX') or ''
abi = "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0])
pn = d.getVar("PN")
d.appendVar('RDEPENDS_' + pn, ' ' + abi)