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