Merge remote-tracking branch 'github/pr/703'. Fixes bug 560362.
[gentoo.git] / app-text / libwpd / libwpd-0.10.0.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 inherit alternatives eutils
8
9 DESCRIPTION="WordPerfect Document import/export library"
10 HOMEPAGE="http://libwpd.sf.net"
11 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
12
13 LICENSE="|| ( LGPL-2.1 MPL-2.0 )"
14 SLOT="0.10"
15 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~x86 ~x86-fbsd"
16 IUSE="doc test +tools"
17
18 RDEPEND="dev-libs/librevenge"
19 DEPEND="${RDEPEND}
20         virtual/pkgconfig
21         doc? ( app-doc/doxygen )
22         test? ( dev-util/cppunit )
23 "
24 RDEPEND="${RDEPEND}
25         !<app-text/libwpd-0.8.14-r1"
26
27 src_configure() {
28         econf \
29                 --disable-static \
30                 --disable-werror \
31                 $(use_with doc docs) \
32                 $(use_with tools stream) \
33                 --docdir="${EPREFIX}"/usr/share/doc/${PF} \
34                 --program-suffix=-${SLOT}
35 }
36
37 src_install() {
38         default
39         prune_libtool_files --all
40 }
41
42 pkg_postinst() {
43         if use tools; then
44                 alternatives_auto_makesym /usr/bin/wpd2html "/usr/bin/wpd2html-[0-9].[0-10]"
45                 alternatives_auto_makesym /usr/bin/wpd2raw "/usr/bin/wpd2raw-[0-9].[0-10]"
46                 alternatives_auto_makesym /usr/bin/wpd2text "/usr/bin/wpd2text-[0-9].[0-10]"
47         fi
48 }
49
50 pkg_postrm() {
51         if use tools; then
52                 alternatives_auto_makesym /usr/bin/wpd2html "/usr/bin/wpd2html-[0-9].[0-10]"
53                 alternatives_auto_makesym /usr/bin/wpd2raw "/usr/bin/wpd2raw-[0-9].[0-10]"
54                 alternatives_auto_makesym /usr/bin/wpd2text "/usr/bin/wpd2text-[0-9].[0-10]"
55         fi
56 }