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" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 5 | LICENSE = "MIT" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 7 | DEPENDS = " encodings font-alias font-util-native" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 8 | RDEPENDS:${PN} = "encodings font-util font-alias" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | |
| 10 | XORG_PN = "${BPN}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 11 | |
| 12 | SRC_URI = "${XORG_MIRROR}/individual/font/${XORG_PN}-${PV}.tar.bz2" |
| 13 | S = "${WORKDIR}/${XORG_PN}-${PV}" |
| 14 | |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 15 | inherit autotools pkgconfig features_check |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 16 | |
| 17 | # The mkfontscale-native requires x11 in DISTRO_FEATURES |
| 18 | REQUIRED_DISTRO_FEATURES = "x11" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | |
| 20 | EXTRA_OEMAKE += "FCCACHE=/bin/true UTIL_DIR=${STAGING_DIR_TARGET}\$\(MAPFILES_PATH\)" |
| 21 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 22 | do_install:append() { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 23 | find ${D}${libdir}/X11/fonts -type f -name fonts.dir | xargs rm -f |
| 24 | find ${D}${libdir}/X11/fonts -type f -name fonts.scale | xargs rm -f |
| 25 | find ${D}${datadir}/fonts/X11 -type f -name fonts.dir | xargs rm -f |
| 26 | find ${D}${datadir}/fonts/X11 -type f -name fonts.scale | xargs rm -f |
| 27 | } |
| 28 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 29 | FILES:${PN} += " ${libdir}/X11/fonts ${datadir}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 31 | PACKAGE_WRITE_DEPS += "mkfontdir-native mkfontscale-native" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 32 | pkg_postinst:${PN} () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 33 | for fontdir in `find $D/usr/lib/X11/fonts -type d`; do |
| 34 | mkfontdir $fontdir |
| 35 | mkfontscale $fontdir |
| 36 | done |
| 37 | for fontdir in `find $D/usr/share/fonts/X11 -type d`; do |
| 38 | mkfontdir $fontdir |
| 39 | mkfontscale $fontdir |
| 40 | done |
| 41 | } |