summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-font/xorg-font-common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/xorg-font/xorg-font-common.inc')
-rw-r--r--meta/recipes-graphics/xorg-font/xorg-font-common.inc44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-font/xorg-font-common.inc b/meta/recipes-graphics/xorg-font/xorg-font-common.inc
new file mode 100644
index 0000000000..55adde3608
--- /dev/null
+++ b/meta/recipes-graphics/xorg-font/xorg-font-common.inc
@@ -0,0 +1,44 @@
1HOMEPAGE = "http://www.x.org"
2BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg"
3
4SECTION = "x11/fonts"
5LICENSE = "MIT-X"
6
7DEPENDS = " encodings font-alias font-util-native mkfontdir-native mkfontscale-native"
8RDEPENDS_${PN} = "encodings font-util font-alias"
9
10XORG_PN = "${BPN}"
11INC_PR = "r2"
12
13SRC_URI = "${XORG_MIRROR}/individual/font/${XORG_PN}-${PV}.tar.bz2"
14S = "${WORKDIR}/${XORG_PN}-${PV}"
15
16inherit autotools pkgconfig
17
18EXTRA_OEMAKE += "FCCACHE=/bin/true"
19
20do_configure_prepend() {
21 if [ -f "${S}"/configure.ac ] ; then
22 sed -i "s#^MAPFILES_PATH=.*#MAPFILES_PATH=\"${STAGING_DIR_TARGET}/\$(pkg-config --variable=mapdir fontutil)\"#g" "${S}"/configure.ac
23 fi
24}
25
26do_install_append() {
27 find ${D}${libdir}/X11/fonts -type f -name fonts.dir | xargs rm -f
28 find ${D}${libdir}/X11/fonts -type f -name fonts.scale | xargs rm -f
29 find ${D}${datadir}/fonts/X11 -type f -name fonts.dir | xargs rm -f
30 find ${D}${datadir}/fonts/X11 -type f -name fonts.scale | xargs rm -f
31}
32
33FILES_${PN} += " ${libdir}/X11/fonts ${datadir}"
34
35pkg_postinst_${PN} () {
36 for fontdir in `find $D/usr/lib/X11/fonts -type d`; do
37 mkfontdir $fontdir
38 mkfontscale $fontdir
39 done
40 for fontdir in `find $D/usr/share/fonts/X11 -type d`; do
41 mkfontdir $fontdir
42 mkfontscale $fontdir
43 done
44}