1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 VALA_USE_DEPEND="vapigen"
8 inherit autotools eutils gnome2 multilib-minimal vala
10 DESCRIPTION="Scalable Vector Graphics (SVG) rendering library"
11 HOMEPAGE="https://wiki.gnome.org/Projects/LibRsvg"
15 KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
17 IUSE="+introspection tools vala"
18 REQUIRED_USE="vala? ( introspection )"
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.36.3[${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 )
32 >=dev-util/gtk-doc-am-1.13
33 >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
34 vala? ( $(vala_depend) )
36 # >=gtk-doc-am-1.13, gobject-introspection-common, vala-common needed by eautoreconf
39 # https://bugzilla.gnome.org/show_bug.cgi?id=653323
40 eapply "${FILESDIR}/${PN}-2.40.12-gtk-optional.patch"
42 # https://bugzilla.gnome.org/show_bug.cgi?id=731826
43 eapply "${FILESDIR}/${PN}-2.40.2-vala-out-of-source.patch"
47 use vala && vala_src_prepare
51 multilib_src_configure() {
54 # -Bsymbolic is not supported by the Darwin toolchain
55 if [[ ${CHOST} == *-darwin* ]]; then
56 myconf+=( --disable-Bsymbolic )
59 # --disable-tools even when USE=tools; the tools/ subdirectory is useful
60 # only for librsvg developers
62 gnome2_src_configure \
65 $(multilib_native_use_enable introspection) \
66 $(multilib_native_use_with tools gtk3) \
67 $(multilib_native_use_enable vala) \
68 --enable-pixbuf-loader \
71 if multilib_is_native_abi; then
72 ln -s "${S}"/doc/html doc/html || die
76 multilib_src_compile() {
77 # causes segfault if set, see bug #411765
78 unset __GL_NO_DSO_FINALIZER
82 multilib_src_install() {
87 # causes segfault if set, see bug 375615
88 unset __GL_NO_DSO_FINALIZER
89 multilib_foreach_abi gnome2_pkg_postinst
93 # causes segfault if set, see bug 375615
94 unset __GL_NO_DSO_FINALIZER
95 multilib_foreach_abi gnome2_pkg_postrm