xorg-driver-common.inc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. PE = "2"
  7. INC_PR = "r21"
  8. DEPENDS = "virtual/xserver xorgproto util-macros"
  9. SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2"
  10. FILES_${PN} += " ${libdir}/xorg/modules/drivers/*.so"
  11. inherit autotools pkgconfig features_check
  12. # depends on virtual/xserver
  13. REQUIRED_DISTRO_FEATURES = "x11"
  14. # FIXME: We don't want to include the libtool archives (*.la) from modules
  15. # directory, as they serve no useful purpose. Upstream should fix Makefile.am
  16. do_install_append() {
  17. find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f --
  18. }
  19. # Function to add the relevant ABI dependency to drivers, which should be called
  20. # from a PACKAGEFUNC.
  21. def _add_xorg_abi_depends(d, name):
  22. # Map of ABI names exposed in the dependencies to pkg-config variables
  23. abis = {
  24. "video": "abi_videodrv",
  25. "input": "abi_xinput"
  26. }
  27. output = os.popen("pkg-config xorg-server --variable=%s" % abis[name]).read()
  28. mlprefix = d.getVar('MLPREFIX') or ''
  29. abi = "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0])
  30. pn = d.getVar("PN")
  31. d.appendVar('RDEPENDS_' + pn, ' ' + abi)
  32. SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}"