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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.4
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/Attic/blender-2.45.ebuild,v 1.3 2007/12/30 23:40:36 lu_zero Exp $ 3# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/Attic/blender-2.45.ebuild,v 1.4 2008/01/15 01:07:08 maekke Exp $
4 4
5inherit multilib flag-o-matic eutils python 5inherit multilib flag-o-matic eutils python
6 6
7#IUSE="jpeg mozilla png sdl static truetype" 7#IUSE="jpeg mozilla png sdl static truetype"
8IUSE="blender-game ffmpeg jpeg nls openal openexr png verse" 8IUSE="blender-game ffmpeg jpeg nls openal openexr png verse"
30 >=media-libs/libsdl-1.2 30 >=media-libs/libsdl-1.2
31 virtual/opengl" 31 virtual/opengl"
32 32
33DEPEND="dev-util/scons 33DEPEND="dev-util/scons
34 x11-libs/libXt 34 x11-libs/libXt
35 x11-proto/inputproto
35 ${RDEPEND}" 36 ${RDEPEND}"
36 37
37blend_with() { 38blend_with() {
38 local UWORD="$2" 39 local UWORD="$2"
39 if [ -z "${UWORD}" ]; then 40 if [ -z "${UWORD}" ]; then
40 UWORD="$1" 41 UWORD="$1"
41 fi 42 fi
42 if useq $1; then 43 if useq $1; then
43 echo "WITH_BF_${UWORD}=1" | tr '[:lower:]' '[:upper:]' \ 44 echo "WITH_BF_${UWORD}=1" | tr '[:lower:]' '[:upper:]' \
44 >> ${S}/user-config.py 45 >> "${S}"/user-config.py
45 else 46 else
46 echo "WITH_BF_${UWORD}=0" | tr '[:lower:]' '[:upper:]' \ 47 echo "WITH_BF_${UWORD}=0" | tr '[:lower:]' '[:upper:]' \
47 >> ${S}/user-config.py 48 >> "${S}"/user-config.py
48 fi 49 fi
49} 50}
50 51
51src_unpack() { 52src_unpack() {
52 unpack ${A} 53 unpack ${A}
53 cd ${S}/release/plugins 54 cd "${S}"/release/plugins
54 chmod 755 bmake 55 chmod 755 bmake
55 cp -pPR ${S}/source/blender/blenpluginapi include 56 cp -pPR "${S}"/source/blender/blenpluginapi include
56 57
57 cd ${S} 58 cd "${S}"
58 epatch ${FILESDIR}/blender-2.37-dirs.patch 59 epatch "${FILESDIR}"/blender-2.37-dirs.patch
59 epatch ${FILESDIR}/blender-2.44-scriptsdir.patch 60 epatch "${FILESDIR}"/blender-2.44-scriptsdir.patch
60 epatch ${FILESDIR}/blender-2.44-swscale.patch 61 epatch "${FILESDIR}"/blender-2.44-swscale.patch
61 62
62 if use ffmpeg ; then 63 if use ffmpeg ; then
63 cd ${S}/extern 64 cd "${S}"/extern
64 rm -rf ffmpeg 65 rm -rf ffmpeg
65 fi 66 fi
66 # pass compiler flags to the scons build system 67 # pass compiler flags to the scons build system
67 # and set python version to current version in use 68 # and set python version to current version in use
68 python_version 69 python_version
69 cat <<- EOF >> ${S}/user-config.py 70 cat <<- EOF >> "${S}"/user-config.py
70 CFLAGS += '${CFLAGS}' 71 CFLAGS += '${CFLAGS}'
71 BF_PYTHON_VERSION="${PYVER}" 72 BF_PYTHON_VERSION="${PYVER}"
72 BF_PYTHON_INC="/usr/include/python${PYVER}" 73 BF_PYTHON_INC="/usr/include/python${PYVER}"
73 BF_PYTHON_BINARY="/usr/bin/python${PYVER}" 74 BF_PYTHON_BINARY="/usr/bin/python${PYVER}"
74 BF_PYTHON_LIB="python${PYVER}" 75 BF_PYTHON_LIB="python${PYVER}"
91 # scons uses -l differently -> remove it 92 # scons uses -l differently -> remove it
92 scons ${MAKEOPTS/-l[0-9]} -h > scons.config 93 scons ${MAKEOPTS/-l[0-9]} -h > scons.config
93 scons ${MAKEOPTS/-l[0-9]} || die \ 94 scons ${MAKEOPTS/-l[0-9]} || die \
94 "!!! Please add ${S}/scons.config when filing bugs reports to bugs.gentoo.org" 95 "!!! Please add ${S}/scons.config when filing bugs reports to bugs.gentoo.org"
95 96
96 cd ${S}/release/plugins 97 cd "${S}"/release/plugins
97 emake || die 98 emake || die
98} 99}
99 100
100src_install() { 101src_install() {
101 exeinto /usr/bin/ 102 exeinto /usr/bin/
102 doexe ${WORKDIR}/install/linux2/blender 103 doexe "${WORKDIR}"/install/linux2/blender
103 104
104 dodir /usr/share/${PN} 105 dodir /usr/share/${PN}
105 106
106 exeinto /usr/$(get_libdir)/${PN}/textures 107 exeinto /usr/$(get_libdir)/${PN}/textures
107 doexe ${S}/release/plugins/texture/*.so 108 doexe "${S}"/release/plugins/texture/*.so
108 exeinto /usr/$(get_libdir)/${PN}/sequences 109 exeinto /usr/$(get_libdir)/${PN}/sequences
109 doexe ${S}/release/plugins/sequence/*.so 110 doexe "${S}"/release/plugins/sequence/*.so
110 insinto /usr/include/${PN} 111 insinto /usr/include/${PN}
111 doins ${S}/release/plugins/include/*.h 112 doins "${S}"/release/plugins/include/*.h
112 113
113 if use nls ; then 114 if use nls ; then
114 mv ${WORKDIR}/install/linux2/.blender/{.Blanguages,.bfont.ttf} \ 115 mv "${WORKDIR}"/install/linux2/.blender/{.Blanguages,.bfont.ttf} \
115 ${D}/usr/share/${PN} 116 "${D}"/usr/share/${PN}
116 mv ${WORKDIR}/install/linux2/.blender/locale \ 117 mv "${WORKDIR}"/install/linux2/.blender/locale \
117 ${D}/usr/share/locale 118 "${D}"/usr/share/locale
118 fi 119 fi
119 120
120 mv ${WORKDIR}/install/linux2/.blender/scripts ${D}/usr/share/${PN} 121 mv "${WORKDIR}"/install/linux2/.blender/scripts "${D}"/usr/share/${PN}
121 122
122 insinto /usr/share/pixmaps 123 insinto /usr/share/pixmaps
123 doins ${FILESDIR}/${PN}.png 124 doins "${FILESDIR}"/${PN}.png
124 insinto /usr/share/applications 125 insinto /usr/share/applications
125 doins ${FILESDIR}/${PN}.desktop 126 doins "${FILESDIR}"/${PN}.desktop
126 127
127 dodoc COPYING INSTALL README 128 dodoc INSTALL README
128} 129}
129 130
130pkg_preinst(){ 131pkg_preinst(){
131 if [ -h "${ROOT}/usr/$(get_libdir)/blender/plugins/include" ]; 132 if [ -h "${ROOT}/usr/$(get_libdir)/blender/plugins/include" ];
132 then 133 then
133 rm -f ${ROOT}/usr/$(get_libdir)/blender/plugins/include 134 rm -f "${ROOT}"/usr/$(get_libdir)/blender/plugins/include
134 fi 135 fi
135} 136}

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20