/[gentoo-x86]/media-gfx/blender/blender-2.45.ebuild
Gentoo

Contents of /media-gfx/blender/blender-2.45.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri Sep 21 23:14:57 2007 UTC (6 years, 9 months ago) by lu_zero
Branch: MAIN
New version see bug #193317
(Portage version: 2.1.3.9)

1 lu_zero 1.1 # Copyright 1999-2007 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.44-r1.ebuild,v 1.2 2007/09/19 15:30:57 lu_zero Exp $
4    
5     inherit multilib flag-o-matic eutils python
6    
7     #IUSE="jpeg mozilla png sdl static truetype"
8     IUSE="blender-game ffmpeg jpeg nls openal openexr png sdl verse"
9     FFMPEG_SNAP="0.4.9-p20070616"
10     DESCRIPTION="3D Creation/Animation/Publishing System"
11     HOMEPAGE="http://www.blender.org/"
12     SRC_URI="http://download.blender.org/source/${P}.tar.gz"
13    
14     SLOT="0"
15     LICENSE="|| ( GPL-2 BL )"
16     KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
17    
18     RDEPEND=">=dev-libs/openssl-0.9.6
19     ffmpeg? ( >=media-video/ffmpeg-${FFMPEG_SNAP/-/_}
20     >=media-libs/x264-svn-20061014 )
21     jpeg? ( media-libs/jpeg )
22     media-libs/tiff
23     >=dev-lang/python-2.4
24     nls? ( >=media-libs/freetype-2.0
25     virtual/libintl
26     >=media-libs/ftgl-2.1 )
27     openal? ( media-libs/openal
28     media-libs/freealut )
29     openexr? ( media-libs/openexr )
30     png? ( media-libs/libpng )
31     sdl? ( >=media-libs/libsdl-1.2 )
32     virtual/opengl"
33    
34     DEPEND="dev-util/scons
35     x11-libs/libXt
36     ${RDEPEND}"
37    
38     blend_with() {
39     local UWORD="$2"
40     if [ -z "${UWORD}" ]; then
41     UWORD="$1"
42     fi
43     if useq $1; then
44     echo "WITH_BF_${UWORD}=1" | tr '[:lower:]' '[:upper:]' \
45     >> ${S}/user-config.py
46     else
47     echo "WITH_BF_${UWORD}=0" | tr '[:lower:]' '[:upper:]' \
48     >> ${S}/user-config.py
49     fi
50     }
51    
52     src_unpack() {
53     unpack ${A}
54     cd ${S}/release/plugins
55     chmod 755 bmake
56     cp -pPR ${S}/source/blender/blenpluginapi include
57    
58     cd ${S}
59     epatch ${FILESDIR}/blender-2.37-dirs.patch
60     epatch ${FILESDIR}/blender-2.44-scriptsdir.patch
61     epatch ${FILESDIR}/blender-2.44-swscale.patch
62    
63     if use ffmpeg ; then
64     cd ${S}/extern
65     rm -rf ffmpeg
66     fi
67     # pass compiler flags to the scons build system
68     # and set python version to current version in use
69     python_version
70     cat <<- EOF >> ${S}/user-config.py
71     CFLAGS += '${CFLAGS}'
72     BF_PYTHON_VERSION="${PYVER}"
73     BF_PYTHON_INC="/usr/include/python${PYVER}"
74     BF_PYTHON_BINARY="/usr/bin/python${PYVER}"
75     BF_PYTHON_LIB="python${PYVER}"
76     EOF
77    
78     }
79    
80     src_compile() {
81     for arg in 'openal' \
82     'openexr' \
83     'jpeg' \
84     'ffmpeg' \
85     'png' \
86     'verse' \
87     'nls international' \
88     'blender-game gameengine'; do
89     blend_with ${arg}
90     done
91    
92     # scons uses -l differently -> remove it
93     scons ${MAKEOPTS/-l[0-9]} -h > scons.config
94     scons ${MAKEOPTS/-l[0-9]} || die \
95     "!!! Please add ${S}/scons.config when filing bugs reports to bugs.gentoo.org"
96    
97     cd ${S}/release/plugins
98     emake || die
99     }
100    
101     src_install() {
102     exeinto /usr/bin/
103     doexe ${WORKDIR}/install/linux2/blender
104    
105     dodir /usr/share/${PN}
106    
107     exeinto /usr/$(get_libdir)/${PN}/textures
108     doexe ${S}/release/plugins/texture/*.so
109     exeinto /usr/$(get_libdir)/${PN}/sequences
110     doexe ${S}/release/plugins/sequence/*.so
111     insinto /usr/include/${PN}
112     doins ${S}/release/plugins/include/*.h
113    
114     if use nls ; then
115     mv ${WORKDIR}/install/linux2/.blender/{.Blanguages,.bfont.ttf} \
116     ${D}/usr/share/${PN}
117     mv ${WORKDIR}/install/linux2/.blender/locale \
118     ${D}/usr/share/locale
119     fi
120    
121     mv ${WORKDIR}/install/linux2/.blender/scripts ${D}/usr/share/${PN}
122    
123     insinto /usr/share/pixmaps
124     doins ${FILESDIR}/${PN}.png
125     insinto /usr/share/applications
126     doins ${FILESDIR}/${PN}.desktop
127    
128     dodoc COPYING INSTALL README
129     }
130    
131     pkg_preinst(){
132     if [ -h "${ROOT}/usr/$(get_libdir)/blender/plugins/include" ];
133     then
134     rm -f ${ROOT}/usr/$(get_libdir)/blender/plugins/include
135     fi
136     }

  ViewVC Help
Powered by ViewVC 1.1.20