summaryrefslogtreecommitdiff
blob: 9963e6c5bf156ae872e4c680b68c3c1b0a156e32 (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
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/k3d/k3d-0.2.5.4.ebuild,v 1.4 2004/04/12 14:15:29 weeve Exp $

inherit python

IUSE="truetype doc python ruby"

DESCRIPTION="K-3D is a free 3D modeling, animation, and rendering system."
HOMEPAGE="http://k3d.sourceforge.net"
SRC_URI="mirror://sourceforge/k3d/${P}-src.tar.bz2"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86 ~sparc"

DEPEND="virtual/x11
	virtual/opengl
	virtual/glu
	>=dev-libs/glib-2.2.1
	=x11-libs/gtk+-1.2*
	=dev-libs/libsigc++-1.0*
	media-libs/plib
	truetype? ( >=media-libs/freetype-2 )
	doc? ( app-text/xmlto )
	python? ( >=dev-lang/python-2.2 )
	ruby? ( virtual/ruby )"

src_unpack() {

	unpack ${A}
	cd ${S}
	epatch ${FILESDIR}/${P}-gentoo.patch.tar.bz2

	# fix python compilation
	python_version
	sed -i -e "s:python2.2:python${PYVER}:g" configure

}

src_compile() {

	local myconf="--with-plib --without-graphviz"

	use truetype \
		&& myconf="${myconf} --with-freetype" \
		|| myconf="${myconf} --without-freetype"

	use doc \
		&& myconf="${myconf} --with-docbook" \
		|| myconf="${myconf} --without-docbook"

	use python \
		&& myconf="${myconf} --with-python" \
		|| myconf="${myconf} --without-python"

	use ruby \
		&& myconf="${myconf} --with-ruby=`ruby -rrbconfig -e 'puts Config::CONFIG["archdir"]'`" \
		|| myconf="${myconf} --without-ruby"

	econf ${myconf} || die

	emake "CXXFLAGS=${CXXFLAGS}" || die

}

src_install() {

	einstall || die
	dodoc AUTHORS INSTALL NEWS README TODO

}