xorg-font-common.inc 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. HOMEPAGE = "http://www.x.org"
  2. BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg"
  3. SECTION = "x11/fonts"
  4. LICENSE = "MIT-X"
  5. DEPENDS = " encodings font-alias font-util-native"
  6. RDEPENDS_${PN} = "encodings font-util font-alias"
  7. XORG_PN = "${BPN}"
  8. INC_PR = "r2"
  9. SRC_URI = "${XORG_MIRROR}/individual/font/${XORG_PN}-${PV}.tar.bz2"
  10. S = "${WORKDIR}/${XORG_PN}-${PV}"
  11. inherit autotools pkgconfig features_check
  12. # The mkfontscale-native requires x11 in DISTRO_FEATURES
  13. REQUIRED_DISTRO_FEATURES = "x11"
  14. EXTRA_OEMAKE += "FCCACHE=/bin/true UTIL_DIR=${STAGING_DIR_TARGET}\$\(MAPFILES_PATH\)"
  15. do_install_append() {
  16. find ${D}${libdir}/X11/fonts -type f -name fonts.dir | xargs rm -f
  17. find ${D}${libdir}/X11/fonts -type f -name fonts.scale | xargs rm -f
  18. find ${D}${datadir}/fonts/X11 -type f -name fonts.dir | xargs rm -f
  19. find ${D}${datadir}/fonts/X11 -type f -name fonts.scale | xargs rm -f
  20. }
  21. FILES_${PN} += " ${libdir}/X11/fonts ${datadir}"
  22. PACKAGE_WRITE_DEPS += "mkfontdir-native mkfontscale-native"
  23. pkg_postinst_${PN} () {
  24. for fontdir in `find $D/usr/lib/X11/fonts -type d`; do
  25. mkfontdir $fontdir
  26. mkfontscale $fontdir
  27. done
  28. for fontdir in `find $D/usr/share/fonts/X11 -type d`; do
  29. mkfontdir $fontdir
  30. mkfontscale $fontdir
  31. done
  32. }