summaryrefslogtreecommitdiff
blob: 8e7abf5cdb3556a1c9cb8b0f03cddb2b4e711f96 (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
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python2_7 )

inherit toolchain-funcs python-single-r1

DESCRIPTION="tools to create and apply deltarpms"
HOMEPAGE="https://github.com/rpm-software-management/deltarpm"
SRC_URI="http://pkgs.fedoraproject.org/repo/pkgs/${PN}/${P}.tar.bz2/2cc2690bd1088cfc3238c25e59aaaec1/${P}.tar.bz2"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="python system-zlib"

RDEPEND="sys-libs/zlib
	app-arch/xz-utils
	app-arch/bzip2
	<app-arch/rpm-5
	python? ( ${PYTHON_DEPS} )"
DEPEND="${RDEPEND}"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

pkg_setup() {
	python-single-r1_pkg_setup

	MAKE_EXTRA_FLAGS=(
		-j1
		prefix=/usr
		mandir=/usr/share/man
		PYTHONS=$(use python && echo python)
		CFLAGS="${CFLAGS}"
		LDFLAGS="${LDFLAGS}"
		CC="$(tc-getCC)"
	)
	use system-zlib && MAKE_EXTRA_FLAGS+=(
		zlibbundled=
		zlibcppflags=
		zlibldflags=-lz
	)
}

src_compile() {
	emake "${MAKE_EXTRA_FLAGS[@]}" all $(use python && echo python)
}

src_install() {
	emake "${MAKE_EXTRA_FLAGS[@]}" DESTDIR="${ED}" install
	python_optimize
}