1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="An Embeddable Fulltext Search Engine"
9 HOMEPAGE="https://groonga.org/"
10 SRC_URI="https://packages.groonga.org/source/${PN}/${P}.tar.gz"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="abort benchmark debug doc dynamic-malloc-change +exact-alloc-count examples fmalloc futex jemalloc libedit libevent lzo +mecab msgpack +nfkc sphinx static-libs uyield zeromq zlib zstd"
17 RDEPEND=">=dev-libs/onigmo-6.1.1:0=
18 benchmark? ( >=dev-libs/glib-2.8 )
19 jemalloc? ( dev-libs/jemalloc:0= )
20 libedit? ( >=dev-libs/libedit-3 )
21 libevent? ( dev-libs/libevent:0= )
23 mecab? ( >=app-text/mecab-0.80 )
24 msgpack? ( dev-libs/msgpack )
25 sphinx? ( >=dev-python/sphinx-1.0.1 )
26 zeromq? ( net-libs/zeromq:0= )
27 zlib? ( sys-libs/zlib:0= )
28 zstd? ( app-arch/zstd:0= )"
31 sphinx? ( dev-python/sphinx )"
33 REQUIRED_USE=" abort? ( dynamic-malloc-change ) fmalloc? ( dynamic-malloc-change ) sphinx? ( doc )"
37 enewuser groonga -1 -1 -1 groonga
46 # httpd is a bundled copy of nginx; disabled for security reasons
47 # prce only is used with httpd
48 # Apache arrow, kytea and libstemmer are not available in Gentoo repo
49 # ruby is only used for an http test
51 --disable-groonga-httpd
56 --with-log-path="${EROOT%/}/var/log/${PN}.log"
57 --docdir="${EROOT%/}/usr/share/doc/${P}"
62 $(use_enable benchmark)
63 $(use_enable debug memory-debug)
64 $(use_enable doc document)
65 $(use_enable dynamic-malloc-change)
66 $(use_enable exact-alloc-count)
74 $(use_enable msgpack message-pack)
75 $(use_with msgpack message-pack "${EROOT%/}/usr")
77 $(use_with sphinx sphinx-build)
78 $(use_enable static-libs static)
84 econf "${econfopts[@]}"
88 local DOCS=( README.md )
91 find "${D}" -name '*.la' -delete || die
93 newinitd "${FILESDIR}/${PN}.initd" ${PN}
94 newconfd "${FILESDIR}/${PN}.confd" ${PN}
96 keepdir /var/{log,lib}/${PN}
97 fowners groonga:groonga /var/{log,lib}/${PN}
99 use examples || rm -r "${D%/}/usr/share/${PN}" || die