1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 MY_P="${PN}-core-${PV}"
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"
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"
19 DEPEND="sys-libs/zlib"
22 S="${WORKDIR}/${MY_P}"
28 if use cpu_flags_x86_sse2; then
30 myconf="${myconf} --enable-sse=sse2"
32 if use cpu_flags_x86_sse; then
34 myconf="${myconf} --enable-sse=sse"
36 einfo "Disabling sse and sse2"
37 myconf="${myconf} --disable-sse"
42 myconf="${myconf} $(use_enable static-libs static)"
44 use brass || myconf="${myconf} --disable-backend-brass"
45 use chert || myconf="${myconf} --disable-backend-chert"
46 use inmemory || myconf="${myconf} --disable-backend-inmemory"
48 myconf="${myconf} --enable-backend-flint --enable-backend-remote"
54 emake DESTDIR="${D}" install
56 mv "${ED}usr/share/doc/xapian-core" "${ED}usr/share/doc/${PF}" || die
57 use doc || rm -rf "${ED}usr/share/doc/${PF}"
59 dodoc AUTHORS HACKING PLATFORMS README NEWS
61 find "${D}" -name "*.la" -type f -delete || die