xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-graphics/xorg-font/xorg-font-common.inc (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunHOMEPAGE = "http://www.x.org"
2*4882a593SmuzhiyunBUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg"
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunSECTION = "x11/fonts"
5*4882a593SmuzhiyunLICENSE = "MIT"
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunDEPENDS = " encodings font-alias font-util-native"
8*4882a593SmuzhiyunRDEPENDS:${PN} = "encodings font-util font-alias"
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunXORG_PN = "${BPN}"
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunSRC_URI_EXT = "bz2"
13*4882a593SmuzhiyunSRC_URI = "${XORG_MIRROR}/individual/font/${XORG_PN}-${PV}.tar.${SRC_URI_EXT}"
14*4882a593SmuzhiyunS = "${WORKDIR}/${XORG_PN}-${PV}"
15*4882a593Smuzhiyun
16*4882a593Smuzhiyuninherit autotools pkgconfig features_check
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun# The mkfontscale-native requires x11 in DISTRO_FEATURES
19*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "x11"
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunEXTRA_OEMAKE += "FCCACHE=/bin/true UTIL_DIR=${STAGING_DIR_TARGET}\$\(MAPFILES_PATH\)"
22*4882a593Smuzhiyun
23*4882a593Smuzhiyundo_install:append() {
24*4882a593Smuzhiyun	find ${D}${libdir}/X11/fonts -type f -name fonts.dir | xargs rm -f
25*4882a593Smuzhiyun	find ${D}${libdir}/X11/fonts -type f -name fonts.scale | xargs rm -f
26*4882a593Smuzhiyun	find ${D}${datadir}/fonts/X11 -type f -name fonts.dir | xargs rm -f
27*4882a593Smuzhiyun	find ${D}${datadir}/fonts/X11 -type f -name fonts.scale | xargs rm -f
28*4882a593Smuzhiyun}
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunFILES:${PN} += " ${libdir}/X11/fonts ${datadir}"
31*4882a593Smuzhiyun
32*4882a593SmuzhiyunPACKAGE_WRITE_DEPS += "mkfontdir-native mkfontscale-native"
33*4882a593Smuzhiyunpkg_postinst:${PN} () {
34*4882a593Smuzhiyun        for fontdir in `find $D/usr/lib/X11/fonts -type d`; do
35*4882a593Smuzhiyun                mkfontdir $fontdir
36*4882a593Smuzhiyun                mkfontscale $fontdir
37*4882a593Smuzhiyun        done
38*4882a593Smuzhiyun        for fontdir in `find $D/usr/share/fonts/X11 -type d`; do
39*4882a593Smuzhiyun                mkfontdir $fontdir
40*4882a593Smuzhiyun                mkfontscale $fontdir
41*4882a593Smuzhiyun        done
42*4882a593Smuzhiyun}
43