xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-graphics/fontconfig/fontconfig_2.13.1.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1SUMMARY = "Generic font configuration library"
2DESCRIPTION = "Fontconfig is a font configuration and customization library, which \
3does not depend on the X Window System. It is designed to locate \
4fonts within the system and select them according to requirements \
5specified by applications. \
6Fontconfig is not a rasterization library, nor does it impose a \
7particular rasterization library on the application. The X-specific \
8library 'Xft' uses fontconfig along with freetype to specify and \
9rasterize fonts."
10
11HOMEPAGE = "http://www.fontconfig.org"
12BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig"
13
14LICENSE = "MIT & MIT & PD"
15LIC_FILES_CHKSUM = "file://COPYING;md5=7a0449e9bc5370402a94c00204beca3d \
16                    file://src/fcfreetype.c;endline=45;md5=5d9513e3196a1fbfdfa94051c09dfc84 \
17                    file://src/fccache.c;beginline=1671;endline=1686;md5=0326cfeb4a7333dd4dd25fbbc4b9f27f"
18
19SECTION = "libs"
20
21DEPENDS = "expat freetype zlib gperf-native util-linux"
22
23SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
24           file://revert-static-pkgconfig.patch \
25           "
26
27SRC_URI[md5sum] = "690c6cb840a92fa8908cdf462d19ec66"
28SRC_URI[sha256sum] = "9f0d852b39d75fc655f9f53850eb32555394f36104a044bb2b2fc9e66dbbfa7f"
29
30UPSTREAM_CHECK_REGEX = "fontconfig-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
31
32do_configure:prepend() {
33    # work around https://bugs.freedesktop.org/show_bug.cgi?id=101280
34    rm -f ${S}/src/fcobjshash.h ${S}/src/fcobjshash.gperf
35}
36
37do_install:append:class-target() {
38    # duplicate fc-cache for postinstall script
39    mkdir -p ${D}${libexecdir}
40    ln ${D}${bindir}/fc-cache ${D}${libexecdir}/${MLPREFIX}fc-cache
41}
42
43do_install:append:class-nativesdk() {
44    # duplicate fc-cache for postinstall script
45    mkdir -p ${D}${libexecdir}
46    ln ${D}${bindir}/fc-cache ${D}${libexecdir}/${MLPREFIX}fc-cache
47}
48
49PACKAGES =+ "fontconfig-utils"
50FILES:${PN} =+ "${datadir}/xml/*"
51FILES:${PN}-dev += "${datadir}/gettext/*"
52FILES:fontconfig-utils = "${bindir}/* ${libexecdir}/*"
53
54# Work around past breakage in debian.bbclass
55RPROVIDES:fontconfig-utils = "libfontconfig-utils"
56RREPLACES:fontconfig-utils = "libfontconfig-utils"
57RCONFLICTS:fontconfig-utils = "libfontconfig-utils"
58DEBIAN_NOAUTONAME:fontconfig-utils = "1"
59
60inherit autotools pkgconfig relative_symlinks gettext
61
62FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
63
64# comma separated list of additional directories
65# /usr/share/fonts is already included by default (you can change it with --with-default-fonts)
66FONTCONFIG_FONT_DIRS ?= "no"
67
68EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}"
69
70BBCLASSEXTEND = "native nativesdk"
71