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 +inmemory +remote"
19 DEPEND="sys-libs/zlib"
22 S="${WORKDIR}/${MY_P}"
24 multilib_src_configure() {
27 if use cpu_flags_x86_sse2; then
28 myconf="${myconf} --enable-sse=sse2"
30 if use cpu_flags_x86_sse; then
31 myconf="${myconf} --enable-sse=sse"
33 myconf="${myconf} --disable-sse"
37 myconf="${myconf} $(use_enable static-libs static)"
39 use inmemory || myconf="${myconf} --disable-backend-inmemory"
40 use remote || myconf="${myconf} --disable-backend-remote"
42 myconf="${myconf} --enable-backend-glass --enable-backend-chert --program-suffix="
44 ECONF_SOURCE=${S} econf $myconf
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
62 multilib_src_install() {
63 emake DESTDIR="${D}" install
66 multilib_src_install_all() {
68 rm -rf "${D}/usr/share/doc/xapian-core-${PV}" || die
71 dodoc AUTHORS HACKING PLATFORMS README NEWS
73 find "${D}" -name "*.la" -type f -delete || die