blender: update to 2.80.

This commit is contained in:
John 2019-07-30 21:26:02 +02:00 committed by Leah Neukirchen
parent 291193b08b
commit c68352ed5a
9 changed files with 84 additions and 223 deletions

View file

@ -0,0 +1,49 @@
Index: blender-2.80_patched/source/blender/python/generic/py_capi_utils.c
===================================================================
--- blender-2.80_patched/source/blender/python/generic/py_capi_utils.c
+++ blender-2.80_patched/source/blender/python/generic/py_capi_utils.c
@@ -717,9 +717,11 @@
****************************************************************************/
PyObject *PyC_DefaultNameSpace(const char *filename)
{
- PyInterpreterState *interp = PyThreadState_GET()->interp;
+ PyObject *modules = PyImport_GetModuleDict();
+ PyObject *builtins = PyDict_GetItemString(modules, "builtins");
+
PyObject *mod_main = PyModule_New("__main__");
- PyDict_SetItemString(interp->modules, "__main__", mod_main);
+ PyDict_SetItemString(modules, "__main__", mod_main);
Py_DECREF(mod_main); /* sys.modules owns now */
PyModule_AddStringConstant(mod_main, "__name__", "__main__");
if (filename) {
@@ -727,8 +729,8 @@
* note: this wont map to a real file when executing text-blocks and buttons. */
PyModule_AddObject(mod_main, "__file__", PyC_UnicodeFromByte(filename));
}
- PyModule_AddObject(mod_main, "__builtins__", interp->builtins);
- Py_INCREF(interp->builtins); /* AddObject steals a reference */
+ PyModule_AddObject(mod_main, "__builtins__", builtins);
+ Py_INCREF(builtins); /* AddObject steals a reference */
return PyModule_GetDict(mod_main);
}
@@ -755,15 +757,15 @@
/* restore MUST be called after this */
void PyC_MainModule_Backup(PyObject **main_mod)
{
- PyInterpreterState *interp = PyThreadState_GET()->interp;
- *main_mod = PyDict_GetItemString(interp->modules, "__main__");
+ PyObject *modules = PyImport_GetModuleDict();
+ *main_mod = PyDict_GetItemString(modules, "__main__");
Py_XINCREF(*main_mod); /* don't free */
}
void PyC_MainModule_Restore(PyObject *main_mod)
{
- PyInterpreterState *interp = PyThreadState_GET()->interp;
- PyDict_SetItemString(interp->modules, "__main__", main_mod);
+ PyObject *modules = PyImport_GetModuleDict();
+ PyDict_SetItemString(modules, "__main__", main_mod);
Py_XDECREF(main_mod);
}

View file

@ -20,30 +20,9 @@ diff -ru blender-2.78.orig/CMakeLists.txt blender-2.78a/CMakeLists.txt
elseif(WIN32)
set(_init_JACK OFF)
elseif(APPLE)
diff -ru blender-2.78.orig/intern/guardedalloc/intern/mallocn_intern.h blender-2.78a/intern/guardedalloc/intern/mallocn_intern.h
--- blender-2.78.orig/intern/guardedalloc/intern/mallocn_intern.h 2016-09-28 09:26:55.000000000 +0000
+++ blender-2.78a/intern/guardedalloc/intern/mallocn_intern.h 2017-02-07 14:44:35.213040733 +0000
@@ -52,7 +52,7 @@
#undef HAVE_MALLOC_STATS
#define USE_MALLOC_USABLE_SIZE /* internal, when we have malloc_usable_size() */
-#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || defined(__GLIBC__)
+#if (defined(__linux__) && defined(HAVE_EXECINFO_H)) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || defined(__GLIBC__)
# include <malloc.h>
# define HAVE_MALLOC_STATS
#elif defined(__FreeBSD__)
diff -ru blender-2.78.orig/source/blender/blenlib/intern/system.c blender-2.78a/source/blender/blenlib/intern/system.c
--- blender-2.78.orig/source/blender/blenlib/intern/system.c 2016-10-25 09:59:23.000000000 +0000
+++ blender-2.78a/source/blender/blenlib/intern/system.c 2017-02-07 14:44:35.213040733 +0000
@@ -31,7 +31,7 @@
#include "MEM_guardedalloc.h"
/* for backtrace */
-#if defined(__linux__) || defined(__APPLE__)
+#if (defined(__linux__) && defined(HAVE_EXECINFO_H)) || defined(__APPLE__)
# include <execinfo.h>
#elif defined(WIN32)
# include <windows.h>
@@ -77,7 +77,7 @@
{
/* ------------- */
@ -65,3 +44,31 @@ diff -ru blender-2.78.orig/source/creator/creator_signals.c blender-2.78a/source
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
# endif /* defined(__linux__) && defined(__GNUC__) */
# if defined(OSX_SSE_FPE)
--- a/source/blender/blenlib/intern/system.c 2019-07-30 21:05:30.702224608 +0200
+++ - 2019-07-30 21:13:21.535328709 +0200
@@ -38,10 +38,13 @@
# include <dbghelp.h>
# pragma warning(pop)
#else
-# include <execinfo.h>
# include <unistd.h>
#endif
+#if (defined(__linux__) && defined(HAVE_EXECINFO_H)) || defined(__APPLE__)
+# include <execinfo.h>
+#endif
+
int BLI_cpu_support_sse2(void)
{
#if defined(__x86_64__) || defined(_M_X64)
--- a/intern/guardedalloc/intern/mallocn_intern.h 2019-07-24 09:41:39.000000000 +0200
+++ - 2019-10-20 00:03:13.450031866 +0200
@@ -40,7 +40,7 @@
#undef HAVE_MALLOC_STATS
#define USE_MALLOC_USABLE_SIZE /* internal, when we have malloc_usable_size() */
-#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
+#if (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
defined(__GLIBC__)
# include <malloc.h>
# define HAVE_MALLOC_STATS

View file

@ -1,14 +0,0 @@
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -1340,6 +1340,11 @@ bool DocumentImporter::writeAnimationLis
return anim_importer.write_animation_list(animationList);
}
+bool DocumentImporter::writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip)
+{
+ return true;
+}
+
/** When this method is called, the writer must write the skin controller data.
* \return The writer should return true, if writing succeeded, false otherwise.*/
bool DocumentImporter::writeSkinControllerData(const COLLADAFW::SkinControllerData *skin)

View file

@ -1,11 +0,0 @@
--- a/source/blender/collada/DocumentImporter.h.orig 2018-12-03 07:38:12 UTC
+++ b/source/blender/collada/DocumentImporter.h
@@ -107,6 +107,8 @@ public:
bool writeAnimation(const COLLADAFW::Animation*);
bool writeAnimationList(const COLLADAFW::AnimationList*);
+
+ bool writeAnimationClip( const COLLADAFW::AnimationClip* );
bool writeGeometry(const COLLADAFW::Geometry*);

View file

@ -1,116 +0,0 @@
source: https://git.archlinux.org/svntogit/community.git/plain/trunk/ffmpeg4.0.patch?h=packages/blender
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<AUD_Buffer> buffer) :
m_membuffer(buffer),
m_membufferpos(0)
{
- m_membuf = reinterpret_cast<data_t*>(av_malloc(FF_MIN_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE));
+ m_membuf = reinterpret_cast<data_t*>(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) {

View file

@ -1,31 +0,0 @@
https://bugs.gentoo.org/685922
--- a/intern/elbeem/intern/solver_main.cpp
+++ b/intern/elbeem/intern/solver_main.cpp
@@ -381,7 +381,7 @@ LbmFsgrSolver::mainLoop(const int lev)
GRID_REGION_INIT();
#if PARALLEL==1
const int gDebugLevel = ::gDebugLevel;
-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
+#pragma omp parallel default(none) firstprivate(gDebugLevel,iend,lev,cutConst) num_threads(mNumOMPThreads) \
reduction(+: \
calcCurrentMass,calcCurrentVolume, \
calcCellsFilled,calcCellsEmptied, \
@@ -1126,7 +1126,7 @@ LbmFsgrSolver::preinitGrids()
GRID_REGION_INIT();
#if PARALLEL==1
const int gDebugLevel = ::gDebugLevel;
-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
+#pragma omp parallel default(none) firstprivate(gDebugLevel,iend,lev) num_threads(mNumOMPThreads) \
reduction(+: \
calcCurrentMass,calcCurrentVolume, \
calcCellsFilled,calcCellsEmptied, \
@@ -1164,7 +1164,7 @@ LbmFsgrSolver::standingFluidPreinit()
GRID_REGION_INIT();
#if PARALLEL==1
const int gDebugLevel = ::gDebugLevel;
-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
+#pragma omp parallel default(none) firstprivate(gDebugLevel,iend,lev) num_threads(mNumOMPThreads) \
reduction(+: \
calcCurrentMass,calcCurrentVolume, \
calcCellsFilled,calcCellsEmptied, \

View file

@ -1,11 +0,0 @@
--- a/intern/itasc/kdl/tree.hpp 2018-03-23 16:22:25.000000000 +0100
+++ b/intern/itasc/kdl/tree.hpp 2018-08-13 19:31:32.101185313 +0200
@@ -34,7 +34,7 @@
//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
{

View file

@ -1,11 +0,0 @@
--- 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 ) {

View file

@ -1,21 +1,22 @@
# Template file for 'blender'
pkgname=blender
version=2.79b
revision=10
version=2.80
revision=1
build_style="cmake"
makedepends="
libgomp-devel libpng-devel tiff-devel python3-devel glu-devel
glew-devel freetype-devel jack-devel libopenal-devel libsndfile-devel
libsamplerate-devel ffmpeg-devel fftw-devel boost-devel pcre-devel llvm
libopenexr-devel libopenjpeg-devel libXi-devel openimageio-devel
opencolorio-devel opencollada-devel"
opencolorio-devel opencollada-devel python3-numpy"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="3D graphics creation suite"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2"
license="GPL-2.0-or-later"
homepage="http://www.blender.org"
distfiles="http://download.blender.org/source/${pkgname}-${version}.tar.gz"
checksum=4c944c304a49e68ac687ea06f5758204def049b66dc211e1cffa1857716393bc
#distfiles="http://download.blender.org/source/${pkgname}-${version}.tar.gz"
distfiles="https://ftp.halifax.rwth-aachen.de/blender/source/blender-${version}.tar.gz"
checksum=cd9d7e505c1f6e63a4f72366ed04d446859977eeb34cde21283aaea6a304a5c0
patch_args="-Np1"
pycompile_version="$py3_ver"
@ -25,9 +26,7 @@ archs="x86_64* i686* ppc64*"
configure_args="
-DWITH_INSTALL_PORTABLE=OFF
-DWITH_PYTHON_INSTALL=OFF
-DWITH_GAMEENGINE=ON
-DWITH_JACK=ON
-DWITH_PLAYER=ON
-DWITH_CODEC_FFMPEG=ON
-DWITH_CODEC_SNDFILE=ON
-DWITH_OPENMP=ON