gnome-base/gsettings-desktop-schemas: remove old
[gentoo.git] / gnome-base / librsvg / librsvg-2.40.21.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 GNOME2_LA_PUNT="yes"
6 VALA_USE_DEPEND="vapigen"
7
8 inherit autotools eutils gnome2 multilib-minimal vala
9
10 DESCRIPTION="Scalable Vector Graphics (SVG) rendering library"
11 HOMEPAGE="https://wiki.gnome.org/Projects/LibRsvg"
12
13 LICENSE="LGPL-2+"
14 SLOT="2"
15 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
16
17 IUSE="+introspection tools +vala"
18 REQUIRED_USE="vala? ( introspection )"
19
20 RDEPEND="
21         >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
22         >=x11-libs/cairo-1.12.14-r4[${MULTILIB_USEDEP}]
23         >=x11-libs/pango-1.38.0[${MULTILIB_USEDEP}]
24         >=dev-libs/libxml2-2.9.1-r4:2[${MULTILIB_USEDEP}]
25         >=dev-libs/libcroco-0.6.8-r1[${MULTILIB_USEDEP}]
26         >=x11-libs/gdk-pixbuf-2.30.7:2[introspection?,${MULTILIB_USEDEP}]
27         introspection? ( >=dev-libs/gobject-introspection-0.10.8:= )
28         tools? ( >=x11-libs/gtk+-3.10.0:3 )
29 "
30 DEPEND="${RDEPEND}
31         dev-libs/gobject-introspection-common
32         dev-libs/vala-common
33         dev-util/glib-utils
34         >=dev-util/gtk-doc-am-1.13
35         >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
36         vala? ( $(vala_depend) )
37 "
38 # >=gtk-doc-am-1.13, gobject-introspection-common, vala-common needed by eautoreconf
39
40 RESTRICT="test" # Lots of issues due to freetype changes and more; ever since newer tests got backported into 2.40.19
41
42 src_prepare() {
43         # https://bugzilla.gnome.org/show_bug.cgi?id=653323
44         eapply "${FILESDIR}/${PN}-2.40.12-gtk-optional.patch"
45
46         eautoreconf
47
48         use vala && vala_src_prepare
49         gnome2_src_prepare
50 }
51
52 multilib_src_configure() {
53         local myconf=()
54
55         # -Bsymbolic is not supported by the Darwin toolchain
56         if [[ ${CHOST} == *-darwin* ]]; then
57                 myconf+=( --disable-Bsymbolic )
58         fi
59
60         # --disable-tools even when USE=tools; the tools/ subdirectory is useful
61         # only for librsvg developers
62         ECONF_SOURCE=${S} \
63         gnome2_src_configure \
64                 --disable-static \
65                 --disable-tools \
66                 $(multilib_native_use_enable introspection) \
67                 $(multilib_native_use_with tools gtk3) \
68                 $(multilib_native_use_enable vala) \
69                 --enable-pixbuf-loader \
70                 "${myconf[@]}"
71
72         if multilib_is_native_abi; then
73                 ln -s "${S}"/doc/html doc/html || die
74         fi
75 }
76
77 multilib_src_compile() {
78         # causes segfault if set, see bug #411765
79         unset __GL_NO_DSO_FINALIZER
80         gnome2_src_compile
81 }
82
83 multilib_src_install() {
84         gnome2_src_install
85 }
86
87 pkg_postinst() {
88         # causes segfault if set, see bug 375615
89         unset __GL_NO_DSO_FINALIZER
90         multilib_foreach_abi gnome2_pkg_postinst
91 }
92
93 pkg_postrm() {
94         # causes segfault if set, see bug 375615
95         unset __GL_NO_DSO_FINALIZER
96         multilib_foreach_abi gnome2_pkg_postrm
97 }