dev-libs/xapian: version bump to 1.4.14
[gentoo.git] / dev-libs / xapian / xapian-1.4.14.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="7"
5
6 inherit eutils multilib-minimal
7
8 MY_P="${PN}-core-${PV}"
9
10 DESCRIPTION="Xapian Probabilistic Information Retrieval library"
11 HOMEPAGE="https://www.xapian.org/"
12 SRC_URI="https://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 ~s390 ~sparc ~x86 ~x64-solaris"
17 IUSE="doc static-libs -cpu_flags_x86_sse +cpu_flags_x86_sse2 +inmemory +remote"
18
19 DEPEND="sys-libs/zlib"
20 RDEPEND="${DEPEND}"
21
22 S="${WORKDIR}/${MY_P}"
23
24 multilib_src_configure() {
25         local myconf=""
26
27         if use cpu_flags_x86_sse2; then
28                 myconf="${myconf} --enable-sse=sse2"
29         else
30                 if use cpu_flags_x86_sse; then
31                         myconf="${myconf} --enable-sse=sse"
32                 else
33                         myconf="${myconf} --disable-sse"
34                 fi
35         fi
36
37         myconf="${myconf} $(use_enable static-libs static)"
38
39         use inmemory || myconf="${myconf} --disable-backend-inmemory"
40         use remote || myconf="${myconf} --disable-backend-remote"
41
42         myconf="${myconf} --enable-backend-glass --enable-backend-chert --program-suffix="
43
44         ECONF_SOURCE=${S} econf $myconf
45 }
46
47 MULTILIB_WRAPPED_HEADERS=(
48         /usr/include/xapian/postingsource.h
49         /usr/include/xapian/attributes.h
50         /usr/include/xapian/valuesetmatchdecider.h
51         /usr/include/xapian/version.h
52         /usr/include/xapian/version.h
53         /usr/include/xapian/types.h
54         /usr/include/xapian/positioniterator.h
55         /usr/include/xapian/registry.h
56 )
57
58 multilib_src_test() {
59         emake check VALGRIND=
60 }
61
62 multilib_src_install() {
63         emake DESTDIR="${D}" install
64 }
65
66 multilib_src_install_all() {
67         if use doc; then
68                 rm -rf "${D}/usr/share/doc/xapian-core-${PV}" || die
69         fi
70
71         dodoc AUTHORS HACKING PLATFORMS README NEWS
72
73         find "${D}" -name "*.la" -type f -delete || die
74 }