aboutsummaryrefslogtreecommitdiff
blob: b7fd959d92a7d689ef045022b71fd0bbaefdbd78 (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
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit toolchain-funcs

DESCRIPTION="An implementation of the Double Ratchet cryptographic ratchet in C++"
HOMEPAGE="https://git.matrix.org/git/olm/about/"

if [[ "${PV}" == 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://git.matrix.org/git/olm.git"
else
	SRC_URI="https://git.matrix.org/git/${PN}/snapshot/${P}.tar.bz2"
	KEYWORDS="~amd64 ~x86"
fi

LICENSE="GPL-3"
SLOT="0/$(ver_cut 1)"
IUSE=""

src_prepare() {
    default
    sed \
	    -e '/^LDFLAGS/d' \
	    -e 's@-Wall -Werror@@' \
	    -e "s@\$(PREFIX)/lib@\$(PREFIX)/$(get_libdir)@g" \
	    -i Makefile || die
}

src_compile() {
	emake CC="$(tc-getCC)" AR="$(tc-getAR)"
}

src_install() {
	emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" install
}