summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2014-04-18 22:00:34 +0000
committerJulian Ospald <hasufell@gentoo.org>2014-04-18 22:00:34 +0000
commit6eee1d3adfcdb618fdab57610b8ca371163af25e (patch)
tree85fbdc7b3f745414f9fa6e43f862b732806a8a79 /media-gfx/blender
parentAdd support for gx86-multilib media-libs/imlib. (diff)
downloadgentoo-2-6eee1d3adfcdb618fdab57610b8ca371163af25e.tar.gz
gentoo-2-6eee1d3adfcdb618fdab57610b8ca371163af25e.tar.bz2
gentoo-2-6eee1d3adfcdb618fdab57610b8ca371163af25e.zip
fix building with -openmp wrt #507738
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key BDEED020)
Diffstat (limited to 'media-gfx/blender')
-rw-r--r--media-gfx/blender/ChangeLog6
-rw-r--r--media-gfx/blender/blender-2.70a-r1.ebuild5
-rw-r--r--media-gfx/blender/files/blender-2.70a-openmp.patch38
3 files changed, 46 insertions, 3 deletions
diff --git a/media-gfx/blender/ChangeLog b/media-gfx/blender/ChangeLog
index 2ee9cbcbc3e3..1722d1a22a1b 100644
--- a/media-gfx/blender/ChangeLog
+++ b/media-gfx/blender/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-gfx/blender
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/ChangeLog,v 1.263 2014/04/16 14:31:13 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/ChangeLog,v 1.264 2014/04/18 22:00:34 hasufell Exp $
+
+ 18 Apr 2014; Julian Ospald <hasufell@gentoo.org> blender-2.70a-r1.ebuild,
+ +files/blender-2.70a-openmp.patch:
+ fix building with -openmp wrt #507738
*blender-2.70a-r1 (16 Apr 2014)
*blender-2.70-r1 (16 Apr 2014)
diff --git a/media-gfx/blender/blender-2.70a-r1.ebuild b/media-gfx/blender/blender-2.70a-r1.ebuild
index b9b354c4feac..6b9d10576718 100644
--- a/media-gfx/blender/blender-2.70a-r1.ebuild
+++ b/media-gfx/blender/blender-2.70a-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.70a-r1.ebuild,v 1.1 2014/04/16 14:31:13 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.70a-r1.ebuild,v 1.2 2014/04/18 22:00:34 hasufell Exp $
# TODO:
# bundled-deps: bullet is modified
@@ -114,7 +114,8 @@ src_prepare() {
"${FILESDIR}"/04-${PN}-2.70-unbundle-glog.patch \
"${FILESDIR}"/05-${PN}-2.68-unbundle-eigen3.patch \
"${FILESDIR}"/06-${PN}-2.68-fix-install-rules.patch \
- "${FILESDIR}"/07-${PN}-2.70-sse2.patch
+ "${FILESDIR}"/07-${PN}-2.70-sse2.patch \
+ "${FILESDIR}"/${PN}-2.70a-openmp.patch
# remove some bundled deps
rm -r \
diff --git a/media-gfx/blender/files/blender-2.70a-openmp.patch b/media-gfx/blender/files/blender-2.70a-openmp.patch
new file mode 100644
index 000000000000..2c2afde12437
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.70a-openmp.patch
@@ -0,0 +1,38 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Fri Apr 18 21:42:45 UTC 2014
+Subject: fix unguarded calls to omp_get_thread_num()
+
+--- blender-v2.70a/source/blender/editors/sculpt_paint/paint_cursor.c
++++ blender-v2.70a/source/blender/editors/sculpt_paint/paint_cursor.c
+@@ -248,8 +248,13 @@ static int load_tex(Brush *br, ViewConte
+
+ if (col) {
+ float rgba[4];
+-
+- paint_get_tex_pixel_col(mtex, x, y, rgba, pool, omp_get_thread_num());
++ int thread_num;
++#ifdef _OPENMP
++ thread_num = omp_get_thread_num();
++#else
++ thread_num = 0;
++#endif
++ paint_get_tex_pixel_col(mtex, x, y, rgba, pool, thread_num);
+
+ buffer[index * 4] = rgba[0] * 255;
+ buffer[index * 4 + 1] = rgba[1] * 255;
+@@ -257,7 +262,14 @@ static int load_tex(Brush *br, ViewConte
+ buffer[index * 4 + 3] = rgba[3] * 255;
+ }
+ else {
+- float avg = paint_get_tex_pixel(mtex, x, y, pool, omp_get_thread_num());
++ float avg;
++ int thread_num;
++#ifdef _OPENMP
++ thread_num = omp_get_thread_num();
++#else
++ thread_num = 0;
++#endif
++ avg = paint_get_tex_pixel(mtex, x, y, pool, thread_num);
+
+ avg += br->texture_sample_bias;
+