xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-graphics/cairo/cairo_1.16.0.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "The Cairo 2D vector graphics library"
2*4882a593SmuzhiyunDESCRIPTION = "Cairo is a multi-platform library providing anti-aliased \
3*4882a593Smuzhiyunvector-based rendering for multiple target backends. Paths consist \
4*4882a593Smuzhiyunof line segments and cubic splines and can be rendered at any width \
5*4882a593Smuzhiyunwith various join and cap styles. All colors may be specified with \
6*4882a593Smuzhiyunoptional translucence (opacity/alpha) and combined using the \
7*4882a593Smuzhiyunextended Porter/Duff compositing algebra as found in the X Render \
8*4882a593SmuzhiyunExtension."
9*4882a593SmuzhiyunHOMEPAGE = "http://cairographics.org"
10*4882a593SmuzhiyunBUGTRACKER = "http://bugs.freedesktop.org"
11*4882a593SmuzhiyunSECTION = "libs"
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunLICENSE = "(MPL-1.1 | LGPL-2.1-only) & GPL-3.0-or-later"
14*4882a593SmuzhiyunLICENSE:${PN} = "MPL-1.1 | LGPL-2.1-only"
15*4882a593SmuzhiyunLICENSE:${PN}-dev = "MPL-1.1 | LGPL-2.1-only"
16*4882a593SmuzhiyunLICENSE:${PN}-doc = "MPL-1.1 | LGPL-2.1-only"
17*4882a593SmuzhiyunLICENSE:${PN}-gobject = "MPL-1.1 | LGPL-2.1-only"
18*4882a593SmuzhiyunLICENSE:${PN}-script-interpreter = "MPL-1.1 | LGPL-2.1-only"
19*4882a593SmuzhiyunLICENSE:${PN}-perf-utils = "GPL-3.0-or-later"
20*4882a593Smuzhiyun# Adapt the licenses for cairo-dbg and cairo-src depending on whether
21*4882a593Smuzhiyun# cairo-trace is being built.
22*4882a593SmuzhiyunLICENSE:${PN}-dbg = "(MPL-1.1 | LGPL-2.1-only)${@bb.utils.contains('PACKAGECONFIG', 'trace', ' & GPL-3.0-or-later', '', d)}"
23*4882a593SmuzhiyunLICENSE:${PN}-src = "(MPL-1.1 | LGPL-2.1-only)${@bb.utils.contains('PACKAGECONFIG', 'trace', ' & GPL-3.0-or-later', '', d)}"
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77 \
26*4882a593Smuzhiyun                    ${@bb.utils.contains('PACKAGECONFIG', 'trace', 'file://util/cairo-trace/COPYING-GPL-3;md5=d32239bcb673463ab874e80d47fae504', '', d)}"
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunDEPENDS = "fontconfig glib-2.0 libpng pixman zlib"
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunSRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \
32*4882a593Smuzhiyun           file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \
33*4882a593Smuzhiyun           file://CVE-2018-19876.patch \
34*4882a593Smuzhiyun           file://CVE-2019-6461.patch \
35*4882a593Smuzhiyun           file://CVE-2019-6462.patch \
36*4882a593Smuzhiyun           file://CVE-2020-35492.patch \
37*4882a593Smuzhiyun          "
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunSRC_URI[md5sum] = "f19e0353828269c22bd72e271243a552"
40*4882a593SmuzhiyunSRC_URI[sha256sum] = "5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331"
41*4882a593Smuzhiyun
42*4882a593Smuzhiyuninherit autotools pkgconfig upstream-version-is-even gtk-doc multilib_script
43*4882a593Smuzhiyun
44*4882a593SmuzhiyunMULTILIB_SCRIPTS = "${PN}-perf-utils:${bindir}/cairo-trace"
45*4882a593Smuzhiyun
46*4882a593SmuzhiyunX11DEPENDS = "virtual/libx11 libsm libxrender libxext"
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunPACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
49*4882a593Smuzhiyun                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
50*4882a593Smuzhiyun                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \
51*4882a593Smuzhiyun                   trace"
52*4882a593SmuzhiyunPACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}"
53*4882a593SmuzhiyunPACKAGECONFIG:class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}"
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunPACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
56*4882a593SmuzhiyunPACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
57*4882a593SmuzhiyunPACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
58*4882a593SmuzhiyunPACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
59*4882a593SmuzhiyunPACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
60*4882a593SmuzhiyunPACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
61*4882a593SmuzhiyunPACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
62*4882a593Smuzhiyun# trace is under GPLv3
63*4882a593SmuzhiyunPACKAGECONFIG[trace] = "--enable-trace,--disable-trace"
64*4882a593Smuzhiyun
65*4882a593SmuzhiyunEXTRA_OECONF += " \
66*4882a593Smuzhiyun    ${@bb.utils.contains('TARGET_FPU', 'soft', '--disable-some-floating-point', '', d)} \
67*4882a593Smuzhiyun    --enable-tee \
68*4882a593Smuzhiyun"
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun# We don't depend on binutils so we need to disable this
71*4882a593Smuzhiyunexport ac_cv_lib_bfd_bfd_openr="no"
72*4882a593Smuzhiyun# Ensure we don't depend on LZO
73*4882a593Smuzhiyunexport ac_cv_lib_lzo2_lzo2a_decompress="no"
74*4882a593Smuzhiyun
75*4882a593Smuzhiyundo_install:append () {
76*4882a593Smuzhiyun	rm -rf ${D}${bindir}/cairo-sphinx
77*4882a593Smuzhiyun	rm -rf ${D}${libdir}/cairo/cairo-fdr*
78*4882a593Smuzhiyun	rm -rf ${D}${libdir}/cairo/cairo-sphinx*
79*4882a593Smuzhiyun	rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
80*4882a593Smuzhiyun	rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
81*4882a593Smuzhiyun	[ ! -d ${D}${bindir} ] ||
82*4882a593Smuzhiyun		rmdir -p --ignore-fail-on-non-empty ${D}${bindir}
83*4882a593Smuzhiyun	[ ! -d ${D}${libdir}/cairo ] ||
84*4882a593Smuzhiyun		rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/cairo
85*4882a593Smuzhiyun}
86*4882a593Smuzhiyun
87*4882a593SmuzhiyunPACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
88*4882a593Smuzhiyun
89*4882a593SmuzhiyunSUMMARY:cairo-gobject = "The Cairo library GObject wrapper library"
90*4882a593SmuzhiyunDESCRIPTION:cairo-gobject = "A GObject wrapper library for the Cairo API."
91*4882a593Smuzhiyun
92*4882a593SmuzhiyunSUMMARY:cairo-script-interpreter = "The Cairo library script interpreter"
93*4882a593SmuzhiyunDESCRIPTION:cairo-script-interpreter = "The Cairo script interpreter implements \
94*4882a593SmuzhiyunCairoScript.  CairoScript is used by tracing utilities to enable the ability \
95*4882a593Smuzhiyunto replay rendering."
96*4882a593Smuzhiyun
97*4882a593SmuzhiyunDESCRIPTION:cairo-perf-utils = "The Cairo library performance utilities"
98*4882a593Smuzhiyun
99*4882a593SmuzhiyunFILES:${PN} = "${libdir}/libcairo.so.*"
100*4882a593SmuzhiyunFILES:${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
101*4882a593SmuzhiyunFILES:${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
102*4882a593SmuzhiyunFILES:${PN}-perf-utils = "${bindir}/cairo-trace* ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so"
103*4882a593Smuzhiyun
104*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk"
105*4882a593Smuzhiyun
106*4882a593SmuzhiyunUPSTREAM_CHECK_REGEX = "cairo-(?P<pver>\d+(\.\d+)+).tar.xz"
107