util-linux-ng: fix swaponoff
[openembedded.git] / recipes / xorg-font / xorg-font-common.inc
1 HOMEPAGE = "http://www.x.org"
2 SECTION = "x11/fonts"
3 LICENSE = "MIT-X"
4
5 DEPENDS = " encodings font-alias font-util-native mkfontdir-native mkfontscale-native"
6 RDEPENDS = "encodings font-util font-alias"
7
8 INC_PR = "r2"
9
10 SRC_URI = "${XORG_MIRROR}/individual/font/${BPN}-${PV}.tar.bz2;name=archive"
11 S = "${WORKDIR}/${BPN}-${PV}"
12
13 inherit autotools pkgconfig
14
15 EXTRA_OEMAKE += "FCCACHE=/bin/true"
16
17 do_configure_prepend() {
18         if [ -f "${S}"/configure.ac ] ; then
19                 sed -i "s#^MAPFILES_PATH=.*#MAPFILES_PATH=\"${STAGING_DIR_TARGET}/\$(pkg-config --variable=mapdir fontutil)\"#g" "${S}"/configure.ac
20         fi
21 }
22
23 do_install_append() {
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
30 do_stage() {
31         autotools_stage_all
32 }
33
34 PACKAGE_ARCH = "all"
35
36 FILES_${PN} += " ${libdir}/X11/fonts ${datadir}"
37
38 pkg_postinst_${PN} () {
39         set -x
40         for fontdir in `find $D/usr/lib/X11/fonts -type d`; do
41                 mkfontdir $fontdir
42                 mkfontscale $fontdir
43         done
44         for fontdir in `find $D/usr/share/fonts/X11 -type d`; do
45                 mkfontdir $fontdir
46                 mkfontscale $fontdir
47         done
48 }