blob: d934f4625d9198490e197bf5c45801e6382bbec3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{13..14} )
CRATES="
"
RUST_MIN_VER="1.92.0"
RUST_MULTILIB=1
inherit cargo gnome2 meson-multilib python-any-r1 rust-toolchain vala
DESCRIPTION="Scalable Vector Graphics (SVG) rendering library"
HOMEPAGE="https://wiki.gnome.org/Projects/LibRsvg https://gitlab.gnome.org/GNOME/librsvg"
SRC_URI+=" https://github.com/gentoo-crate-dist/${PN}/releases/download/${PV}/${P}-crates.tar.xz"
LICENSE="LGPL-2.1+"
# Dependent crate licenses
LICENSE+="
Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD ISC MIT MPL-2.0
UoI-NCSA Unicode-3.0
"
SLOT="2"
KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~s390 ~sparc x86"
IUSE="+gtk-doc +introspection test +vala"
RESTRICT="!test? ( test )"
REQUIRED_USE="
gtk-doc? ( introspection )
vala? ( introspection )
"
RDEPEND="
>=x11-libs/cairo-1.17.0[glib,svg(+),${MULTILIB_USEDEP}]
>=media-libs/freetype-2.9:2[${MULTILIB_USEDEP}]
>=x11-libs/gdk-pixbuf-2.20:2[introspection?,${MULTILIB_USEDEP}]
>=dev-libs/glib-2.50.0:2[${MULTILIB_USEDEP}]
>=media-libs/harfbuzz-2.0.0:=[${MULTILIB_USEDEP}]
>=dev-libs/libxml2-2.9.1-r4:2=[${MULTILIB_USEDEP}]
>=x11-libs/pango-1.50.0[${MULTILIB_USEDEP}]
introspection? ( >=dev-libs/gobject-introspection-1.82.0-r2:= )
"
DEPEND="${RDEPEND}"
BDEPEND="
>=dev-util/cargo-c-0.10.10
x11-libs/gdk-pixbuf
${PYTHON_DEPS}
$(python_gen_any_dep 'dev-python/docutils[${PYTHON_USEDEP}]')
gtk-doc? ( dev-util/gi-docgen )
virtual/pkgconfig
vala? ( $(vala_depend) )
"
QA_FLAGS_IGNORED="
usr/bin/rsvg-convert
usr/lib.*/librsvg.*
usr/lib.*/gdk-pixbuf*/*/loaders/*
"
PATCHES=(
"${FILESDIR}"/${PN}-2.60.0-libxml2-2.15.0-tests.patch
)
pkg_setup() {
rust_pkg_setup
python-any-r1_pkg_setup
}
src_prepare() {
use vala && vala_setup
gnome2_src_prepare
}
src_configure() {
meson-multilib_src_configure
}
multilib_src_configure() {
local emesonargs=(
-Davif=disabled
$(meson_native_use_feature introspection)
-Dpixbuf=enabled
-Dpixbuf-loader=enabled
$(meson_native_use_feature gtk-doc docs)
$(meson_native_use_feature vala)
$(meson_use test tests)
)
if ! multilib_is_native_abi || tc-is-cross-compiler; then
emesonargs+=(
# Set the rust target, which can differ from CHOST
-Dtriplet="$(rust_abi)"
)
fi
cargo_env meson_src_configure
}
src_compile() {
meson-multilib_src_compile
}
multilib_src_compile() {
cargo_env meson_src_compile
}
multilib_src_test() {
cargo_env meson_src_test
}
src_test() {
meson-multilib_src_test
}
src_install() {
meson-multilib_src_install
}
multilib_src_install() {
cargo_env meson_src_install
}
multilib_src_install_all() {
einstalldocs
if use gtk-doc; then
mkdir -p "${ED}"/usr/share/gtk-doc/html/ || die
mv "${ED}"/usr/share/doc/Rsvg-2.0 "${ED}"/usr/share/gtk-doc/html/ || die
fi
}
pkg_preinst() {
multilib_foreach_abi gnome2_pkg_preinst
}
pkg_postinst() {
multilib_foreach_abi gnome2_pkg_postinst
}
pkg_postrm() {
multilib_foreach_abi gnome2_pkg_postrm
}
|