summaryrefslogtreecommitdiff
blob: b9977b6ca360865294bc1a4567647519364e4cc9 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.28a.ebuild,v 1.2 2003/09/30 19:22:25 mr_bones_ Exp $

inherit flag-o-matic
replace-flags -march=pentium4 -march=pentium3

IUSE=""

S=${WORKDIR}/${P}
DESCRIPTION="3D Creation/Animation/Publishing System"
HOMEPAGE="http://www.blender.org/"
SRC_URI="http://download.blender.org/source/${P}.tar.bz2"

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

DEPEND="virtual/x11
	blender-game? ( dev-games/ode )
	sdl? ( media-libs/libsdl )
	jpeg? ( media-libs/jpeg )
	png? ( media-libs/libpng )
	mozilla? ( net-www/mozilla )
	truetype? ( >=freetype-2.0 )
	fmod? ( media-libs/fmod )
	>=openal-20020127
	>=libsdl-1.2
	>=libvorbis-1.0
	>=openssl-0.9.6"

src_compile() {
	local myconf=""

	# SDL Support
	if [ -n "`use sdl`" ]
	then
		myconf="${myconf} --with-sdl=/usr"
	fi

	# JPG Support (Should be there by default, but I'll put it in anyways)
	if [ -n "`use jpeg`" ]
	then
		myconf="${myconf} --with-libjpeg=/usr"
	fi

	# PNG Support (Same as above)
	if [ -n "`use png`" ]
	then
		myconf="${myconf} --with-libpng=/usr"
	fi

	# ./configure points at the wrong mozilla directories and will fail
	# with this enabled. (A simple patch should take care of this)
	#if [ -n "`use mozilla`" ]
	#then
	#	myconf="${myconf} --with-mozilla=/usr"
	#fi

	# TrueType support (For text objects)
	if [ -n "`use truetype`" ]
	then
		myconf="${myconf} --with-freetype2=/usr"
	fi

	# Build Staticly
	if [ -n "`use blender-static`" ]
	then
		myconf="${myconf} --enable-blenderstatic"
	fi

	# Build the game engine (Fails in 2.28)
	if [ -n "`use blender-game`" ]
	then
		myconf="${myconf} --enable-gameblender"
	fi

	# Build the plugin (Will probably fail, especially without mozilla)
	if [ -n "`use blender-plugin`" ]
	then
		myconf="${myconf} --enable-blenderplugin"
	fi

	econf ${myconf} || die
	emake || die
}

src_install() {
	einstall || die
}