From 37801219f4823e112b6cacb65ca34e0430c8eac9 Mon Sep 17 00:00:00 2001 From: joerg Date: Thu, 9 Feb 2017 00:23:29 +0000 Subject: Force alloca to be the builtin for GCC-like compilers. Be explicit about the Python version. --- graphics/blender/Makefile | 3 ++- graphics/blender/distinfo | 3 ++- .../patches/patch-source_blender_blenlib_BLI__alloca.h | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 graphics/blender/patches/patch-source_blender_blenlib_BLI__alloca.h (limited to 'graphics') diff --git a/graphics/blender/Makefile b/graphics/blender/Makefile index ee9d99b4cd7..19f6b2391ba 100644 --- a/graphics/blender/Makefile +++ b/graphics/blender/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.127 2017/02/06 01:29:10 markd Exp $ +# $NetBSD: Makefile,v 1.128 2017/02/09 00:23:29 joerg Exp $ DISTNAME= blender-2.77a PKGREVISION= 4 @@ -36,6 +36,7 @@ CXXFLAGS+= -std=c++11 CMAKE_OPTS+= -DCMAKE_CXX_FLAGS:STRING=${CXXFLAGS:Q} PYTHON_VERSIONS_INCOMPATIBLE= 27 +CMAKE_OPTS+= -DPYTHON_VERSION=${PYVERSSUFFIX:Q} GCC_REQD+= 4.7 DEPENDS+= ${PYPKGPREFIX}-expat>=0:../../textproc/py-expat diff --git a/graphics/blender/distinfo b/graphics/blender/distinfo index 9c12bd76de8..710767b2331 100644 --- a/graphics/blender/distinfo +++ b/graphics/blender/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.48 2016/08/15 19:26:18 ryoon Exp $ +$NetBSD: distinfo,v 1.49 2017/02/09 00:23:29 joerg Exp $ SHA1 (blender-2.77a.tar.gz) = 935793b3e9fd4d02c71f275aac3aca27cd58bdfb RMD160 (blender-2.77a.tar.gz) = 7d99f064b5a6055aaf549ddb30c49e73f081f002 @@ -12,4 +12,5 @@ SHA1 (patch-extern_glog_src_utilities.h) = c78ef191ab6ec7e65837b88468a7e1b8eaf32 SHA1 (patch-extern_rangetree_range__tree.hh) = 976881b9caad67a2cfb24039652e887867fa6cc0 SHA1 (patch-intern_cycles_util_util__types.h) = 37944c6b0a970468e6791ec4a5beef1ec0ddf190 SHA1 (patch-intern_guardedalloc_intern_mallocn__intern.h) = c7bc89af1c03b50ae0bd8af5aacc25cd82dfcbfc +SHA1 (patch-source_blender_blenlib_BLI__alloca.h) = 95ef3250aaf8b3701c56254d9a8ca2752c1bb715 SHA1 (patch-source_blender_imbuf_intern_dds_DirectDrawSurface.cpp) = b38f61900aa30b02479c7397062d71d295932847 diff --git a/graphics/blender/patches/patch-source_blender_blenlib_BLI__alloca.h b/graphics/blender/patches/patch-source_blender_blenlib_BLI__alloca.h new file mode 100644 index 00000000000..6cd54bbe31d --- /dev/null +++ b/graphics/blender/patches/patch-source_blender_blenlib_BLI__alloca.h @@ -0,0 +1,16 @@ +$NetBSD: patch-source_blender_blenlib_BLI__alloca.h,v 1.1 2017/02/09 00:23:29 joerg Exp $ + +Ensure that alloca is always using the builtin. On NetBSD, it is not +provided in standard-only mode. + +--- source/blender/blenlib/BLI_alloca.h.orig 2017-01-08 18:11:56.918657083 +0000 ++++ source/blender/blenlib/BLI_alloca.h +@@ -34,6 +34,8 @@ + #endif + + #if defined(__GNUC__) || defined(__clang__) ++#undef alloca ++#define alloca(n) __builtin_alloca(n) + #if defined(__cplusplus) && (__cplusplus > 199711L) + #define BLI_array_alloca(arr, realsize) \ + (decltype(arr))alloca(sizeof(*arr) * (realsize)) -- cgit v1.2.3