blob: ae5a45be544387506442454318fbc7bf06364253 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -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
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000014LICENSE = "MIT & MIT & PD"
Patrick Williams03907ee2022-05-01 06:28:52 -050015LIC_FILES_CHKSUM = "file://COPYING;md5=00252fd272bf2e722925613ad74cb6c7 \
16 file://src/fcfreetype.c;endline=45;md5=ce976b310a013a6ace6b60afa71851c1 \
17 file://src/fccache.c;beginline=1671;endline=1686;md5=906c2f04b0c79a1bcc84ecfca4de5619 \
18 "
Brad Bishopc342db32019-05-15 21:57:59 -040019
20SECTION = "libs"
21
22DEPENDS = "expat freetype zlib gperf-native util-linux"
23
24SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
25 file://revert-static-pkgconfig.patch \
26 "
27
Patrick Williams7784c422022-11-17 07:29:11 -060028SRC_URI[sha256sum] = "ae480e9ca34382790312ff062c625ec70df94d6d9a9366e2b2b3d525f7f90387"
Brad Bishopc342db32019-05-15 21:57:59 -040029
30UPSTREAM_CHECK_REGEX = "fontconfig-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
31
Patrick Williams213cb262021-08-07 19:21:33 -050032do_configure:prepend() {
Brad Bishopc342db32019-05-15 21:57:59 -040033 # work around https://bugs.freedesktop.org/show_bug.cgi?id=101280
34 rm -f ${S}/src/fcobjshash.h ${S}/src/fcobjshash.gperf
35}
36
Patrick Williams213cb262021-08-07 19:21:33 -050037do_install:append:class-target() {
Brad Bishopc342db32019-05-15 21:57:59 -040038 # duplicate fc-cache for postinstall script
39 mkdir -p ${D}${libexecdir}
40 ln ${D}${bindir}/fc-cache ${D}${libexecdir}/${MLPREFIX}fc-cache
41}
42
Patrick Williams213cb262021-08-07 19:21:33 -050043do_install:append:class-nativesdk() {
Brad Bishopc342db32019-05-15 21:57:59 -040044 # 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"
Patrick Williams213cb262021-08-07 19:21:33 -050050FILES:${PN} =+ "${datadir}/xml/*"
51FILES:${PN}-dev += "${datadir}/gettext/*"
52FILES:fontconfig-utils = "${bindir}/* ${libexecdir}/*"
Brad Bishopc342db32019-05-15 21:57:59 -040053
54# Work around past breakage in debian.bbclass
Patrick Williams213cb262021-08-07 19:21:33 -050055RPROVIDES:fontconfig-utils = "libfontconfig-utils"
56RREPLACES:fontconfig-utils = "libfontconfig-utils"
57RCONFLICTS:fontconfig-utils = "libfontconfig-utils"
58DEBIAN_NOAUTONAME:fontconfig-utils = "1"
Brad Bishopc342db32019-05-15 21:57:59 -040059
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"