xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-gnome/librsvg/librsvg_2.52.7.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "Library for rendering SVG files"
2*4882a593SmuzhiyunDESCRIPTION = "A small library to render Scalable Vector Graphics (SVG), \
3*4882a593Smuzhiyunassociated with the GNOME Project. It renders SVG files to Cairo surfaces. \
4*4882a593SmuzhiyunCairo is the 2D, antialiased drawing library that GNOME uses to draw things to \
5*4882a593Smuzhiyunthe screen or to generate output for printing."
6*4882a593SmuzhiyunHOMEPAGE = "https://gitlab.gnome.org/GNOME/librsvg"
7*4882a593SmuzhiyunBUGTRACKER = "https://gitlab.gnome.org/GNOME/librsvg/issues"
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunLICENSE = "LGPL-2.1-or-later"
10*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
11*4882a593Smuzhiyun                   "
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunSECTION = "x11/utils"
14*4882a593SmuzhiyunDEPENDS = "cairo gdk-pixbuf glib-2.0 libcroco libxml2 pango"
15*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk"
16*4882a593Smuzhiyun
17*4882a593Smuzhiyuninherit gnomebase gtk-doc pixbufcache upstream-version-is-even gobject-introspection rust vala
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunSRC_URI += "file://0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.patch \
20*4882a593Smuzhiyun           file://0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch \
21*4882a593Smuzhiyun           "
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunSRC_URI[archive.sha256sum] = "057c1eeeaf85c84e254bdb707459207f5840da5b4d52b4711c03140ed09e6887"
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun# librsvg is still autotools-based, but is calling cargo from its automake-driven makefiles
26*4882a593Smuzhiyun# so we cannot use cargo class directly, but still need bits and pieces from it
27*4882a593Smuzhiyun# for cargo to be happy
28*4882a593SmuzhiyunBASEDEPENDS:append = " cargo-native"
29*4882a593Smuzhiyun
30*4882a593Smuzhiyunexport RUST_BACKTRACE = "full"
31*4882a593Smuzhiyunexport RUSTFLAGS
32*4882a593Smuzhiyunexport RUST_TARGET_PATH
33*4882a593Smuzhiyun
34*4882a593Smuzhiyunexport RUST_TARGET = "${HOST_SYS}"
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunRUSTFLAGS:append:mips = " --cfg crossbeam_no_atomic_64"
37*4882a593SmuzhiyunRUSTFLAGS:append:mipsel = " --cfg crossbeam_no_atomic_64"
38*4882a593SmuzhiyunRUSTFLAGS:append:powerpc = " --cfg crossbeam_no_atomic_64"
39*4882a593SmuzhiyunRUSTFLAGS:append:riscv32 = " --cfg crossbeam_no_atomic_64"
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun# rust-cross writes the target linker binary into target json definition without any flags.
42*4882a593Smuzhiyun# This breaks here because the linker isn't going to work without at least knowing where
43*4882a593Smuzhiyun# the sysroot is. So copy the json to workdir, and patch in the path to wrapper from rust class
44*4882a593Smuzhiyun# which supplies the needed flags.
45*4882a593Smuzhiyundo_compile:prepend() {
46*4882a593Smuzhiyun    cp ${STAGING_LIBDIR_NATIVE}/rustlib/${HOST_SYS}.json ${WORKDIR}
47*4882a593Smuzhiyun    cp ${STAGING_LIBDIR_NATIVE}/rustlib/${BUILD_SYS}.json ${WORKDIR}
48*4882a593Smuzhiyun    sed -ie 's,"linker": ".*","linker": "${RUST_TARGET_CC}",g' ${WORKDIR}/${HOST_SYS}.json
49*4882a593Smuzhiyun    RUST_TARGET_PATH="${WORKDIR}"
50*4882a593Smuzhiyun    export RUST_TARGET_PATH
51*4882a593Smuzhiyun}
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun# Issue only on windows
54*4882a593SmuzhiyunCVE_CHECK_IGNORE += "CVE-2018-1000041"
55*4882a593Smuzhiyun
56*4882a593SmuzhiyunCACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunPACKAGECONFIG ??= "gdkpixbuf"
59*4882a593Smuzhiyun# The gdk-pixbuf loader
60*4882a593SmuzhiyunPACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
61*4882a593Smuzhiyun
62*4882a593Smuzhiyundo_install:append() {
63*4882a593Smuzhiyun	# Loadable modules don't need .a or .la on Linux
64*4882a593Smuzhiyun	rm -f ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.a ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.la
65*4882a593Smuzhiyun}
66*4882a593Smuzhiyun
67*4882a593SmuzhiyunPACKAGES =+ "librsvg-gtk rsvg"
68*4882a593SmuzhiyunFILES:rsvg = "${bindir}/rsvg* \
69*4882a593Smuzhiyun	      ${datadir}/pixmaps/svg-viewer.svg \
70*4882a593Smuzhiyun	      ${datadir}/themes"
71*4882a593SmuzhiyunFILES:librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so \
72*4882a593Smuzhiyun                     ${datadir}/thumbnailers/librsvg.thumbnailer"
73*4882a593SmuzhiyunRRECOMMENDS:librsvg-gtk = "gdk-pixbuf-bin"
74*4882a593Smuzhiyun
75*4882a593SmuzhiyunPIXBUF_PACKAGES = "librsvg-gtk"
76