From 59cad02d19a88411cedbfc6f8ba21e4cf041321d Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Mon, 25 Jun 2018 14:45:45 -0500 Subject: blender-17:2.79.b.git3.32432d91-1.parabola1: updating version --- libre/blender/PKGBUILD | 36 ++++---- libre/blender/ffmpeg4.0.patch | 113 ++++++++++++++++++++++++ libre/blender/openvdb3-abi.patch | 28 ++++++ libre/blender/tree_hpp.patch | 183 +++++++++++++++++++++++++++++++++++++++ libre/blender/util_sseb.patch | 13 +++ 5 files changed, 352 insertions(+), 21 deletions(-) create mode 100644 libre/blender/ffmpeg4.0.patch create mode 100644 libre/blender/openvdb3-abi.patch create mode 100644 libre/blender/tree_hpp.patch create mode 100644 libre/blender/util_sseb.patch (limited to 'libre/blender') diff --git a/libre/blender/PKGBUILD b/libre/blender/PKGBUILD index ac8f31458..abc131793 100644 --- a/libre/blender/PKGBUILD +++ b/libre/blender/PKGBUILD @@ -15,14 +15,14 @@ # or simply roll with a new version. I usually choose the latter when the former seems # unreasonable. - _gittag=v2.79b -#_gitcommit=3c3d0898b0c1a1d7da70f4a1778d4360b3cfe5c8 +# _gittag=v2.79b +_gitcommit=32432d91bbec558cbd88e54aece61b0d641c1761 pkgname=blender pkgver=2.79.b -#[[ -n $_gitcommit ]] && pkgver=${pkgver}.git1.${_gitcommit} -pkgrel=5 -pkgrel+=.parabola2 +[[ -n $_gitcommit ]] && pkgver=${pkgver}.git3.${_gitcommit:0:8} +pkgrel=1 +pkgrel+=.parabola1 epoch=17 pkgdesc="A fully integrated 3D graphics creation suite" pkgdesc+=", without nonfree CUDA support" @@ -35,7 +35,7 @@ depends=('libpng' 'libtiff' 'openexr' 'python' 'desktop-file-utils' 'python-requ 'freetype2' 'openal' 'ffmpeg' 'fftw' 'boost-libs' 'opencollada' 'alembic' 'openimageio' 'libsndfile' 'jack' 'opencolorio' 'openshadinglanguage' 'jemalloc' 'libspnav' 'ptex' 'opensubdiv' 'openvdb>=5.1' 'openvdb<5.2' 'log4cplus' 'sdl2') -makedepends=('cmake' 'boost' 'mesa' 'git' 'llvm' 'gcc>=6.3') +makedepends=('cmake' 'boost' 'mesa' 'git' 'llvm') if [[ "$CARCH" == arm* ]]; then makedepends=('cmake' 'boost' 'mesa' 'git' 'llvm') fi @@ -55,6 +55,10 @@ md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' + 'da14d7cbdea1ab5499659a066658cdd2' + 'feea89510de171946c41c6208461f453' + '53da216adbc2a9d555a59c15b8f0ef08' + '3f9613fcb7ea61214982272e9c20a294' 'SKIP') prepare() { @@ -71,16 +75,10 @@ prepare() { # fix OS Name (pedantic, I know) sed -i 's|BUILD_PLATFORM;|"GNU/Linux-libre";|' 'source/creator/buildinfo.c' - # openvdb 5 fix - sed -i "s/OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER == 3/OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER >= 3/g" intern/openvdb/intern/openvdb_writer.cc - - # ffmpeg has renamed some defines - sed -i "s|FF_MIN_BUFFER_SIZE|AV_INPUT_BUFFER_MIN_SIZE|g ; \ - s|FF_INPUT_BUFFER_PADDING_SIZE|AV_INPUT_BUFFER_PADDING_SIZE|g" \ - intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp - sed -i "s|FF_MIN_BUFFER_SIZE|AV_INPUT_BUFFER_MIN_SIZE|g ; \ - s|CODEC_FLAG_GLOBAL_HEADER|AV_CODEC_FLAG_GLOBAL_HEADER|g" \ - intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp + patch -Np1 -i "$srcdir"/ffmpeg4.0.patch + patch -Np1 -i "$srcdir"/tree_hpp.patch + patch -Np1 -i "$srcdir"/util_sseb.patch + patch -Np1 -i "$srcdir"/openvdb3-abi.patch } build() { @@ -89,20 +87,16 @@ build() { [[ -d build ]] && rm -rf build mkdir build && cd build - export CFLAGS="${CFLAGS} -DOPENVDB_3_ABI_COMPATIBLE" - export CXXFLAGS="${CXXFLAGS} -DOPENVDB_3_ABI_COMPATIBLE" cmake -C../build_files/cmake/config/blender_release.cmake .. \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -DWITH_INSTALL_PORTABLE=OFF \ -DWITH_PYTHON_INSTALL=OFF \ -DOPENIMAGEIO_ROOT_DIR=/usr \ - -DWITH_LLVM=ON \ -DWITH_SYSTEM_OPENJPEG=ON \ -DWITH_GL_PROFILE_CORE=OFF \ -DWITH_GL_PROFILE_ES20=OFF \ - -DLLVM_VERSION=3.6 \ - -DLLVM_STATIC=ON \ + -DWITH_LLVM=ON \ -DWITH_CYCLES_CUDA_BINARIES='OFF' \ -DWITH_CYCLES_DEVICE_CUDA='OFF' \ -DWITH_CYCLES_PTEX=OFF \ diff --git a/libre/blender/ffmpeg4.0.patch b/libre/blender/ffmpeg4.0.patch new file mode 100644 index 000000000..4fd7801bc --- /dev/null +++ b/libre/blender/ffmpeg4.0.patch @@ -0,0 +1,113 @@ +diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp +index e9eea195208..84aea330313 100644 +--- a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp ++++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp +@@ -264,9 +264,9 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(boost::shared_ptr buffer) : + m_membuffer(buffer), + m_membufferpos(0) + { +- m_membuf = reinterpret_cast(av_malloc(FF_MIN_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE)); ++ m_membuf = reinterpret_cast(av_malloc(AV_INPUT_BUFFER_MIN_SIZE + AV_INPUT_BUFFER_PADDING_SIZE)); + +- m_aviocontext = avio_alloc_context(m_membuf, FF_MIN_BUFFER_SIZE, 0, this, ++ m_aviocontext = avio_alloc_context(m_membuf, AV_INPUT_BUFFER_MIN_SIZE, 0, this, + read_packet, NULL, seek_packet); + + if(!m_aviocontext) +diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp +index 3f95ac7a4da..2c2f0916406 100644 +--- a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp ++++ b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp +@@ -163,7 +163,7 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filename, AUD_DeviceSpecs specs, + try + { + if(m_formatCtx->oformat->flags & AVFMT_GLOBALHEADER) +- m_codecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ m_codecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; + + AVCodec* codec = avcodec_find_encoder(m_codecCtx->codec_id); + if(!codec) +@@ -185,11 +185,11 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filename, AUD_DeviceSpecs specs, + if(avcodec_open2(m_codecCtx, codec, NULL)) + AUD_THROW(AUD_ERROR_FFMPEG, codec_error); + +- m_output_buffer.resize(FF_MIN_BUFFER_SIZE); ++ m_output_buffer.resize(AV_INPUT_BUFFER_MIN_SIZE); + int samplesize = AUD_MAX(AUD_SAMPLE_SIZE(m_specs), AUD_DEVICE_SAMPLE_SIZE(m_specs)); + + if(m_codecCtx->frame_size <= 1) { +- m_input_size = FF_MIN_BUFFER_SIZE * 8 / m_codecCtx->bits_per_coded_sample / m_codecCtx->channels; ++ m_input_size = AV_INPUT_BUFFER_MIN_SIZE * 8 / m_codecCtx->bits_per_coded_sample / m_codecCtx->channels; + m_input_buffer.resize(m_input_size * samplesize); + } + else +diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c +index d7fcd896e11..9e82df17dce 100644 +--- a/source/blender/blenkernel/intern/writeffmpeg.c ++++ b/source/blender/blenkernel/intern/writeffmpeg.c +@@ -619,8 +619,6 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int + c->rc_buffer_aggressivity = 1.0; + #endif + +- c->me_method = ME_EPZS; +- + codec = avcodec_find_encoder(c->codec_id); + if (!codec) + return NULL; +@@ -682,14 +680,14 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int + ) + { + PRINT("Using global header\n"); +- c->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; + } + + /* Determine whether we are encoding interlaced material or not */ + if (rd->mode & R_FIELDS) { + PRINT("Encoding interlaced video\n"); +- c->flags |= CODEC_FLAG_INTERLACED_DCT; +- c->flags |= CODEC_FLAG_INTERLACED_ME; ++ c->flags |= AV_CODEC_FLAG_INTERLACED_DCT; ++ c->flags |= AV_CODEC_FLAG_INTERLACED_ME; + } + + /* xasp & yasp got float lately... */ +@@ -779,7 +777,7 @@ static AVStream *alloc_audio_stream(FFMpegContext *context, RenderData *rd, int + } + + if (of->oformat->flags & AVFMT_GLOBALHEADER) { +- c->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; + } + + set_ffmpeg_properties(rd, c, "audio", &opts); +@@ -798,14 +796,14 @@ static AVStream *alloc_audio_stream(FFMpegContext *context, RenderData *rd, int + st->codec->time_base.den = st->codec->sample_rate; + + #ifndef FFMPEG_HAVE_ENCODE_AUDIO2 +- context->audio_outbuf_size = FF_MIN_BUFFER_SIZE; ++ context->audio_outbuf_size = AV_INPUT_BUFFER_MIN_SIZE; + #endif + + if (c->frame_size == 0) + // used to be if ((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD)) + // not sure if that is needed anymore, so let's try out if there are any + // complaints regarding some ffmpeg versions users might have +- context->audio_input_samples = FF_MIN_BUFFER_SIZE * 8 / c->bits_per_coded_sample / c->channels; ++ context->audio_input_samples = AV_INPUT_BUFFER_MIN_SIZE * 8 / c->bits_per_coded_sample / c->channels; + else { + context->audio_input_samples = c->frame_size; + #ifndef FFMPEG_HAVE_ENCODE_AUDIO2 +diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c +index eaf4dfd84b4..9c2f42feb52 100644 +--- a/source/blender/imbuf/intern/indexer.c ++++ b/source/blender/imbuf/intern/indexer.c +@@ -537,7 +537,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg( + av_opt_set_int(rv->c, "qmax", ffmpeg_quality, 0); + + if (rv->of->flags & AVFMT_GLOBALHEADER) { +- rv->c->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ rv->c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; + } + + if (avio_open(&rv->of->pb, fname, AVIO_FLAG_WRITE) < 0) { diff --git a/libre/blender/openvdb3-abi.patch b/libre/blender/openvdb3-abi.patch new file mode 100644 index 000000000..73c46094d --- /dev/null +++ b/libre/blender/openvdb3-abi.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bfea2dd1a97..c59aff4c62c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -252,6 +252,10 @@ option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" _init_OPEN + option(WITH_OPENVDB "Enable features relying on OpenVDB" OFF) + option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" OFF) + ++if(WITH_OPENVDB) ++ add_definitions(-DOPENVDB_3_ABI_COMPATIBLE=TRUE) ++endif() ++ + # GHOST Windowing Library Options + option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF) + mark_as_advanced(WITH_GHOST_DEBUG) +diff --git a/intern/openvdb/intern/openvdb_writer.cc b/intern/openvdb/intern/openvdb_writer.cc +index e886c5a76a8..bedcfe65552 100644 +--- a/intern/openvdb/intern/openvdb_writer.cc ++++ b/intern/openvdb/intern/openvdb_writer.cc +@@ -45,7 +45,7 @@ void OpenVDBWriter::insert(const openvdb::GridBase::Ptr &grid) + + void OpenVDBWriter::insert(const openvdb::GridBase &grid) + { +-#if (OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER == 3) ++#if (OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER <= 3) || defined(OPENVDB_3_ABI_COMPATIBLE) + m_grids->push_back(grid.copyGrid()); + #else + m_grids->push_back(grid.copyGridWithNewTree()); diff --git a/libre/blender/tree_hpp.patch b/libre/blender/tree_hpp.patch new file mode 100644 index 000000000..4d00a223d --- /dev/null +++ b/libre/blender/tree_hpp.patch @@ -0,0 +1,183 @@ +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 + + // Version: 1.0 + // Author: Ruben Smits + // Maintainer: Ruben Smits + // 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 + #include + #include + + namespace KDL + { + //Forward declaration + class TreeElement; + // Eigen allocator is needed for alignment of Eigen data types +- typedef std::map, Eigen::aligned_allocator > > SegmentMap; ++ typedef std::map, Eigen::aligned_allocator > > SegmentMap; + + class TreeElement + { + public: + TreeElement():q_nr(0),parent(0) + {}; + public: + Segment segment; + unsigned int q_nr; + SegmentMap::value_type const *parent; + std::vector 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 tree + * 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 + * Important: 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/libre/blender/util_sseb.patch b/libre/blender/util_sseb.patch new file mode 100644 index 000000000..b65f44ffa --- /dev/null +++ b/libre/blender/util_sseb.patch @@ -0,0 +1,13 @@ +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 __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 ) { -- cgit v1.2.3