Merge remote-tracking branch 'jirutka/lxc-grsec'
[gentoo.git] / dev-libs / libsigc++ / libsigc++-2.4.1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6 GCONF_DEBUG="no"
7
8 inherit eutils gnome2 flag-o-matic multilib-minimal
9
10 DESCRIPTION="Typesafe callback system for standard C++"
11 HOMEPAGE="http://libsigc.sourceforge.net/"
12
13 LICENSE="LGPL-2.1+"
14 SLOT="2"
15 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
16 IUSE="doc static-libs test"
17
18 RDEPEND="abi_x86_32? (
19         !<=app-emulation/emul-linux-x86-cpplibs-20140508-r1
20         !app-emulation/emul-linux-x86-cpplibs[-abi_x86_32(-)] )
21 "
22 DEPEND="sys-devel/m4"
23 # Needs mm-common for eautoreconf
24
25 src_prepare() {
26         # don't waste time building examples
27         sed -i 's|^\(SUBDIRS =.*\)examples\(.*\)$|\1\2|' \
28                 Makefile.am Makefile.in || die "sed examples failed"
29
30         # don't waste time building tests unless USE=test
31         if ! use test ; then
32                 sed -i 's|^\(SUBDIRS =.*\)tests\(.*\)$|\1\2|' \
33                         Makefile.am Makefile.in || die "sed tests failed"
34         fi
35
36         gnome2_src_prepare
37 }
38
39 multilib_src_configure() {
40         filter-flags -fno-exceptions #84263
41
42         ECONF_SOURCE="${S}" gnome2_src_configure \
43                 $(multilib_native_use_enable doc documentation) \
44                 $(use_enable static-libs static)
45 }
46
47 multilib_src_install() {
48         gnome2_src_install
49 }
50
51 multilib_src_install_all() {
52         einstalldocs
53
54         # Note: html docs are installed into /usr/share/doc/libsigc++-2.0
55         # We can't use /usr/share/doc/${PF} because of links from glibmm etc. docs
56         if use doc ; then
57                 insinto /usr/share/doc/${PF}
58                 doins -r examples
59         fi
60 }