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