diff options
Diffstat (limited to 'meta/recipes-graphics/xorg-font/xorg-font-common.inc')
-rw-r--r-- | meta/recipes-graphics/xorg-font/xorg-font-common.inc | 47 |
1 files changed, 47 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..c2175a9613 --- /dev/null +++ b/meta/recipes-graphics/xorg-font/xorg-font-common.inc | |||
@@ -0,0 +1,47 @@ | |||
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 | |||
7 | DEPENDS = " encodings font-alias font-util-native mkfontdir-native mkfontscale-native" | ||
8 | RDEPENDS = "encodings font-util font-alias" | ||
9 | |||
10 | XORG_PN = "${BPN}" | ||
11 | INC_PR = "r1" | ||
12 | |||
13 | SRC_URI = "${XORG_MIRROR}/individual/font/${XORG_PN}-${PV}.tar.bz2" | ||
14 | S = "${WORKDIR}/${XORG_PN}-${PV}" | ||
15 | |||
16 | inherit autotools pkgconfig | ||
17 | |||
18 | EXTRA_OEMAKE += "FCCACHE=/bin/true" | ||
19 | |||
20 | do_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 | |||
26 | do_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 | |||
33 | PACKAGE_ARCH = "all" | ||
34 | |||
35 | FILES_${PN} += " ${libdir}/X11/fonts ${datadir}" | ||
36 | |||
37 | pkg_postinst_${PN} () { | ||
38 | set -x | ||
39 | for fontdir in `find $D/usr/lib/X11/fonts -type d`; do | ||
40 | mkfontdir $fontdir | ||
41 | mkfontscale $fontdir | ||
42 | done | ||
43 | for fontdir in `find $D/usr/share/fonts/X11 -type d`; do | ||
44 | mkfontdir $fontdir | ||
45 | mkfontscale $fontdir | ||
46 | done | ||
47 | } | ||