Merge remote-tracking branch 'github/pr/703'. Fixes bug 560362.
[gentoo.git] / app-text / libwpd / libwpd-0.10.0-r2.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
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 +tools"
17
18 COMMON_DEPEND="dev-libs/librevenge"
19 DEPEND="${COMMON_DEPEND}
20         virtual/pkgconfig
21         doc? ( app-doc/doxygen )
22 "
23 RDEPEND="${COMMON_DEPEND}
24         !<app-text/libwpd-0.8.14-r1"
25
26 src_configure() {
27         econf \
28                 --disable-static \
29                 --disable-werror \
30                 $(use_with doc docs) \
31                 $(use_enable tools) \
32                 --docdir="${EPREFIX}"/usr/share/doc/${PF} \
33                 --program-suffix=-${SLOT}
34 }
35
36 src_install() {
37         default
38         prune_libtool_files --all
39 }
40
41 pkg_postinst() {
42         if use tools; then
43                 alternatives_auto_makesym /usr/bin/wpd2html "/usr/bin/wpd2html-[0-9].[0-9][0-9]"
44                 alternatives_auto_makesym /usr/bin/wpd2raw "/usr/bin/wpd2raw-[0-9].[0-9][0-9]"
45                 alternatives_auto_makesym /usr/bin/wpd2text "/usr/bin/wpd2text-[0-9].[0-9][0-9]"
46         fi
47 }
48
49 pkg_postrm() {
50         if use tools; then
51                 alternatives_auto_makesym /usr/bin/wpd2html "/usr/bin/wpd2html-[0-9].[0-9][0-9]"
52                 alternatives_auto_makesym /usr/bin/wpd2raw "/usr/bin/wpd2raw-[0-9].[0-9][0-9]"
53                 alternatives_auto_makesym /usr/bin/wpd2text "/usr/bin/wpd2text-[0-9].[0-9][0-9]"
54         fi
55 }