blob: ffb813d290540d04bb3af5c41fc7600310c37df0 [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"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050020# Adapt the licenses for cairo-dbg and cairo-src depending on whether
21# cairo-trace is being built.
22LICENSE:${PN}-dbg = "(MPL-1.1 | LGPL-2.1-only)${@bb.utils.contains('PACKAGECONFIG', 'trace', ' & GPL-3.0-or-later', '', d)}"
23LICENSE:${PN}-src = "(MPL-1.1 | LGPL-2.1-only)${@bb.utils.contains('PACKAGECONFIG', 'trace', ' & GPL-3.0-or-later', '', d)}"
Brad Bishop19323692019-04-05 15:28:33 -040024
Andrew Geisslerd5838332022-05-27 11:33:10 -050025LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77 \
Andrew Geissler87f5cff2022-09-30 13:13:31 -050026 ${@bb.utils.contains('PACKAGECONFIG', 'trace', 'file://util/cairo-trace/COPYING-GPL-3;md5=d32239bcb673463ab874e80d47fae504', '', d)}"
Andrew Geisslerd5838332022-05-27 11:33:10 -050027
Brad Bishop19323692019-04-05 15:28:33 -040028
29DEPENDS = "fontconfig glib-2.0 libpng pixman zlib"
30
31SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \
Andrew Geissler4ed12e12020-06-05 18:00:41 -050032 file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \
Brad Bishop19323692019-04-05 15:28:33 -040033 file://CVE-2018-19876.patch \
34 file://CVE-2019-6461.patch \
35 file://CVE-2019-6462.patch \
William A. Kennington IIIac69b482021-06-02 12:28:27 -070036 file://CVE-2020-35492.patch \
Brad Bishop19323692019-04-05 15:28:33 -040037 "
38
39SRC_URI[md5sum] = "f19e0353828269c22bd72e271243a552"
40SRC_URI[sha256sum] = "5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331"
41
42inherit autotools pkgconfig upstream-version-is-even gtk-doc multilib_script
43
44MULTILIB_SCRIPTS = "${PN}-perf-utils:${bindir}/cairo-trace"
45
46X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
47
48PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
49 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
Andrew Geissler82c905d2020-04-13 13:39:40 -050050 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \
51 trace"
Patrick Williams213cb262021-08-07 19:21:33 -050052PACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}"
53PACKAGECONFIG:class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}"
Brad Bishop19323692019-04-05 15:28:33 -040054
55PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
56PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
57PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
58PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
59PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
60PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
61PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
Andrew Geisslerd5838332022-05-27 11:33:10 -050062# trace is under GPLv3
Andrew Geissler82c905d2020-04-13 13:39:40 -050063PACKAGECONFIG[trace] = "--enable-trace,--disable-trace"
Brad Bishop19323692019-04-05 15:28:33 -040064
65EXTRA_OECONF += " \
66 ${@bb.utils.contains('TARGET_FPU', 'soft', '--disable-some-floating-point', '', d)} \
67 --enable-tee \
68"
69
70# We don't depend on binutils so we need to disable this
71export ac_cv_lib_bfd_bfd_openr="no"
72# Ensure we don't depend on LZO
73export ac_cv_lib_lzo2_lzo2a_decompress="no"
74
Patrick Williams213cb262021-08-07 19:21:33 -050075do_install:append () {
Brad Bishop19323692019-04-05 15:28:33 -040076 rm -rf ${D}${bindir}/cairo-sphinx
77 rm -rf ${D}${libdir}/cairo/cairo-fdr*
78 rm -rf ${D}${libdir}/cairo/cairo-sphinx*
79 rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
80 rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
Andrew Geissler4ed12e12020-06-05 18:00:41 -050081 [ ! -d ${D}${bindir} ] ||
82 rmdir -p --ignore-fail-on-non-empty ${D}${bindir}
83 [ ! -d ${D}${libdir}/cairo ] ||
84 rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/cairo
Brad Bishop19323692019-04-05 15:28:33 -040085}
86
87PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
88
Patrick Williams213cb262021-08-07 19:21:33 -050089SUMMARY:cairo-gobject = "The Cairo library GObject wrapper library"
90DESCRIPTION:cairo-gobject = "A GObject wrapper library for the Cairo API."
Brad Bishop19323692019-04-05 15:28:33 -040091
Patrick Williams213cb262021-08-07 19:21:33 -050092SUMMARY:cairo-script-interpreter = "The Cairo library script interpreter"
93DESCRIPTION:cairo-script-interpreter = "The Cairo script interpreter implements \
Brad Bishop19323692019-04-05 15:28:33 -040094CairoScript. CairoScript is used by tracing utilities to enable the ability \
95to replay rendering."
96
Patrick Williams213cb262021-08-07 19:21:33 -050097DESCRIPTION:cairo-perf-utils = "The Cairo library performance utilities"
Brad Bishop19323692019-04-05 15:28:33 -040098
Patrick Williams213cb262021-08-07 19:21:33 -050099FILES:${PN} = "${libdir}/libcairo.so.*"
100FILES:${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
101FILES:${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
102FILES:${PN}-perf-utils = "${bindir}/cairo-trace* ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so"
Brad Bishop19323692019-04-05 15:28:33 -0400103
104BBCLASSEXTEND = "native nativesdk"
105
106UPSTREAM_CHECK_REGEX = "cairo-(?P<pver>\d+(\.\d+)+).tar.xz"