blob: 9def1bfa1216b69b3684d8e9e616a628f377981c (
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
# $Id: PKGBUILD 101917 2010-12-02 16:14:10Z ibiru $
# Contributor: John Sowiak <john@archlinux.org>
# Maintainer: tobias <tobias@archlinux.org>
# TODO:
# - consider switching to scons when it is better supported
# Apparently, the blender guys refuse to release source tarballs for
# intermediate releases that deal mainly with binaries but incorporate tiny
# minor changes from cvs. Since I'm sick and tired of the urges of users that
# look for release numbers only we make a messy PKGBUILD that can checkout cvs
# tags if necessary.
#cvs=true
cvs=false
pkgname=blender
pkgver=2.49b
pkgrel=2
pkgdesc="A fully integrated 3D graphics creation suite"
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.blender.org"
depends=('libjpeg' 'libpng' 'openexr' 'sdl' 'python2' 'desktop-file-utils' \
'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal')
makedepends=('freeglut' 'libtiff' 'librsvg' 'yasm' 'csv')
options=('!makeflags')
install=blender.install
source=($pkgname.desktop $pkgname.svg)
if [ ! $cvs -o $cvs = false ]; then
makedepends=('freeglut' 'libtiff' 'librsvg' 'yasm')
source=(${source[@]} http://download.blender.org/source/$pkgname-$pkgver.tar.gz)
md5sums=('b5b9720b9430b1f5e2aa0b2df533fed8'
'0e53299444ff5570639c8f59372bc98c'
'718eef6a4ff377989e829b92a886cc5b')
sha1sums=('9ae82b5df21b4803f981e3df4a256b4be7137273'
'1e5452f56f590d5ce1af8c174113f0e639714c0c'
'43f71e7de4efe79c518d45f4b5a04e03c28d5fc5')
fi
build() {
if [ $cvs = true ]; then
cd "$srcdir/"
#cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender login
cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender checkout $pkgname
_cvsrel=$pkgname-$(echo $pkgver | sed 's/\./-/')-release
cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender update -r $_cvsrel
find $pkgname/{bin,release/scripts} -name 'CVS' -exec rm -rf {} \; 2> /dev/null
cd $pkgname
else
cd "$srcdir/$pkgname-$pkgver"
fi
rm -f user-def.mk
##########################################################################
# tweak the makefiles to prepare build for ArchLinux
# disable static binaries and enable blenderplayer binary
sed -i "s|^.*\(BINTARGETS += blenderstatic\)| #\1|g" source/Makefile
sed -i "s|^#\(.*BINTARGETS += blenderplayer\)|\1|g" source/Makefile
# link freetype and openal dynamically
sed -i 's|LOPTS)|LOPTS) -lfreetype -lopenal|g' source/Makefile
sed -i 's|COMLIB.*libfreetype\.a|#\0|g' source/Makefile
sed -i 's|NAN_SND_LIBS.*libopenal\.a|#\0|g' source/Makefile
# make ode (alternative physics engine)
# does not work for Arch64
#[ "$CARCH" = "i686" ] && sed -i 's|^\(DIRS.*\)$|\1 ode|' extern/Makefile
# make the nan_makefiles happy
export NAN_PYTHON_VERSION=2.7
export INTERNATIONAL=true
export WITH_FREETYPE2=true
export NAN_FREETYPE=/usr
export WITH_ICONV=true
export NAN_NO_PLUGIN=true
export NAN_OPENAL=/usr
export NAN_FMOD=/usr
export NAN_JPEG=/usr
export NAN_PNG=/usr
export WITH_OPENEXR=true
export NAN_OPENEXR=/usr
export NAN_ODE=/usr
export NAN_OPENEXR_LIBS=$(pkg-config --libs-only-l OpenEXR)
export NAN_SDL=/usr
export NAN_ZLIB=/usr
export NAN_MESA=/usr
export NAN_USE_BULLET=true
export NAN_USE_FFMPEG_CONFIG=true
export WITH_BF_VERSE=true
export WITH_VERSE=true
export WITH_BF_OPENMP=true
# there is an issue with a file
export NAN_DEBUG=-O
###########################################################################
# build
LDFLAGS="-Wl,--hash-style=gnu"
make
###########################################################################
}
package() {
if [ $cvs = true ]; then
cd "$srcdir/$pkgname"
else
cd "$srcdir/$pkgname-$pkgver"
fi
cd obj/linux-glibc2*/bin
# common part
mkdir -p "$pkgdir/usr/share/"
# install binaries
install -Dm755 blender "$pkgdir/usr/bin/blender"
install -Dm755 blenderplayer "$pkgdir/usr/bin/blenderplayer"
# install internationalization support
cd ../../../bin/.blender
install -D -m644 .Blanguages \
"$pkgdir/usr/share/$pkgname/.Blanguages"
install -D -m644 .bfont.ttf \
"$pkgdir/usr/share/$pkgname/.bfont.ttf"
cp -R locale "$pkgdir/usr/share/"
# install scripts
cd ../../release/
cp -R scripts "$pkgdir/usr/share/$pkgname/"
sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' "$pkgdir/usr/share/blender/scripts/bpymodules/blend2renderinfo.py"
# install all additional stuff
# install a freedesktop.org compliant menu entry
install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
# install some freedesktop.org compatibility
install -D -m644 "$srcdir/$pkgname.svg" "$pkgdir/usr/share/pixmaps/$pkgname.svg"
# finally we render a png as fallback for not svg aware menu applications
# Attention: always make sure you check the dimensions of the source-svg,
# you can read the dimensions via inkscape's export function
rsvg -w 64 -h 64 -f png "$pkgdir/usr/share/pixmaps/$pkgname.svg" "$pkgdir/usr/share/pixmaps/$pkgname.png"
}
|