summaryrefslogtreecommitdiff
blob: f265416fad227a31183e662f3d7d48d1444f6990 (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
91
92
93
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.32.ebuild,v 1.8 2004/10/28 06:50:26 lu_zero Exp $

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

IUSE="sdl jpeg png mozilla truetype static fmod"
#IUSE="${IUSE} blender-game blender-plugin"

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 ~amd64"

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

src_unpack() {
	unpack ${A}
	epatch ${FILESDIR}/blender-2.32.patch
	cd ${S}/release/plugins
	chmod 755 bmake
}


src_compile() {
	local myconf=""

	# SDL Support
	use sdl && myconf="${myconf} --with-sdl=/usr"
	#	|| myconf="${myconf} --without-sdl"

	# Jpeg support
	use jpeg && myconf="${myconf} --with-libjpeg=/usr"

	# PNG Support
	use png && myconf="${myconf} --with-libpng=/usr"

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

	# TrueType support (For text objects)
	use truetype && myconf="${myconf} --with-freetype2=/usr"

	# Build Staticly
	use static && myconf="${myconf} --enable-blenderstatic"

	# Build the game engine
	# use blender-game && myconf="${myconf} --enable-gameblender"

	# Build the plugin (Will fail, requires gameblender)
	# use blender-plugin && myconf="${myconf} --enable-blenderplugin"

	econf ${myconf} || die
	emake || die
	cd ${S}/release/plugins
	emake || die

}

src_install() {
	einstall || die

	exeinto /usr/lib/${PN}/textures
	doexe ${S}/release/plugins/texture/*.so
	exeinto /usr/lib/${PN}/sequences
	doexe ${S}/release/plugins/sequence/*.so

	insinto /usr/share/pixmaps
	doins ${FILESDIR}/${PN}.png
	insinto /usr/share/applications
	doins ${FILESDIR}/${PN}.desktop

	dodoc COPYING INSTALL README release_2*

}