1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils multilib-minimal
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/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 +glass +chert +inmemory"
19 DEPEND="sys-libs/zlib"
22 REQUIRED_USE="inmemory? ( chert )"
24 S="${WORKDIR}/${MY_P}"
26 multilib_src_configure() {
29 if use cpu_flags_x86_sse2; then
30 myconf="${myconf} --enable-sse=sse2"
32 if use cpu_flags_x86_sse; then
33 myconf="${myconf} --enable-sse=sse"
35 myconf="${myconf} --disable-sse"
39 myconf="${myconf} $(use_enable static-libs static)"
41 use glass || myconf="${myconf} --disable-backend-glass"
42 use chert || myconf="${myconf} --disable-backend-chert"
43 use inmemory || myconf="${myconf} --disable-backend-inmemory"
45 myconf="${myconf} --enable-backend-remote --program-suffix="
47 ECONF_SOURCE=${S} econf $myconf
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
61 multilib_src_install() {
62 emake DESTDIR="${D}" install
65 multilib_src_install_all() {
67 ln -sf "${D}usr/bin/xapian-config" "${D}usr/bin/xapian-config-1.3"
69 use doc || rm -rf "${D}usr/share/doc/xapian-core-${PV}"
71 dodoc AUTHORS HACKING PLATFORMS README NEWS
73 find "${D}" -name "*.la" -type f -delete || die