1SUMMARY = "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 13LICENSE = "(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" 20# 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)}" 24 25LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77 \ 26 ${@bb.utils.contains('PACKAGECONFIG', 'trace', 'file://util/cairo-trace/COPYING-GPL-3;md5=d32239bcb673463ab874e80d47fae504', '', d)}" 27 28 29DEPENDS = "fontconfig glib-2.0 libpng pixman zlib" 30 31SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \ 32 file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \ 33 file://CVE-2018-19876.patch \ 34 file://CVE-2019-6461.patch \ 35 file://CVE-2019-6462.patch \ 36 file://CVE-2020-35492.patch \ 37 " 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)} \ 50 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \ 51 trace" 52PACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}" 53PACKAGECONFIG:class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}" 54 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" 62# trace is under GPLv3 63PACKAGECONFIG[trace] = "--enable-trace,--disable-trace" 64 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 75do_install:append () { 76 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* 81 [ ! -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 85} 86 87PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils" 88 89SUMMARY:cairo-gobject = "The Cairo library GObject wrapper library" 90DESCRIPTION:cairo-gobject = "A GObject wrapper library for the Cairo API." 91 92SUMMARY:cairo-script-interpreter = "The Cairo library script interpreter" 93DESCRIPTION:cairo-script-interpreter = "The Cairo script interpreter implements \ 94CairoScript. CairoScript is used by tracing utilities to enable the ability \ 95to replay rendering." 96 97DESCRIPTION:cairo-perf-utils = "The Cairo library performance utilities" 98 99FILES:${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" 103 104BBCLASSEXTEND = "native nativesdk" 105 106UPSTREAM_CHECK_REGEX = "cairo-(?P<pver>\d+(\.\d+)+).tar.xz" 107