Saturday, November 14, 2020

[UPDATE] blender 2.81

Hello all,

please see below for a diff to update blender to version 2.81. Raphael
Graf (cc'd) sent an update for 2.80 back in August 2019 which did not
get committed, and the 2.81 update here is based off that. I was trying
to compile 2.80 but was having a bit of trouble getting the numpy
header files into the python 3.7 include dir.

Luckily with 2.81 we can use python 3.8, and as an extra incentive to
test I believe this is the last port that uses 3.7

some optional dependencies we don't have in ports (like opensubdiv),
which I can look into porting soon, and I will look at enabling some of
the optional dependencies in general for future revisions.

Cheers,
Andrea

diff -bur /usr/ports/graphics/blender/Makefile ./Makefile
--- /usr/ports/graphics/blender/Makefile Fri Nov 13 20:37:45 2020
+++ ./Makefile Sat Nov 14 16:14:02 2020
@@ -4,8 +4,7 @@

COMMENT = 3D creation software

-DISTNAME = blender-2.79
-REVISION = 10
+DISTNAME = blender-2.81

CATEGORIES = graphics

@@ -17,17 +16,19 @@
PERMIT_PACKAGE = Yes

WANTLIB += ${MODPY_WANTLIB}
-WANTLIB += ${COMPILER_LIBCXX} GL GLEW GLU Half-2_5 Iex-2_5 IlmImf-2_5
+WANTLIB += ${COMPILER_LIBCXX} GL GLEW Half-2_5 Iex-2_5 IlmImf-2_5
WANTLIB += IlmThread-2_5 Imath-2_5 OpenColorIO OpenImageIO X11
WANTLIB += Xi Xrender Xxf86vm avcodec avdevice avformat avutil
WANTLIB += boost_atomic-mt boost_chrono-mt boost_date_time-mt
WANTLIB += boost_filesystem-mt boost_regex-mt boost_system-mt
-WANTLIB += boost_thread-mt c freetype jpeg m openal openjpeg png
-WANTLIB += swscale tiff tinyxml util yaml-cpp z
+WANTLIB += boost_thread-mt c freetype jpeg m openal openjp2 png
+WANTLIB += swscale tiff tinyxml util yaml-cpp z Xfixes tbb tbbmalloc

MASTER_SITES = https://download.blender.org/source/ \
http://mirror.cs.umn.edu/blender.org/source/

+EXTRACT_SUFX = .tar.xz
+
MODULES = devel/cmake \
lang/python \

@@ -50,18 +51,22 @@
-DWITH_INTERNATIONAL=OFF \
-DWITH_RAYOPTIMIZATION=OFF \
-DWITH_OPENCOLORIO=ON \
- -DWITH_SYSTEM_OPENJPEG=ON \
+ -DWITH_OPENMP=OFF \
+ -DWITH_SYSTEM_GLEW=ON \
-DWITH_CPU_SSE=OFF

-BUILD_DEPENDS = devel/gflags
+BUILD_DEPENDS = devel/gflags \
+ math/py-numpy${MODPY_FLAVOR} \
+ devel/tbb
LIB_DEPENDS = graphics/png \
graphics/jpeg \
graphics/glew \
graphics/openexr \
graphics/tiff \
devel/boost \
+ devel/tbb \
audio/openal \
- graphics/openjpeg \
+ graphics/openjp2 \
graphics/ffmpeg \
graphics/openimageio \
${MODPY_LIB_DEPENDS}
diff -bur /usr/ports/graphics/blender/distinfo ./distinfo
--- /usr/ports/graphics/blender/distinfo Thu Nov 9 12:00:28 2017
+++ ./distinfo Fri Nov 13 20:39:39 2020
@@ -1,2 +1,2 @@
-SHA256 (blender-2.79.tar.gz) = qd4D52mipKC/khhlVolsT00y/ZrESAkVrpLX+VslyJk=
-SIZE (blender-2.79.tar.gz) = 50145270
+SHA256 (blender-2.81.tar.xz) = ykKdp78PHpzjnJFSiM+it27X7DaIUTnE18GJEoQDN98=
+SIZE (blender-2.81.tar.xz) = 39241924
diff -bur /usr/ports/graphics/blender/patches/patch-extern_carve_include_carve_geom_hpp ./patches/patch-extern_carve_include_carve_geom_hpp
--- /usr/ports/graphics/blender/patches/patch-extern_carve_include_carve_geom_hpp Sun Feb 26 15:37:26 2012
+++ ./patches/patch-extern_carve_include_carve_geom_hpp Fri Nov 13 18:50:36 2020
@@ -1,13 +0,0 @@
-$OpenBSD: patch-extern_carve_include_carve_geom_hpp,v 1.1 2012/02/26 20:37:26 pascal Exp $
---- extern/carve/include/carve/geom.hpp.orig Sat Feb 18 11:45:47 2012
-+++ extern/carve/include/carve/geom.hpp Sat Feb 18 11:46:00 2012
-@@ -21,6 +21,9 @@
-
- #include <vector>
-
-+#undef _N
-+#undef _C
-+
- namespace carve {
- namespace geom {
-
diff -bur /usr/ports/graphics/blender/patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGReader_cpp ./patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGReader_cpp
--- /usr/ports/graphics/blender/patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGReader_cpp Mon Feb 25 17:22:13 2019
+++ ./patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGReader_cpp Fri Nov 13 18:50:36 2020
@@ -1,19 +0,0 @@
-$OpenBSD: patch-intern_audaspace_ffmpeg_AUD_FFMPEGReader_cpp,v 1.1 2019/02/25 22:22:13 sthen Exp $
-
-https://svnweb.freebsd.org/ports/head/graphics/blender/files/patch-ffmpeg4
-
-Index: intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
---- intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp.orig
-+++ intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
-@@ -264,9 +264,9 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(boost::shared_ptr<A
- 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 -bur /usr/ports/graphics/blender/patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGWriter_cpp ./patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGWriter_cpp
--- /usr/ports/graphics/blender/patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGWriter_cpp Mon Feb 25 17:22:13 2019
+++ ./patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGWriter_cpp Fri Nov 13 18:50:36 2020
@@ -1,30 +0,0 @@
-$OpenBSD: patch-intern_audaspace_ffmpeg_AUD_FFMPEGWriter_cpp,v 1.1 2019/02/25 22:22:13 sthen Exp $
-
-https://svnweb.freebsd.org/ports/head/graphics/blender/files/patch-ffmpeg4
-
-Index: intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp
---- intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp.orig
-+++ intern/audaspace/ffmpeg/AUD_FFMPEGWriter.cpp
-@@ -163,7 +163,7 @@ AUD_FFMPEGWriter::AUD_FFMPEGWriter(std::string filenam
- 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 filenam
- 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
Only in ./patches: patch-intern_cycles_CMakeLists_txt
diff -bur /usr/ports/graphics/blender/patches/patch-intern_cycles_util_util_aligned_malloc_cpp ./patches/patch-intern_cycles_util_util_aligned_malloc_cpp
--- /usr/ports/graphics/blender/patches/patch-intern_cycles_util_util_aligned_malloc_cpp Wed Mar 30 09:30:04 2016
+++ ./patches/patch-intern_cycles_util_util_aligned_malloc_cpp Sat Nov 14 10:02:00 2020
@@ -1,22 +1,24 @@
$OpenBSD: patch-intern_cycles_util_util_aligned_malloc_cpp,v 1.3 2016/03/30 13:30:04 pascal Exp $
---- intern/cycles/util/util_aligned_malloc.cpp.orig Mon Mar 21 17:16:12 2016
-+++ intern/cycles/util/util_aligned_malloc.cpp Wed Mar 30 11:42:27 2016
+Index: intern/cycles/util/util_aligned_malloc.cpp
+--- intern/cycles/util/util_aligned_malloc.cpp.orig
++++ intern/cycles/util/util_aligned_malloc.cpp
@@ -21,7 +21,8 @@

/* Adopted from Libmv. */

-#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
-+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) \
-+ && !defined(__OpenBSD__)
++#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && \
++ !defined(__OpenBSD__)
/* Needed for memalign on Linux and _aligned_alloc on Windows. */
# ifdef FREE_WINDOWS
/* Make sure _aligned_malloc is included. */
-@@ -52,7 +53,7 @@ void *util_aligned_malloc(size_t size, int alignment)
- */
- assert(alignment == 16);
- return malloc(size);
--#elif defined(__FreeBSD__) || defined(__NetBSD__)
-+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+@@ -46,7 +47,8 @@ void *util_aligned_malloc(size_t size, int alignment)
+ return MEM_mallocN_aligned(size, alignment, "Cycles Aligned Alloc");
+ #elif defined(_WIN32)
+ return _aligned_malloc(size, alignment);
+-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || \
++ defined(__OpenBSD__)
void *result;
- if(posix_memalign(&result, alignment, size)) {
+ if (posix_memalign(&result, alignment, size)) {
/* Non-zero means allocation error
diff -bur /usr/ports/graphics/blender/patches/patch-intern_ffmpeg_ffmpeg_compat_h ./patches/patch-intern_ffmpeg_ffmpeg_compat_h
--- /usr/ports/graphics/blender/patches/patch-intern_ffmpeg_ffmpeg_compat_h Thu Nov 9 12:00:28 2017
+++ ./patches/patch-intern_ffmpeg_ffmpeg_compat_h Fri Nov 13 18:50:36 2020
@@ -5,7 +5,7 @@
Index: intern/ffmpeg/ffmpeg_compat.h
--- intern/ffmpeg/ffmpeg_compat.h.orig
+++ intern/ffmpeg/ffmpeg_compat.h
-@@ -413,7 +413,7 @@ void avformat_close_input(AVFormatContext **ctx)
+@@ -489,7 +489,7 @@ void avformat_close_input(AVFormatContext **ctx)
}

No comments:

Post a Comment