aboutsummaryrefslogtreecommitdiffstats
path: root/testing/blender
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-10-12 20:12:48 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-10-12 20:12:48 +0000
commit60b012d46da1b5dbcd66f250eed3a3b09a89ba0e (patch)
treeb2723c27d10bfb86673a0d2f28eb90cdbe2d3e8b /testing/blender
parentf4c4f7037d2203f9a9762fbba0c7c05d6699f73f (diff)
downloadaports-60b012d46da1b5dbcd66f250eed3a3b09a89ba0e.tar.bz2
aports-60b012d46da1b5dbcd66f250eed3a3b09a89ba0e.tar.xz
testing/blender: build fix for gcc8
Diffstat (limited to 'testing/blender')
-rw-r--r--testing/blender/APKBUILD6
-rw-r--r--testing/blender/gcc8.patch196
2 files changed, 200 insertions, 2 deletions
diff --git a/testing/blender/APKBUILD b/testing/blender/APKBUILD
index 3741ab46fc..840a2d3380 100644
--- a/testing/blender/APKBUILD
+++ b/testing/blender/APKBUILD
@@ -15,7 +15,8 @@ makedepends="cmake libx11-dev jpeg-dev zlib-dev libpng-dev freetype-dev python3-
openexr-dev py-numpy-dev opensubdiv-dev"
subpackages="$pkgname-doc $pkgname-shared::noarch $pkgname-headless $pkgname-player py3-$pkgname:python"
source="http://download.blender.org/source/${pkgname}-${pkgver}.tar.gz
- blender-2.78a-musl.patch"
+ blender-2.78a-musl.patch
+ gcc8.patch"
builddir="$srcdir"/$pkgname-$pkgver
@@ -109,4 +110,5 @@ python() {
}
sha512sums="2db21ace446168dd683cdb5aad9dec001f8888ae4e9603a04ddb44fb78489ded827deb07e83712b0f1118a0e7bf66f2a5d935dc4ebb3a6703d72672ff414367f blender-2.79b.tar.gz
-47e8a6a017cea8c004d7e4205f201f167dd81ba95a4aadf9e55d01e81cc4a23e4d7f1d6aa7a6d1300fe3a5f5c98c664f584e7551fcde7fb1137147e2438f7ed5 blender-2.78a-musl.patch"
+47e8a6a017cea8c004d7e4205f201f167dd81ba95a4aadf9e55d01e81cc4a23e4d7f1d6aa7a6d1300fe3a5f5c98c664f584e7551fcde7fb1137147e2438f7ed5 blender-2.78a-musl.patch
+59cc54ddc772ed02db8e6ef94b18bad5c7ec8c1bb8cdc2231a6747063ac386f31a77e58322acf32ef4d5d9278ac0449bbf78e440134bfb612d1c86bb67f9df55 gcc8.patch"
diff --git a/testing/blender/gcc8.patch b/testing/blender/gcc8.patch
new file mode 100644
index 0000000000..c3aafd8593
--- /dev/null
+++ b/testing/blender/gcc8.patch
@@ -0,0 +1,196 @@
+diff --git a/intern/itasc/kdl/tree.hpp b/intern/itasc/kdl/tree.hpp
+index c8a253fc901..bd35f82d185 100644
+--- a/intern/itasc/kdl/tree.hpp
++++ b/intern/itasc/kdl/tree.hpp
+@@ -1,177 +1,177 @@
+ // Copyright (C) 2007 Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
+
+ // Version: 1.0
+ // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
+ // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
+ // URL: http://www.orocos.org/kdl
+
+ // This library is free software; you can redistribute it and/or
+ // modify it under the terms of the GNU Lesser General Public
+ // License as published by the Free Software Foundation; either
+ // version 2.1 of the License, or (at your option) any later version.
+
+ // This library is distributed in the hope that it will be useful,
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ // Lesser General Public License for more details.
+
+ // You should have received a copy of the GNU Lesser General Public
+ // License along with this library; if not, write to the Free Software
+ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ #ifndef KDL_TREE_HPP
+ #define KDL_TREE_HPP
+
+ #include "segment.hpp"
+ #include "chain.hpp"
+
+ #include <string>
+ #include <map>
+ #include <Eigen/Core>
+
+ namespace KDL
+ {
+ //Forward declaration
+ class TreeElement;
+ // Eigen allocator is needed for alignment of Eigen data types
+- typedef std::map<std::string,TreeElement, std::less<std::string>, Eigen::aligned_allocator<std::pair<std::string, TreeElement> > > SegmentMap;
++ typedef std::map<std::string,TreeElement, std::less<std::string>, Eigen::aligned_allocator<std::pair<const std::string, TreeElement> > > SegmentMap;
+
+ class TreeElement
+ {
+ public:
+ TreeElement():q_nr(0),parent(0)
+ {};
+ public:
+ Segment segment;
+ unsigned int q_nr;
+ SegmentMap::value_type const *parent;
+ std::vector<SegmentMap::const_iterator > children;
+ TreeElement(const Segment& segment_in,const SegmentMap::value_type& parent_in,unsigned int q_nr_in)
+ {
+ q_nr=q_nr_in;
+ segment=segment_in;
+ parent=&parent_in;
+ };
+ static TreeElement Root()
+ {
+ return TreeElement();
+ };
+ };
+
+ /**
+ * \brief This class encapsulates a <strong>tree</strong>
+ * kinematic interconnection structure. It is build out of segments.
+ *
+ * @ingroup KinematicFamily
+ */
+ class Tree
+ {
+ private:
+ SegmentMap segments;
+ unsigned int nrOfJoints;
+ unsigned int nrOfSegments;
+
+ bool addTreeRecursive(SegmentMap::const_iterator root, const std::string& tree_name, const std::string& hook_name);
+
+ public:
+ /**
+ * The constructor of a tree, a new tree is always empty
+ */
+ Tree();
+ Tree(const Tree& in);
+ Tree& operator= (const Tree& arg);
+
+ /**
+ * Adds a new segment to the end of the segment with
+ * hook_name as segment_name
+ *
+ * @param segment new segment to add
+ * @param segment_name name of the new segment
+ * @param hook_name name of the segment to connect this
+ * segment with.
+ *
+ * @return false if hook_name could not be found.
+ */
+ bool addSegment(const Segment& segment, const std::string& segment_name, const std::string& hook_name);
+
+ /**
+ * Adds a complete chain to the end of the segment with
+ * hook_name as segment_name. Segment i of
+ * the chain will get chain_name+".Segment"+i as segment_name.
+ *
+ * @param chain Chain to add
+ * @param chain_name name of the chain
+ * @param hook_name name of the segment to connect the chain with.
+ *
+ * @return false if hook_name could not be found.
+ */
+ bool addChain(const Chain& chain, const std::string& chain_name, const std::string& hook_name);
+
+ /**
+ * Adds a complete tree to the end of the segment with
+ * hookname as segment_name. The segments of the tree will get
+ * tree_name+segment_name as segment_name.
+ *
+ * @param tree Tree to add
+ * @param tree_name name of the tree
+ * @param hook_name name of the segment to connect the tree with
+ *
+ * @return false if hook_name could not be found
+ */
+ bool addTree(const Tree& tree, const std::string& tree_name,const std::string& hook_name);
+
+ /**
+ * Request the total number of joints in the tree.\n
+ * <strong> Important:</strong> It is not the same as the
+ * total number of segments since a segment does not need to have
+ * a joint.
+ *
+ * @return total nr of joints
+ */
+ unsigned int getNrOfJoints()const
+ {
+ return nrOfJoints;
+ };
+
+ /**
+ * Request the total number of segments in the tree.
+ * @return total number of segments
+ */
+ unsigned int getNrOfSegments()const {return nrOfSegments;};
+
+ /**
+ * Request the segment of the tree with name segment_name.
+ *
+ * @param segment_name the name of the requested segment
+ *
+ * @return constant iterator pointing to the requested segment
+ */
+ SegmentMap::const_iterator getSegment(const std::string& segment_name)const
+ {
+ return segments.find(segment_name);
+ };
+
+ SegmentMap::value_type const* getSegmentPtr(const std::string& segment_name)const
+ {
+ SegmentMap::const_iterator it = segments.find(segment_name);
+
+ if (it == segments.end())
+ return 0;
+
+ return &*it;
+ };
+
+ const SegmentMap& getSegments()const
+ {
+ return segments;
+ }
+
+ virtual ~Tree(){};
+ };
+ }
+ #endif
+
+
+
+
+
+diff --git a/intern/cycles/util/util_sseb.h b/intern/cycles/util/util_sseb.h
+index 6e669701f3b..9ffe391666a 100644
+--- a/intern/cycles/util/util_sseb.h
++++ b/intern/cycles/util/util_sseb.h
+@@ -116,7 +116,7 @@ __forceinline const sseb unpacklo( const sseb& a, const sseb& b ) { return _mm_u
+ __forceinline const sseb unpackhi( const sseb& a, const sseb& b ) { return _mm_unpackhi_ps(a, b); }
+
+ template<size_t i0, size_t i1, size_t i2, size_t i3> __forceinline const sseb shuffle( const sseb& a ) {
+- return _mm_shuffle_epi32(a, _MM_SHUFFLE(i3, i2, i1, i0));
++ return _mm_castsi128_ps(_mm_shuffle_epi32(a, _MM_SHUFFLE(i3, i2, i1, i0)));
+ }
+
+ template<> __forceinline const sseb shuffle<0, 1, 0, 1>( const sseb& a ) {