blob: 0b5d1d548f670c47aa27c71eb4cf689f0856df9c [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "The Cairo 2D vector graphics library"
2DESCRIPTION = "Cairo is a multi-platform library providing anti-aliased \
3vector-based rendering for multiple target backends. Paths consist \
4of line segments and cubic splines and can be rendered at any width \
5with various join and cap styles. All colors may be specified with \
6optional translucence (opacity/alpha) and combined using the \
7extended Porter/Duff compositing algebra as found in the X Render \
8Extension."
9HOMEPAGE = "http://cairographics.org"
10BUGTRACKER = "http://bugs.freedesktop.org"
11SECTION = "libs"
12
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000013LICENSE = "(MPL-1.1 | LGPL-2.1-only) & GPL-3.0-or-later"
14LICENSE:${PN} = "MPL-1.1 | LGPL-2.1-only"
15LICENSE:${PN}-dev = "MPL-1.1 | LGPL-2.1-only"
16LICENSE:${PN}-doc = "MPL-1.1 | LGPL-2.1-only"
17LICENSE:${PN}-gobject = "MPL-1.1 | LGPL-2.1-only"
18LICENSE:${PN}-script-interpreter = "MPL-1.1 | LGPL-2.1-only"
19LICENSE:${PN}-perf-utils = "GPL-3.0-or-later"
Brad Bishop19323692019-04-05 15:28:33 -040020
21LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
22
23DEPENDS = "fontconfig glib-2.0 libpng pixman zlib"
24
25SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \
Andrew Geissler4ed12e12020-06-05 18:00:41 -050026 file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \
Brad Bishop19323692019-04-05 15:28:33 -040027 file://CVE-2018-19876.patch \
28 file://CVE-2019-6461.patch \
29 file://CVE-2019-6462.patch \
William A. Kennington IIIac69b482021-06-02 12:28:27 -070030 file://CVE-2020-35492.patch \
Brad Bishop19323692019-04-05 15:28:33 -040031 "
32
33SRC_URI[md5sum] = "f19e0353828269c22bd72e271243a552"
34SRC_URI[sha256sum] = "5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331"
35
36inherit autotools pkgconfig upstream-version-is-even gtk-doc multilib_script
37
38MULTILIB_SCRIPTS = "${PN}-perf-utils:${bindir}/cairo-trace"
39
40X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
41
42PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
43 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
Andrew Geissler82c905d2020-04-13 13:39:40 -050044 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \
45 trace"
Patrick Williams213cb262021-08-07 19:21:33 -050046PACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}"
47PACKAGECONFIG:class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}"
Brad Bishop19323692019-04-05 15:28:33 -040048
49PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
50PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
51PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
52PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
53PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
54PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
55PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
Andrew Geissler82c905d2020-04-13 13:39:40 -050056PACKAGECONFIG[trace] = "--enable-trace,--disable-trace"
Brad Bishop19323692019-04-05 15:28:33 -040057
58EXTRA_OECONF += " \
59 ${@bb.utils.contains('TARGET_FPU', 'soft', '--disable-some-floating-point', '', d)} \
60 --enable-tee \
61"
62
63# We don't depend on binutils so we need to disable this
64export ac_cv_lib_bfd_bfd_openr="no"
65# Ensure we don't depend on LZO
66export ac_cv_lib_lzo2_lzo2a_decompress="no"
67
Patrick Williams213cb262021-08-07 19:21:33 -050068do_install:append () {
Brad Bishop19323692019-04-05 15:28:33 -040069 rm -rf ${D}${bindir}/cairo-sphinx
70 rm -rf ${D}${libdir}/cairo/cairo-fdr*
71 rm -rf ${D}${libdir}/cairo/cairo-sphinx*
72 rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
73 rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
Andrew Geissler4ed12e12020-06-05 18:00:41 -050074 [ ! -d ${D}${bindir} ] ||
75 rmdir -p --ignore-fail-on-non-empty ${D}${bindir}
76 [ ! -d ${D}${libdir}/cairo ] ||
77 rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/cairo
Brad Bishop19323692019-04-05 15:28:33 -040078}
79
80PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
81
Patrick Williams213cb262021-08-07 19:21:33 -050082SUMMARY:cairo-gobject = "The Cairo library GObject wrapper library"
83DESCRIPTION:cairo-gobject = "A GObject wrapper library for the Cairo API."
Brad Bishop19323692019-04-05 15:28:33 -040084
Patrick Williams213cb262021-08-07 19:21:33 -050085SUMMARY:cairo-script-interpreter = "The Cairo library script interpreter"
86DESCRIPTION:cairo-script-interpreter = "The Cairo script interpreter implements \
Brad Bishop19323692019-04-05 15:28:33 -040087CairoScript. CairoScript is used by tracing utilities to enable the ability \
88to replay rendering."
89
Patrick Williams213cb262021-08-07 19:21:33 -050090DESCRIPTION:cairo-perf-utils = "The Cairo library performance utilities"
Brad Bishop19323692019-04-05 15:28:33 -040091
Patrick Williams213cb262021-08-07 19:21:33 -050092FILES:${PN} = "${libdir}/libcairo.so.*"
93FILES:${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
94FILES:${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
95FILES:${PN}-perf-utils = "${bindir}/cairo-trace* ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so"
Brad Bishop19323692019-04-05 15:28:33 -040096
97BBCLASSEXTEND = "native nativesdk"
98
99UPSTREAM_CHECK_REGEX = "cairo-(?P<pver>\d+(\.\d+)+).tar.xz"