Monday, November 30, 2020

Re: [UPDATE] graphics/blender -> 2.90.1

"Dimitri Karamazov" <deserter666@danwin1210.me> writes:

> Hopefully this inline diff will work, made some changes to the client.

This works for me on amd64. I have some local wip ports for OpenSubdiv
and and OpenVDB and I'm able to build blender against these, which is
very helpful.

Andrea

> Build,run tested on amd64.
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/blender/Makefile,v
> retrieving revision 1.98
> diff -u -p -r1.98 Makefile
> --- Makefile 5 Jul 2020 11:01:11 -0000 1.98
> +++ Makefile 28 Nov 2020 18:43:37 -0000
> @@ -4,46 +4,38 @@ ONLY_FOR_ARCHS = amd64 i386
>
> COMMENT = 3D creation software
>
> -DISTNAME = blender-2.79
> -REVISION = 10
> +DISTNAME = blender-2.91.0
>
> CATEGORIES = graphics
>
> HOMEPAGE = https://www.blender.org/
>
> -MAINTAINER = Pascal Stumpf <pascal@stumpf.co>
> +MAINTAINER = Dimitri Karamazov <deserter666@danwin1210.me>
>
> # GPLv2+
> PERMIT_PACKAGE = Yes
>
> WANTLIB += ${MODPY_WANTLIB}
> -WANTLIB += ${COMPILER_LIBCXX} GL GLEW GLU 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 += ${COMPILER_LIBCXX} GL GLEW Half-2_5 Iex-2_5 IlmImf-2_5
> +WANTLIB += IlmThread-2_5 Imath-2_5 OpenColorIO OpenImageIO SDL2
> +WANTLIB += X11 Xfixes Xi Xrender Xxf86vm avcodec avdevice avformat
> +WANTLIB += avutil 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 fftw3 freetype jpeg m openal openjp2
> +WANTLIB += png sndfile swscale tbb tiff tinyxml util yaml-cpp
> +WANTLIB += z
>
> MASTER_SITES = https://download.blender.org/source/ \
> http://mirror.cs.umn.edu/blender.org/source/
>
> -MODULES = devel/cmake \
> - lang/python \
> +EXTRACT_SUFX = .tar.xz
>
> +MODULES = devel/cmake \
> + lang/python
>
> COMPILER = base-clang ports-gcc
>
> -# XXX Blender uses a private Python API which has changed in Python 3.8
> -# Patches aren't all in one place, updating to Blender v2.81 or newer
> -# is probably the simplest option to cope with this
> -# https://bugs.python.org/issue35886
> -# https://developer.blender.org/D6038
> -# https://developer.blender.org/rBSa7cf7b114f82625aa5d81e91e26e67cbe7a842bc
> -# https://developer.blender.org/rBa7cf7b114f82625aa5d81e91e26e67cbe7a842bc
> -# and probably more..
> -#MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
> -MODPY_VERSION = 3.7
> +MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
>
> CONFIGURE_ARGS = -DPYTHON_INCLUDE_DIR="${MODPY_INCDIR}" \
> -DPYTHON_VERSION=${MODPY_VERSION} \
> @@ -51,32 +43,55 @@ CONFIGURE_ARGS = -DPYTHON_INCLUDE_DIR="$
> -DWITH_INTERNATIONAL=OFF \
> -DWITH_RAYOPTIMIZATION=OFF \
> -DWITH_OPENCOLORIO=ON \
> - -DWITH_SYSTEM_OPENJPEG=ON \
> - -DWITH_CPU_SSE=OFF
> + -DWITH_OPENMP=OFF \
> + -DWITH_SYSTEM_GLEW=ON \
> + -DWITH_CPU_SSE=OFF \
> + -DWITH_CYCLES_EMBREE=OFF \
> + -DWITH_JACK=OFF
>
> -BUILD_DEPENDS = devel/gflags
> +BUILD_DEPENDS = devel/gflags \
> + math/py-numpy${MODPY_FLAVOR}
> 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}
> + math/fftw3 \
> + ${MODPY_LIB_DEPENDS}
> RUN_DEPENDS = devel/desktop-file-utils \
> + math/py-numpy${MODPY_FLAVOR} \
> x11/gnome/librsvg
>
> NO_TEST = Yes
>
> -CXXFLAGS += -I${LOCALBASE}/include -I${X11BASE}/include -pthread \
> - -std=c++11
> +CXXFLAGS += -I${LOCALBASE}/include -I${X11BASE}/include -pthread
> CFLAGS += -I${LOCALBASE}/include
>
> MODPY_ADJ_FILES = release/bin/blender-thumbnailer.py \
> - release/scripts/modules/blend_render_info.py
> + release/scripts/modules/bl_i18n_utils/merge_po.py \
> + release/scripts/modules/bl_i18n_utils/utils_rtl.py \
> + release/scripts/modules/blend_render_info.py \
> + release/scripts/addons/io_curve_svg/svg_util_test.py \
> + release/scripts/addons/io_scene_fbx/fbx2json.py \
> + release/scripts/addons/io_scene_fbx/json2fbx.py \
> + release/scripts/addons/sun_position/geo.py \
> + release/datafiles/alert_icons_update.py \
> + release/datafiles/blender_icons_geom_update.py \
> + release/datafiles/blender_icons_update.py \
> + release/datafiles/ctodata.py \
> + release/datafiles/prvicons_update.py
> +
> +post-build:
> + ${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \
> + ${WRKSRC}/release/scripts \
> + ${WRKSRC}/release/datafiles \
> + ${WRKSRC}/intern/cycles/blender/addon
>
> do-install:
> ${INSTALL_SCRIPT} ${FILESDIR}/blender ${PREFIX}/bin
> @@ -94,7 +108,7 @@ do-install:
> cd ${WRKSRC}/release/datafiles && pax -rw . \
> ${PREFIX}/share/blender/datafiles
> ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/blender
> - ${INSTALL_DATA} ${WRKSRC}/release/text/*license* \
> + ${INSTALL_DATA} ${WRKSRC}/release/license/* \
> ${PREFIX}/share/doc/blender
> ${INSTALL_DATA} ${WRKSRC}/release/text/copy* \
> ${PREFIX}/share/doc/blender
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/graphics/blender/distinfo,v
> retrieving revision 1.28
> diff -u -p -r1.28 distinfo
> --- distinfo 9 Nov 2017 17:00:28 -0000 1.28
> +++ distinfo 28 Nov 2020 18:43:37 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (blender-2.79.tar.gz) = qd4D52mipKC/khhlVolsT00y/ZrESAkVrpLX+VslyJk=
> -SIZE (blender-2.79.tar.gz) = 50145270
> +SHA256 (blender-2.91.0.tar.xz) = VXpK/Qn+CG68sCVrkEiW9Xf+kTaDZV9CSLiBWR81aXQ=
> +SIZE (blender-2.91.0.tar.xz) = 41528920
> Index: patches/patch-extern_carve_include_carve_geom_hpp
> ===================================================================
> RCS file: patches/patch-extern_carve_include_carve_geom_hpp
> diff -N patches/patch-extern_carve_include_carve_geom_hpp
> --- patches/patch-extern_carve_include_carve_geom_hpp 26 Feb 2012 20:37:26 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -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 {
> -
> Index: patches/patch-extern_glog_src_config_h
> ===================================================================
> RCS file: /cvs/ports/graphics/blender/patches/patch-extern_glog_src_config_h,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-extern_glog_src_config_h
> --- patches/patch-extern_glog_src_config_h 30 Mar 2016 13:30:04 -0000 1.1
> +++ patches/patch-extern_glog_src_config_h 28 Nov 2020 18:43:37 -0000
> @@ -1,7 +1,7 @@
> $OpenBSD: patch-extern_glog_src_config_h,v 1.1 2016/03/30 13:30:04 pascal Exp $
> ---- extern/glog/src/config.h.orig Wed Mar 30 13:13:13 2016
> -+++ extern/glog/src/config.h Wed Mar 30 13:13:34 2016
> -@@ -6,6 +6,8 @@
> +--- extern/glog/src/config.h.orig Tue Sep 22 19:36:29 2020
> ++++ extern/glog/src/config.h Sun Nov 22 13:12:51 2020
> +@@ -2,6 +2,8 @@
> #include "config_mac.h"
> #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
> #include "config_freebsd.h"
> Index: patches/patch-extern_wcwidth_wcwidth_h
> ===================================================================
> RCS file: patches/patch-extern_wcwidth_wcwidth_h
> diff -N patches/patch-extern_wcwidth_wcwidth_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-extern_wcwidth_wcwidth_h 28 Nov 2020 18:43:37 -0000
> @@ -0,0 +1,15 @@
> +$OpenBSD$
> +
> +uchar.h doesn't exist in OpenBSD
> +
> +--- extern/wcwidth/wcwidth.h.orig Tue Sep 22 19:36:29 2020
> ++++ extern/wcwidth/wcwidth.h Sun Nov 22 13:12:51 2020
> +@@ -21,7 +21,7 @@
> + #define __WCWIDTH_H__
> +
> + #ifndef __cplusplus
> +-# if defined(__APPLE__) || defined(__NetBSD__)
> ++# if defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__)
> + /* The <uchar.h> standard header is missing on macOS. */
> + #include <stddef.h>
> + typedef unsigned int char32_t;
> Index: patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGReader_cpp
> ===================================================================
> RCS file: patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGReader_cpp
> diff -N patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGReader_cpp
> --- patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGReader_cpp 25 Feb 2019 22:22:13 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -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)
> Index: patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGWriter_cpp
> ===================================================================
> RCS file: patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGWriter_cpp
> diff -N patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGWriter_cpp
> --- patches/patch-intern_audaspace_ffmpeg_AUD_FFMPEGWriter_cpp 25 Feb 2019 22:22:13 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -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
> Index: patches/patch-intern_cycles_CMakeLists_txt
> ===================================================================
> RCS file: patches/patch-intern_cycles_CMakeLists_txt
> diff -N patches/patch-intern_cycles_CMakeLists_txt
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-intern_cycles_CMakeLists_txt 28 Nov 2020 18:43:37 -0000
> @@ -0,0 +1,25 @@
> +$OpenBSD$
> +
> +Fix conflict with textproc/pugixml
> +
> +Index: intern/cycles/CMakeLists.txt
> +--- intern/cycles/CMakeLists.txt.orig Wed Nov 25 14:01:32 2020
> ++++ intern/cycles/CMakeLists.txt Sat Nov 28 21:50:54 2020
> +@@ -320,11 +320,16 @@ include_directories(
> + SYSTEM
> + ${BOOST_INCLUDE_DIR}
> + ${OPENIMAGEIO_INCLUDE_DIRS}
> +- ${OPENIMAGEIO_INCLUDE_DIRS}/OpenImageIO
> + ${OPENEXR_INCLUDE_DIR}
> + ${OPENEXR_INCLUDE_DIRS}
> + ${PUGIXML_INCLUDE_DIR}
> + ${TBB_INCLUDE_DIRS}
> ++)
> ++
> ++include_directories(
> ++ BEFORE
> ++ SYSTEM
> ++ ${OPENIMAGEIO_INCLUDE_DIRS}/OpenImageIO
> + )
> +
> + if(CYCLES_STANDALONE_REPOSITORY)
> Index: patches/patch-intern_cycles_util_util_aligned_malloc_cpp
> ===================================================================
> RCS file: /cvs/ports/graphics/blender/patches/patch-intern_cycles_util_util_aligned_malloc_cpp,v
> retrieving revision 1.3
> diff -u -p -r1.3 patch-intern_cycles_util_util_aligned_malloc_cpp
> --- patches/patch-intern_cycles_util_util_aligned_malloc_cpp 30 Mar 2016 13:30:04 -0000 1.3
> +++ patches/patch-intern_cycles_util_util_aligned_malloc_cpp 28 Nov 2020 18:43:37 -0000
> @@ -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 Wed Sep 2 16:39:54 2020
> ++++ intern/cycles/util/util_aligned_malloc.cpp Sun Nov 22 13:12:51 2020
> @@ -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__)
> - void *result;
> - if(posix_memalign(&result, alignment, size)) {
> - /* Non-zero means allocation error
> +@@ -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)) {
> + /* Non-zero means allocation error
> Index: patches/patch-intern_ffmpeg_ffmpeg_compat_h
> ===================================================================
> RCS file: /cvs/ports/graphics/blender/patches/patch-intern_ffmpeg_ffmpeg_compat_h,v
> retrieving revision 1.5
> diff -u -p -r1.5 patch-intern_ffmpeg_ffmpeg_compat_h
> --- patches/patch-intern_ffmpeg_ffmpeg_compat_h 9 Nov 2017 17:00:28 -0000 1.5
> +++ patches/patch-intern_ffmpeg_ffmpeg_compat_h 28 Nov 2020 18:43:37 -0000
> @@ -3,9 +3,9 @@ $OpenBSD: patch-intern_ffmpeg_ffmpeg_com
> Fix building with older FFmpeg.
>
> 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)
> +--- intern/ffmpeg/ffmpeg_compat.h.orig Tue Sep 22 19:36:29 2020
> ++++ intern/ffmpeg/ffmpeg_compat.h Sun Nov 22 13:12:51 2020
> +@@ -489,7 +489,7 @@ void avformat_close_input(AVFormatContext **ctx)
> }
>

No comments:

Post a Comment