summaryrefslogtreecommitdiff
blob: 57941097e605581925c5bee46d5a3f2463775a9b (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit toolchain-funcs flag-o-matic

DESCRIPTION="Parallel Indexed XZ compressor"
HOMEPAGE="https://github.com/vasi/pixz"
LICENSE="BSD-2"
SLOT="0"
IUSE="static"

LIB_DEPEND=">=app-arch/libarchive-2.8:=[static-libs(+)]
	>=app-arch/xz-utils-5[static-libs(+)]"
RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
DEPEND="${RDEPEND}
	static? ( ${LIB_DEPEND} )"

if [[ ${PV} == "9999" ]] ; then
	EGIT_REPO_URI="https://github.com/vasi/pixz.git"
	inherit git-2
	KEYWORDS=""
else
	SRC_URI="https://github.com/vasi/${PN}/archive/v${PV}.zip -> ${P}.zip"
	KEYWORDS="~amd64 ~arm ~x86"
	DEPEND="${DEPEND} app-text/asciidoc"
fi

src_configure() {
	use static && append-ldflags -static
}

src_compile() {
	if [[ ${PV} == "9999" ]] ; then
		emake CC="$(tc-getCC)" OPT="" all pixz.1
	else
		emake CC="$(tc-getCC)" OPT="" all
	fi
}

src_install() {
	dobin pixz
	doman pixz.1
	dodoc README TODO
}