app-text/enchant: bump
[sgilles-overlay.git] / gnome-base / librsvg / librsvg-2.40.18.ebuild
blob59461320f0abd84c969004f1eaed8a93f273538b
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=6
5 GNOME2_LA_PUNT="yes"
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"
13 LICENSE="LGPL-2"
14 SLOT="2"
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 )"
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.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 )
30 DEPEND="${RDEPEND}
31         dev-libs/vala-common
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
38 src_prepare() {
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"
45         eautoreconf
47         use vala && vala_src_prepare
48         gnome2_src_prepare
51 multilib_src_configure() {
52         local myconf=()
54         # -Bsymbolic is not supported by the Darwin toolchain
55         if [[ ${CHOST} == *-darwin* ]]; then
56                 myconf+=( --disable-Bsymbolic )
57         fi
59         # --disable-tools even when USE=tools; the tools/ subdirectory is useful
60         # only for librsvg developers
61         ECONF_SOURCE=${S} \
62         gnome2_src_configure \
63                 --disable-static \
64                 --disable-tools \
65                 $(multilib_native_use_enable introspection) \
66                 $(multilib_native_use_with tools gtk3) \
67                 $(multilib_native_use_enable vala) \
68                 --enable-pixbuf-loader \
69                 "${myconf[@]}"
71         if multilib_is_native_abi; then
72                 ln -s "${S}"/doc/html doc/html || die
73         fi
76 multilib_src_compile() {
77         # causes segfault if set, see bug #411765
78         unset __GL_NO_DSO_FINALIZER
79         gnome2_src_compile
82 multilib_src_install() {
83         gnome2_src_install
86 pkg_postinst() {
87         # causes segfault if set, see bug 375615
88         unset __GL_NO_DSO_FINALIZER
89         multilib_foreach_abi gnome2_pkg_postinst
92 pkg_postrm() {
93         # causes segfault if set, see bug 375615
94         unset __GL_NO_DSO_FINALIZER
95         multilib_foreach_abi gnome2_pkg_postrm