blob: 8fa739de24924f580360fe25697186f84256b6b3 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "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-style & MIT & PD"
15LIC_FILES_CHKSUM = "file://COPYING;md5=7a0449e9bc5370402a94c00204beca3d \
16 file://src/fcfreetype.c;endline=45;md5=5d9513e3196a1fbfdfa94051c09dfc84 \
17 file://src/fccache.c;beginline=1367;endline=1382;md5=0326cfeb4a7333dd4dd25fbbc4b9f27f"
18
19SECTION = "libs"
20
21DEPENDS = "expat freetype zlib gperf-native"
22
23SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
24 file://revert-static-pkgconfig.patch \
25 file://0001-src-fcxml.c-avoid-double-free-of-filename.patch \
Brad Bishop19323692019-04-05 15:28:33 -040026 file://0001-src-fccache.c-Fix-define-for-HAVE_POSIX_FADVISE.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040027 "
28
29SRC_URI[md5sum] = "00e748c67fad11e7057a71ed385e8bdb"
30SRC_URI[sha256sum] = "064b9ebf060c9e77011733ac9dc0e2ce92870b574cca2405e11f5353a683c334"
31
32UPSTREAM_CHECK_REGEX = "fontconfig-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
33
34do_configure_prepend() {
35 # work around https://bugs.freedesktop.org/show_bug.cgi?id=101280
36 rm -f ${S}/src/fcobjshash.h ${S}/src/fcobjshash.gperf
37}
38
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080039do_install_append_class-target() {
40 # duplicate fc-cache for postinstall script
41 mkdir -p ${D}${libexecdir}
42 ln ${D}${bindir}/fc-cache ${D}${libexecdir}/${MLPREFIX}fc-cache
43}
44
Brad Bishop19323692019-04-05 15:28:33 -040045do_install_append_class-nativesdk() {
46 # duplicate fc-cache for postinstall script
47 mkdir -p ${D}${libexecdir}
48 ln ${D}${bindir}/fc-cache ${D}${libexecdir}/${MLPREFIX}fc-cache
49}
50
Brad Bishop316dfdd2018-06-25 12:45:53 -040051PACKAGES =+ "fontconfig-utils"
52FILES_${PN} =+ "${datadir}/xml/*"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080053FILES_fontconfig-utils = "${bindir}/* ${libexecdir}/*"
Brad Bishop316dfdd2018-06-25 12:45:53 -040054
55# Work around past breakage in debian.bbclass
56RPROVIDES_fontconfig-utils = "libfontconfig-utils"
57RREPLACES_fontconfig-utils = "libfontconfig-utils"
58RCONFLICTS_fontconfig-utils = "libfontconfig-utils"
59DEBIAN_NOAUTONAME_fontconfig-utils = "1"
60
61inherit autotools pkgconfig relative_symlinks
62
63FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
64
65# comma separated list of additional directories
66# /usr/share/fonts is already included by default (you can change it with --with-default-fonts)
67FONTCONFIG_FONT_DIRS ?= "no"
68
69EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}"
70
Brad Bishop19323692019-04-05 15:28:33 -040071BBCLASSEXTEND = "native nativesdk"