summaryrefslogtreecommitdiff
blob: 6d3250af0f56a2326701eca80d9a787c5ea9aad3 (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-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/comparator/comparator-2.9.ebuild,v 1.7 2013/02/12 17:00:24 ago Exp $

EAPI="4"
PYTHON_DEPEND="2"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"

inherit distutils toolchain-funcs

DESCRIPTION="ESR's utility for making fast comparisons among large source trees"
HOMEPAGE="http://www.catb.org/~esr/comparator/"
SRC_URI="http://www.catb.org/~esr/comparator/${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ~arm ~mips ppc ppc64 ~sparc x86"
IUSE=""

RDEPEND=""
DEPEND="=app-text/docbook-xml-dtd-4.1.2*
	app-text/xmlto"

PYTHON_MODNAME="comparator.py"

src_prepare() {
	sed \
		-e '/install -m 755 -o 0 -g 0 filterator/d' \
		-e '/python setup.py install/d' \
		-i Makefile || die "sed failed"
}

src_compile() {
	distutils_src_compile
	emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
	emake comparator.html scf-standard.html
}

src_install() {
	distutils_src_install
	emake ROOT="${D}" install

	install_filterator() {
		newbin filterator filterator-${PYTHON_ABI} || return 1
		python_convert_shebangs ${PYTHON_ABI} "${ED}usr/bin/filterator-${PYTHON_ABI}"
	}
	python_execute_function -q install_filterator
	python_generate_wrapper_scripts "${ED}usr/bin/filterator"

	dohtml *.html
}