summaryrefslogtreecommitdiff
blob: a2d128b537740ef85b52110ffe58a65ba39ced0f (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
55
56
57
58
59
60
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI="4"
PYTHON_DEPEND="2"

inherit git-r3 autotools python toolchain-funcs

DESCRIPTION="Traces TeX fonts to PFA or PFB fonts (formerly pktrace)"
HOMEPAGE="http://lilypond.org/mftrace/"
EGIT_REPO_URI="https://github.com/hanwen/mftrace.git"
LICENSE="GPL-2"
KEYWORDS=""
# SLOT 1 was used in pktrace ebuild
SLOT="1"
IUSE="doc test truetype"

RDEPEND=">=app-text/t1utils-1.25
	|| ( media-gfx/potrace >=media-gfx/autotrace-0.30 )
	truetype? ( media-gfx/fontforge )
	virtual/latex-base"
DEPEND="${RDEPEND}
	doc? ( sys-apps/texinfo )
	test? ( media-gfx/fontforge )"

pkg_setup() {
	python_set_active_version 2
	python_pkg_setup
}

src_prepare() {
	eautoreconf
}

src_configure() {
	tc-export CC
	econf \
		--datadir="$(python_get_sitedir)" \
		PYTHON="$(PYTHON)"
}

src_compile() {
	emake CFLAGS="-Wall ${CFLAGS}"
	use doc && emake README.txt
}

src_install () {
	emake DESTDIR="${D}" PYC_MODULES="" install
	dodoc ChangeLog
	use doc && dodoc README.txt
}

pkg_postinst() {
	python_mod_optimize mftrace
}

pkg_postrm() {
	python_mod_cleanup mftrace
}