summaryrefslogtreecommitdiff
blob: 19099ae26d3ed87de4d9cc971b9744ebb4af2c5f (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-tcltk/tkzinc/tkzinc-3.3.4.ebuild,v 1.6 2014/08/10 21:26:29 slyfox Exp $

EAPI="3"

inherit autotools eutils

DESCRIPTION="A Tk widget library"
HOMEPAGE="http://www.tkzinc.org"
SRC_URI="http://www.tkzinc.org/Packages/zinc-tk_${PV}.tar.gz"

LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~ppc"
IUSE="debug doc threads"

DEPEND="
	dev-lang/tk
	media-libs/glew
	virtual/opengl
	doc? ( virtual/latex-base )"
RDEPEND="${DEPEND}"

S="${WORKDIR}/Tkzinc"

src_prepare() {
	epatch \
		"${FILESDIR}"/${PV}-ldflags.patch \
		"${FILESDIR}"/${P}-latex.patch
	eautoreconf
}

src_configure() {
	econf \
		--enable-shared \
		--enable-gl=damage \
		$(use_enable debug symbols) \
		$(use_enable threads)
}

src_compile() {
	emake || die "make failed"
	if use doc ; then
		emake pdf || die "make pdf files failed"
	fi
}

src_install() {
	emake DESTDIR="${D}" install || die "make install failed"

	dodoc BUGS README || die
	dohtml -r doc/* || die
	use doc && dodoc doc/refman.pdf
}