diff options
Diffstat (limited to 'meta/classes/fontcache.bbclass')
-rw-r--r-- | meta/classes/fontcache.bbclass | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/meta/classes/fontcache.bbclass b/meta/classes/fontcache.bbclass deleted file mode 100644 index 624a420a0d..0000000000 --- a/meta/classes/fontcache.bbclass +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | # | ||
2 | # This class will generate the proper postinst/postrm scriptlets for font | ||
3 | # packages. | ||
4 | # | ||
5 | |||
6 | PACKAGE_WRITE_DEPS += "qemu-native" | ||
7 | inherit qemu | ||
8 | |||
9 | FONT_PACKAGES ??= "${PN}" | ||
10 | FONT_EXTRA_RDEPENDS ?= "${MLPREFIX}fontconfig-utils" | ||
11 | FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig" | ||
12 | FONTCONFIG_CACHE_PARAMS ?= "-v" | ||
13 | # You can change this to e.g. FC_DEBUG=16 to debug fc-cache issues, | ||
14 | # something has to be set, because qemuwrapper is using this variable after -E | ||
15 | # multiple variables aren't allowed because for qemu they are separated | ||
16 | # by comma and in -n "$D" case they should be separated by space | ||
17 | FONTCONFIG_CACHE_ENV ?= "FC_DEBUG=1" | ||
18 | fontcache_common() { | ||
19 | if [ -n "$D" ] ; then | ||
20 | $INTERCEPT_DIR/postinst_intercept update_font_cache ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} \ | ||
21 | 'bindir="${bindir}"' \ | ||
22 | 'libdir="${libdir}"' \ | ||
23 | 'libexecdir="${libexecdir}"' \ | ||
24 | 'base_libdir="${base_libdir}"' \ | ||
25 | 'fontconfigcachedir="${FONTCONFIG_CACHE_DIR}"' \ | ||
26 | 'fontconfigcacheparams="${FONTCONFIG_CACHE_PARAMS}"' \ | ||
27 | 'fontconfigcacheenv="${FONTCONFIG_CACHE_ENV}"' | ||
28 | else | ||
29 | ${FONTCONFIG_CACHE_ENV} fc-cache ${FONTCONFIG_CACHE_PARAMS} | ||
30 | fi | ||
31 | } | ||
32 | |||
33 | python () { | ||
34 | font_pkgs = d.getVar('FONT_PACKAGES').split() | ||
35 | deps = d.getVar("FONT_EXTRA_RDEPENDS") | ||
36 | |||
37 | for pkg in font_pkgs: | ||
38 | if deps: d.appendVar('RDEPENDS_' + pkg, ' '+deps) | ||
39 | } | ||
40 | |||
41 | python add_fontcache_postinsts() { | ||
42 | for pkg in d.getVar('FONT_PACKAGES').split(): | ||
43 | bb.note("adding fonts postinst and postrm scripts to %s" % pkg) | ||
44 | postinst = d.getVar('pkg_postinst_%s' % pkg) or d.getVar('pkg_postinst') | ||
45 | if not postinst: | ||
46 | postinst = '#!/bin/sh\n' | ||
47 | postinst += d.getVar('fontcache_common') | ||
48 | d.setVar('pkg_postinst_%s' % pkg, postinst) | ||
49 | |||
50 | postrm = d.getVar('pkg_postrm_%s' % pkg) or d.getVar('pkg_postrm') | ||
51 | if not postrm: | ||
52 | postrm = '#!/bin/sh\n' | ||
53 | postrm += d.getVar('fontcache_common') | ||
54 | d.setVar('pkg_postrm_%s' % pkg, postrm) | ||
55 | } | ||
56 | |||
57 | PACKAGEFUNCS =+ "add_fontcache_postinsts" | ||