dev-libs/xapian: version bump to 1.4.14
[gentoo.git] / dev-libs / xapian / xapian-1.2.24.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 inherit eutils
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/1.2.22" # ABI version of libxapian.so, prefixed with 1.2.
16 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 sparc x86"
17 IUSE="doc static-libs -cpu_flags_x86_sse +cpu_flags_x86_sse2 +brass +chert +inmemory"
18
19 DEPEND="sys-libs/zlib"
20 RDEPEND="${DEPEND}"
21
22 S="${WORKDIR}/${MY_P}"
23
24 src_configure() {
25         local myconf=""
26
27         einfo
28         if use cpu_flags_x86_sse2; then
29                 einfo "Using sse2"
30                 myconf="${myconf} --enable-sse=sse2"
31         else
32                 if use cpu_flags_x86_sse; then
33                         einfo "Using sse"
34                         myconf="${myconf} --enable-sse=sse"
35                 else
36                         einfo "Disabling sse and sse2"
37                         myconf="${myconf} --disable-sse"
38                 fi
39         fi
40         einfo
41
42         myconf="${myconf} $(use_enable static-libs static)"
43
44         use brass || myconf="${myconf} --disable-backend-brass"
45         use chert || myconf="${myconf} --disable-backend-chert"
46         use inmemory || myconf="${myconf} --disable-backend-inmemory"
47
48         myconf="${myconf} --enable-backend-flint --enable-backend-remote"
49
50         econf $myconf
51 }
52
53 src_install() {
54         emake DESTDIR="${D}" install
55
56         mv "${ED}usr/share/doc/xapian-core" "${ED}usr/share/doc/${PF}" || die
57         use doc || rm -rf "${ED}usr/share/doc/${PF}"
58
59         dodoc AUTHORS HACKING PLATFORMS README NEWS
60
61         find "${D}" -name "*.la" -type f -delete || die
62 }
63
64 src_test() {
65         emake check VALGRIND=
66 }