/[packages]/cauldron/blender/current/SPECS/blender.spec
ViewVC logotype

Contents of /cauldron/blender/current/SPECS/blender.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 890238 - (show annotations) (download)
Tue Oct 13 05:56:14 2015 UTC (6 years, 7 months ago) by daviddavid
File size: 6571 byte(s)
- SILENT: BR python3-requests

1 %define __python %{__python3}
2
3 Name: blender
4 Version: 2.76
5 Release: %mkrel 1
6 Summary: A fully functional 3D modeling/rendering/animation package
7 License: GPLv2+
8 Group: Graphics/3D
9 URL: http://www.blender.org/
10 Source0: http://download.blender.org/source/%{name}-%{version}.tar.gz
11 Patch0: blender-2.76-localedir.patch
12 Patch1: blender-2.60-error-when-missing-sse.patch
13 Patch2: blender-2.58-static-lib.patch
14 Patch3: blender-2.65-openjpeg_stdbool.patch
15 # Patch submitted upstream - Blender Patches item #19234,
16 Patch4: blender-2.67a-uninit-var.patch
17 Patch5: blender-2.67-jack-libname.patch
18 Patch6: blender-2.71-sse2.patch
19 Patch7: blender-2.75-link.patch
20
21 BuildRequires: cmake >= 2.8
22 BuildRequires: ffmpeg-devel
23 BuildRequires: libgomp-devel
24 BuildRequires: jpeg-devel
25 BuildRequires: boost-devel
26 BuildRequires: jemalloc-devel
27 BuildRequires: openCOLLADA-devel
28 BuildRequires: openimageio-devel
29 BuildRequires: pkgconfig(OpenColorIO)
30 BuildRequires: pkgconfig(libopenjpeg1)
31 BuildRequires: pkgconfig(jack)
32 BuildRequires: pkgconfig(libtiff-4)
33 BuildRequires: pkgconfig(glew)
34 BuildRequires: pkgconfig(glu)
35 BuildRequires: pkgconfig(OpenEXR)
36 BuildRequires: pkgconfig(sdl)
37 BuildRequires: pkgconfig(x11)
38 BuildRequires: pkgconfig(xi)
39 BuildRequires: pkgconfig(freetype2)
40 BuildRequires: pkgconfig(libpng)
41 BuildRequires: pkgconfig(openal)
42 BuildRequires: pkgconfig(samplerate)
43 BuildRequires: pkgconfig(sndfile)
44 BuildRequires: pkgconfig(fftw3)
45 BuildRequires: pkgconfig(python3) >= 3.2
46 BuildRequires: pythonegg(3)(requests)
47 # ovitters: pkgconfig(gobject-introspection-1.0) includes script to determine typelib() auto buildrequires
48 BuildRequires: pkgconfig(gobject-introspection-1.0)
49
50 Requires: python(abi) >= 3.2
51 Requires(post,preun): GConf2
52
53 %description
54 Blender is the in-house software of a high quality animation studio.
55 It has proven to be an extremely fast and versatile design instrument.
56 The software has a personal touch, offering a unique approach to the
57 world of three dimensions. Blender can be used to create TV
58 commercials, to make technical visualizations or business graphics, to
59 do some morphing, or to design user interfaces. Developers can easily
60 build and manage complex environments. The renderer is versatile and
61 extremely fast. All basic animation principles (curves and keys) are
62 implemented.
63
64 %prep
65 %setup -q
66
67 %patch0 -p1 -b .localedir
68 %patch1 -p0 -b .sse
69 %patch2 -p0 -b .static
70 %patch3 -p1 -b .bool
71 %patch4 -p0 -b .uninit
72 %patch5 -p0 -b .jack
73 %patch6 -p0 -b .sse2
74 %patch7 -p1 -b .link
75
76 find -name '.svn' -print | xargs rm -rf
77
78 %build
79 export LD=/usr/bin/ld.gold
80 %ifarch %{ix86}
81 # build non-sse flavour
82 %cmake \
83 -DCMAKE_SKIP_RPATH=ON \
84 -DBUILD_SHARED_LIBS=OFF \
85 -DWITH_INSTALL_PORTABLE=OFF \
86 -DWITH_GAMEENGINE:BOOL=ON \
87 -DWITH_PLAYER:BOOL=ON \
88 -DWITH_PYTHON:BOOL=ON \
89 -DPYTHON_VERSION:STRING=%{python3_version} \
90 -DWITH_PYTHON_INSTALL:BOOL=OFF \
91 -DWITH_BUILTIN_GLEW:BOOL=OFF \
92 -DWITH_CODEC_FFMPEG:BOOL=ON \
93 -DWITH_CODEC_SNDFILE:BOOL=ON \
94 -DWITH_IMAGE_OPENJPEG:BOOL=ON \
95 -DWITH_OPENCOLLADA:BOOL=ON \
96 -DOPENCOLLADA=%{_includedir} \
97 -DWITH_FFTW3:BOOL=ON \
98 -DWITH_MOD_OCEANSIM:BOOL=ON \
99 -DWITH_CYCLES:BOOL=ON \
100 -DWITH_CXX_GUARDEDALLOC:BOOL=OFF \
101 -DWITH_MEM_JEMALLOC:BOOL=ON \
102 -DWITH_OPENCOLORIO:BOOL=ON \
103 -DWITH_IMAGE_REDCODE:BOOL=ON \
104 -DWITH_DOC_MANPAGE:BOOL=ON \
105 %ifarch %{ix86}
106 -DSUPPORT_SSE2_BUILD=OFF \
107 -DSUPPORT_SSE_BUILD=OFF \
108 %endif
109 -DWITH_RAYOPTIMIZATION:BOOL=OFF \
110 -DWITH_JACK:BOOL=ON
111 %make
112 cd ..
113 mv build non-sse
114 %endif
115
116 #build sse flavour
117 %cmake \
118 -DCMAKE_SKIP_RPATH=ON \
119 -DBUILD_SHARED_LIBS=OFF \
120 -DWITH_INSTALL_PORTABLE=OFF \
121 -DWITH_GAMEENGINE:BOOL=ON \
122 -DWITH_PLAYER:BOOL=ON \
123 -DWITH_PYTHON:BOOL=ON \
124 -DPYTHON_VERSION:STRING=%{python3_version} \
125 -DWITH_PYTHON_INSTALL:BOOL=OFF \
126 -DWITH_BUILTIN_GLEW:BOOL=OFF \
127 -DWITH_CODEC_FFMPEG:BOOL=ON \
128 -DWITH_CODEC_SNDFILE:BOOL=ON \
129 -DWITH_IMAGE_OPENJPEG:BOOL=ON \
130 -DWITH_OPENCOLLADA:BOOL=ON \
131 -DOPENCOLLADA=%{_includedir} \
132 -DWITH_FFTW3:BOOL=ON \
133 -DWITH_MOD_OCEANSIM:BOOL=ON \
134 -DWITH_CYCLES:BOOL=ON \
135 -DWITH_CXX_GUARDEDALLOC:BOOL=OFF \
136 -DWITH_MEM_JEMALLOC:BOOL=ON \
137 -DWITH_OPENCOLORIO:BOOL=ON \
138 -DWITH_IMAGE_REDCODE:BOOL=ON \
139 -DWITH_DOC_MANPAGE:BOOL=ON \
140 %ifarch %{ix86}
141 -DSUPPORT_SSE2_BUILD=OFF \
142 %endif
143 -DWITH_RAYOPTIMIZATION:BOOL=ON \
144 -DWITH_JACK:BOOL=ON
145 %make
146
147 %install
148 #install sse flavour
149 %make_install -C build
150
151 # Install hicolor icons.
152 for i in 16x16 22x22 32x32 48x48 256x256 ; do
153 mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}/apps
154 install -pm 0644 release/freedesktop/icons/${i}/apps/%{name}.png \
155 %{buildroot}%{_datadir}/icons/hicolor/${i}/apps/%{name}.png
156 done
157
158 mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
159 install -pm 0644 release/freedesktop/icons/scalable/apps/%{name}.svg \
160 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
161
162 %ifarch %{ix86}
163 mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}.sse
164
165 #install non-sse flavour
166 rm -fr build
167 mv non-sse build
168 %make_install -C build
169 mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}.nonsse
170
171 # install wrapper
172 cat >> %{buildroot}%{_bindir}/blender <<EOF
173 if [ -e /proc/cpuinfo ]; then
174 SSE="\`cat /proc/cpuinfo | grep flags | grep sse\`"
175 fi
176
177 if [ "x\$SSE" == x ]; then
178 %{_bindir}/%{name}.nonsse "\$@"
179 else
180 %{_bindir}/%{name}.sse "\$@"
181 fi
182 EOF
183 chmod 0755 %{buildroot}%{_bindir}/blender
184 %endif
185
186 sed -i -e 's,#!/usr/bin/python,#!/usr/bin/python3,' %{buildroot}%{_bindir}/blender-thumbnailer.py %{buildroot}%{_datadir}/%{name}/*/scripts/modules/blend_render_info.py
187
188 %find_lang %{name}
189
190 %post
191 if [ -x %{_gconftool_bin} ]; then
192 %{_gconftool_bin} --direct --config-source xml:readwrite:%{_sysconfdir}/gconf/gconf.xml.defaults --type boolean --set /desktop/gnome/thumbnailers/application@x-blender/enable true
193 %{_gconftool_bin} --direct --config-source xml:readwrite:%{_sysconfdir}/gconf/gconf.xml.defaults --type string --set /desktop/gnome/thumbnailers/application@x-blender/command "blender-thumbnailer.py %u %o"
194 fi
195
196 %preun
197 if [ "$1" = "0" -a -x %{_gconftool_bin} ]; then
198 %{_gconftool_bin} --direct --config-source xml:readwrite:%{_sysconfdir}/gconf/gconf.xml.defaults --unset /desktop/gnome/thumbnailers/application@x-blender/enable
199 %{_gconftool_bin} --direct --config-source xml:readwrite:%{_sysconfdir}/gconf/gconf.xml.defaults --unset /desktop/gnome/thumbnailers/application@x-blender/command
200 fi
201
202 %files -f %{name}.lang
203 %doc release/text/*
204 %doc release/datafiles/LICENSE*.ttf.txt
205 %{_bindir}/*
206 %{_datadir}/applications/*.desktop
207 %{_datadir}/%{name}/
208 %{_mandir}/man1/%{name}.1.*
209 %{_iconsdir}/hicolor/*/apps/%{name}.*

  ViewVC Help
Powered by ViewVC 1.1.28