blob: a3d29ddbae28d50173ad290bf2a23a989631e1e5 [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 \
Patrick Williams03907ee2022-05-01 06:28:52 -050017 "
Brad Bishopc342db32019-05-15 21:57:59 -040018
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
Patrick Williams864cc432023-02-09 14:54:44 -060027SRC_URI[sha256sum] = "3ba2dd92158718acec5caaf1a716043b5aa055c27b081d914af3ccb40dce8a55"
Brad Bishopc342db32019-05-15 21:57:59 -040028
29UPSTREAM_CHECK_REGEX = "fontconfig-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
30
Patrick Williams213cb262021-08-07 19:21:33 -050031do_configure:prepend() {
Brad Bishopc342db32019-05-15 21:57:59 -040032 # work around https://bugs.freedesktop.org/show_bug.cgi?id=101280
33 rm -f ${S}/src/fcobjshash.h ${S}/src/fcobjshash.gperf
34}
35
Patrick Williams213cb262021-08-07 19:21:33 -050036do_install:append:class-target() {
Brad Bishopc342db32019-05-15 21:57:59 -040037 # duplicate fc-cache for postinstall script
38 mkdir -p ${D}${libexecdir}
39 ln ${D}${bindir}/fc-cache ${D}${libexecdir}/${MLPREFIX}fc-cache
40}
41
Patrick Williams213cb262021-08-07 19:21:33 -050042do_install:append:class-nativesdk() {
Brad Bishopc342db32019-05-15 21:57:59 -040043 # duplicate fc-cache for postinstall script
44 mkdir -p ${D}${libexecdir}
45 ln ${D}${bindir}/fc-cache ${D}${libexecdir}/${MLPREFIX}fc-cache
46}
47
48PACKAGES =+ "fontconfig-utils"
Patrick Williams213cb262021-08-07 19:21:33 -050049FILES:${PN} =+ "${datadir}/xml/*"
50FILES:${PN}-dev += "${datadir}/gettext/*"
51FILES:fontconfig-utils = "${bindir}/* ${libexecdir}/*"
Brad Bishopc342db32019-05-15 21:57:59 -040052
53# Work around past breakage in debian.bbclass
Patrick Williams213cb262021-08-07 19:21:33 -050054RPROVIDES:fontconfig-utils = "libfontconfig-utils"
55RREPLACES:fontconfig-utils = "libfontconfig-utils"
56RCONFLICTS:fontconfig-utils = "libfontconfig-utils"
57DEBIAN_NOAUTONAME:fontconfig-utils = "1"
Brad Bishopc342db32019-05-15 21:57:59 -040058
59inherit autotools pkgconfig relative_symlinks gettext
60
61FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
62
63# comma separated list of additional directories
64# /usr/share/fonts is already included by default (you can change it with --with-default-fonts)
65FONTCONFIG_FONT_DIRS ?= "no"
66
67EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}"
68
69BBCLASSEXTEND = "native nativesdk"