dev-libs/xapian: version bump to 1.4.6
[gentoo.git] / dev-libs / xapian / xapian-1.4.6.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5
6 inherit eutils multilib-minimal
7
8 MY_P="${PN}-core-${PV}"
9
10 DESCRIPTION="Xapian Probabilistic Information Retrieval library"
11 HOMEPAGE="http://www.xapian.org/"
12 SRC_URI="http://oligarchy.co.uk/xapian/${PV}/${MY_P}.tar.xz"
13
14 LICENSE="GPL-2"
15 SLOT="0/30" # ABI version of libxapian.so
16 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x64-solaris"
17 IUSE="doc static-libs -cpu_flags_x86_sse +cpu_flags_x86_sse2 +glass +chert +inmemory"
18
19 DEPEND="sys-libs/zlib"
20 RDEPEND="${DEPEND}"
21
22 REQUIRED_USE="inmemory? ( chert )"
23
24 S="${WORKDIR}/${MY_P}"
25
26 multilib_src_configure() {
27         local myconf=""
28
29         if use cpu_flags_x86_sse2; then
30                 myconf="${myconf} --enable-sse=sse2"
31         else
32                 if use cpu_flags_x86_sse; then
33                         myconf="${myconf} --enable-sse=sse"
34                 else
35                         myconf="${myconf} --disable-sse"
36                 fi
37         fi
38
39         myconf="${myconf} $(use_enable static-libs static)"
40
41         use glass || myconf="${myconf} --disable-backend-glass"
42         use chert || myconf="${myconf} --disable-backend-chert"
43         use inmemory || myconf="${myconf} --disable-backend-inmemory"
44
45         myconf="${myconf} --enable-backend-remote --program-suffix="
46
47         ECONF_SOURCE=${S} econf $myconf
48 }
49
50 MULTILIB_WRAPPED_HEADERS=(
51         /usr/include/xapian/postingsource.h
52         /usr/include/xapian/attributes.h
53         /usr/include/xapian/valuesetmatchdecider.h
54         /usr/include/xapian/version.h
55         /usr/include/xapian/version.h
56         /usr/include/xapian/types.h
57         /usr/include/xapian/positioniterator.h
58         /usr/include/xapian/registry.h
59 )
60
61 multilib_src_install() {
62         emake DESTDIR="${D}" install
63 }
64
65 multilib_src_install_all() {
66         # bug #573466
67         ln -sf "${D}usr/bin/xapian-config" "${D}usr/bin/xapian-config-1.3"
68
69         use doc || rm -rf "${D}usr/share/doc/xapian-core-${PV}"
70
71         dodoc AUTHORS HACKING PLATFORMS README NEWS
72
73         prune_libtool_files --all
74 }
75
76 multilib_src_test() {
77         emake check VALGRIND=
78 }