summaryrefslogtreecommitdiff
blob: dfee8a1ee0d8d4d98728f9de36633944c99ebb60 (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
73
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/k3d/k3d-0.4.5.0.ebuild,v 1.1 2006/02/09 00:27:12 vanquirius Exp $

inherit eutils

MY_P="${P}-2"
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/${MY_P}.tar.bz2"

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

#virtual/x11
DEPEND="
	virtual/opengl
	virtual/glu
	>=dev-libs/glib-2.2.1
	=x11-libs/gtk+-1.2*
	=dev-libs/libsigc++-1.0*
	>=media-libs/netpbm-10
	media-libs/plib
	media-gfx/imagemagick
	truetype? ( >=media-libs/freetype-2 )
	doc? ( app-text/xmlto )
	python? ( >=dev-lang/python-2.3 )
	" ##ruby support deprecated ruby? ( virtual/ruby )

S="${WORKDIR}/${MY_P}"

src_unpack() {
	unpack ${A}
	cd "${S}"
	libtoolize --force --copy --automake
	aclocal
	automake --add-missing
	autoconf
}

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 "CXXFLAGS=${CXXFLAGS}" ${myconf} \
	--without-new-pnmtotiff || die
	emake || die

}

src_install() {
	einstall || die
	dodoc AUTHORS NEWS README TODO
}