summaryrefslogtreecommitdiff
blob: 2cf0f1a6e935879d0bddf26719a52b6ace3e3ee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools

DESCRIPTION="Library providing high performance logging, tracing, ipc, and poll"
HOMEPAGE="https://github.com/ClusterLabs/libqb"
SRC_URI="https://github.com/ClusterLabs/${PN}/releases/download/v${PV}/${P}.tar.xz"

LICENSE="LGPL-2.1"
SLOT="0/100"
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 x86"
IUSE="debug doc examples systemd test"
RESTRICT="!test? ( test )"

RDEPEND="dev-libs/glib:2
	dev-libs/libxml2"
DEPEND="${RDEPEND}"
BDEPEND="app-arch/xz-utils
	test? ( dev-libs/check )
	doc? (
		app-doc/doxygen[dot]
	)"

DOCS=( ChangeLog README.markdown )

PATCHES=(
	"${FILESDIR}"/${PN}-2.0.1-slibtool.patch
)

src_prepare() {
	default

	# Skip installation of text documents without value
	sed -e '/dist_doc_DATA/d' -i Makefile.am || die

	# Do not append version suffix "-yank"
	sed 's|1-yank|1|' -i configure.ac || die

	eautoreconf
}

src_configure() {
	econf \
		--disable-static \
		--with-socket-dir=/run \
		$(use_enable systemd systemd-journal) \
		$(use_enable debug)
}

src_compile() {
	default
	use doc && emake doxygen
}

src_install() {
	emake install DESTDIR="${D}"

	if use examples ; then
		docinto examples
		dodoc examples/*.c
	fi

	use doc && HTML_DOCS=("docs/html/.")
	einstalldocs

	find "${D}" -name '*.la' -delete || die
}