summaryrefslogtreecommitdiff
blob: dbdcaa1fc95744c75b1379421a390543a62a49d3 (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit toolchain-funcs

DESCRIPTION="OMEMO encryption for libpurple (XEP-0384)"
HOMEPAGE="https://github.com/gkdr/lurch"
SRC_URI="https://github.com/gkdr/lurch/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3"  # likely not GPL-3+, https://github.com/gkdr/lurch/issues/165
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="test"

# NOTE: Some of these dependencies seem like leftovers in the build system
#       and can probably be dropped with lurch >=0.7.1
#       (https://github.com/gkdr/lurch/issues/164)
RDEPEND="
	dev-db/sqlite
	dev-libs/glib
	dev-libs/libgcrypt:=
	dev-libs/libxml2
	dev-libs/mxml
	net-im/pidgin:=
	net-libs/libaxc
	net-libs/libomemo
	>=net-libs/libsignal-protocol-c-2.3.2
	"
DEPEND="
	${RDEPEND}
	virtual/pkgconfig
	test? ( dev-util/cmocka )
	"

RESTRICT="!test? ( test )"

src_prepare() {
	rm -Rv lib/{axc,libomemo} || die  # unbundle
	default
}

src_compile() {
	local makeargs=(
		CC="$(tc-getCC)"
		LIBGCRYPT_CONFIG="$(tc-getPROG LIBGCRYPT_CONFIG libgcrypt-config)"
		PKG_CONFIG="$(tc-getPKG_CONFIG)"
		XML2_CONFIG="$(tc-getPROG XML2_CONFIG xml2-config)"
	)
	emake "${makeargs[@]}"
}