Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Feb 2013 21:19:39 +0000 (UTC)
From:      Marcus von Appen <mva@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r311647 - in head/graphics/blender: . files
Message-ID:  <201302042119.r14LJd1J092548@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mva
Date: Mon Feb  4 21:19:38 2013
New Revision: 311647
URL: http://svnweb.freebsd.org/changeset/ports/311647

Log:
  - Add a RAYOPTIMIZATION option for the ray optimization code to allow
    i386 systems without SSE2 to build blender properly
  - Add CYCLESOSL option to add support for cycles render shaders
  - Clean up some PLIST_SUB leftovers
  
  PR:		ports/175490
  Submitted by:	chris@imagemetrica.com

Added:
  head/graphics/blender/files/patch-intern_cycles_render_osl.cpp   (contents, props changed)
Modified:
  head/graphics/blender/Makefile

Modified: head/graphics/blender/Makefile
==============================================================================
--- head/graphics/blender/Makefile	Mon Feb  4 21:15:31 2013	(r311646)
+++ head/graphics/blender/Makefile	Mon Feb  4 21:19:38 2013	(r311647)
@@ -3,7 +3,7 @@
 
 PORTNAME=	blender
 PORTVERSION=	2.65a
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	graphics games
 MASTER_SITES=	http://download.blender.org/source/ \
 		http://mirror.cs.umn.edu/blender.org/source/ \
@@ -36,21 +36,22 @@ OUTDIR=		${INSTALL_WRKSRC}/bin/2.65
 LANG=	ar cs de eo es es_ES fa fr he hr hu id it ja ky nl pt pt_BR ru \
 	sr sr@latin sv tr uk zh_CN zh_TW
 
-OPTIONS_DEFINE=	BOOLEAN BULLET CINEON CAMERATRACK CYCLES DDS FFMPEG FFTW3 \
-		GAMEENGINE HDR HEADLESS JACK NLS MENU OCEANSIM OPENAL \
-		OPENCOLORIO OPENEXR OPENJPEG OPENMP PLAYER REDCODE SAMPLERATE \
-		SDL SNDFILE TIFF XINPUT XF86VMODE
-OPTIONS_DEFAULT=	BOOLEAN BULLET CINEON CYCLES DDS GAMEENGINE HDR JACK \
-			OPENAL OPENCOLORIO OPENEXR OPENJPEG OPENMP PLAYER \
-			SAMPLERATE SDL TIFF XINPUT XF86VMODE
+OPTIONS_DEFINE=	BOOLEAN BULLET CINEON CAMERATRACK CYCLES CYCLESOSL DDS FFMPEG \
+		FFTW3 GAMEENGINE HDR HEADLESS JACK NLS MENU OCEANSIM OPENAL \
+		OPENCOLORIO OPENEXR OPENJPEG OPENMP PLAYER RAYOPTIMIZATION \
+		REDCODE SAMPLERATE SDL SNDFILE TIFF XINPUT XF86VMODE
+OPTIONS_DEFAULT=	BOOLEAN BULLET CINEON CYCLES CYCLESOSL DDS GAMEENGINE \
+			HDR JACK OPENAL OPENCOLORIO OPENEXR OPENJPEG OPENMP \
+			PLAYER SAMPLERATE SDL TIFF XINPUT XF86VMODE
 
 BOOLEAN_DESC=		Boolean library support
 BULLET_DESC=		Bullet physics engine
 CINEON_DESC=		CINEON and DPX graphics format support
 CAMERATRACK_DESC=	Camera tracking support
 CYCLES_DESC=		Cycles render engine support
+CYCLESOSL_DESC=		Shading support for the cycles render engine
 DDS_DESC=		DDS graphics format support
-FFTW3_DESC=		Floating point support using fftw
+FFTW3_DESC=		Use fftw for smoke and audio effects
 GAMEENGINE_DESC=	Enable the game engine
 HDR_DESC=		Generic high dynamic-range (HDR) support
 HEADLESS_DESC=		Disable user interface (for render-farms)
@@ -58,6 +59,7 @@ MENU_DESC=		Install desktop menu
 OCEANSIM_DESC=		Ocean simulation support
 OPENCOLORIO_DESC=	OpenColorIO-based color management support
 PLAYER_DESC=		Enable blender player
+RAYOPTIMIZATION_DESC=	Enable SSE optimizatons for raytracing
 REDCODE_DESC=		RedCode graphics format support
 SDL_DESC=		Audio and Joystick support using SDL
 XINPUT_DESC=		X11 Xinput (tablet) support
@@ -66,7 +68,6 @@ XF86VMODE_DESC=		X11 video mode switchin
 # TODO: provide switches for the following options
 #
 # WITH_IMAGE_FRAMESERVER WITH_LZO WITH_LZMA WITH_LIBMV WITH_INPUT_NDOF
-# WITH_RAYOPTIMIZATION WITH_CYCLES_OSL WITH_COMPOSITOR
 
 .include <bsd.port.options.mk>
 
@@ -103,10 +104,18 @@ IGNORE=	cycles render engine only works 
 .endif
 CMAKE_ARGS+=	-DWITH_CYCLES:BOOL=ON
 LIB_DEPENDS+=	OpenImageIO:${PORTSDIR}/graphics/openimageio
-PLIST_SUB+=	CYCLES=""
 .else
 CMAKE_ARGS+=	-DWITH_CYCLES:BOOL=OFF
-PLIST_SUB+=	CYCLES="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MCYCLESOSL}
+.if !${PORT_OPTIONS:MCYCLES}
+IGNORE=	support for the OpenShadingLanguage in cycles obviously requires CYCLES
+.endif
+CMAKE_ARGS+=	-DWITH_CYCLES_OSL:BOOL=ON
+LIB_DEPENDS+=	oslexec:${PORTSDIR}/graphics/openshadinglanguage
+.else
+CMAKE_ARGS+=	-DWITH_CYCLES_OSL:BOOL=OFF
 .endif
 
 .if ${PORT_OPTIONS:MDDS}
@@ -156,18 +165,13 @@ CMAKE_ARGS+=	-DWITH_JACK:BOOL=OFF
 
 .if ${PORT_OPTIONS:MMENU}
 USE_GNOME=	desktopfileutils
-PLIST_SUB+=	MENU=""
-.else
-PLIST_SUB+=	MENU="@comment "
 .endif
 
 .if ${PORT_OPTIONS:MNLS}
 USE_GETTEXT=	yes
 USE_ICONV=	yes
-PLIST_SUB+=	NLS=""
 CMAKE_ARGS+=	-DWITH_INTERNATIONAL:BOOL=ON
 .else
-PLIST_SUB+=	NLS="@comment "
 CMAKE_ARGS+=	-DWITH_INTERNATIONAL:BOOL=OFF
 .endif
 
@@ -221,16 +225,20 @@ CMAKE_ARGS+=	-DWITH_OPENMP:BOOL=OFF
 
 .if ${PORT_OPTIONS:MPLAYER}
 .if ${PORT_OPTIONS:MGAMEENGINE}
-PLIST_SUB+=	PLAYER=""
 CMAKE_ARGS+=	-DWITH_PLAYER:BOOL=ON
 .else
 BROKEN=		PLAYER requires GAMEENGINE
 .endif
 .else
-PLIST_SUB+=	PLAYER="@comment "
 CMAKE_ARGS+=	-DWITH_PLAYER:BOOL=OFF
 .endif
 
+.if ${PORT_OPTIONS:MRAYOPTIMIZATION}
+CMAKE_ARGS+=	-DWITH_RAYOPTIMIZATION:BOOL=ON
+.else
+CMAKE_ARGS+=	-DWITH_RAYOPTIMIZATION:BOOL=OFF
+.endif
+
 .if ${PORT_OPTIONS:MREDCODE}
 .if ${PORT_OPTIONS:MOPENJPEG} && ${PORT_OPTIONS:MFFMPEG}
 CMAKE_ARGS+=	-DWITH_IMAGE_REDCODE:BOOL=ON

Added: head/graphics/blender/files/patch-intern_cycles_render_osl.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/blender/files/patch-intern_cycles_render_osl.cpp	Mon Feb  4 21:19:38 2013	(r311647)
@@ -0,0 +1,11 @@
+--- intern/cycles/render/osl.cpp.orig	2013-02-02 23:31:36.000000000 +0100
++++ intern/cycles/render/osl.cpp	2013-02-02 23:31:56.000000000 +0100
+@@ -277,7 +277,7 @@
+ 
+ const char *OSLShaderManager::shader_load_bytecode(const string& hash, const string& bytecode)
+ {
+-	ss->LoadMemoryShader(hash.c_str(), bytecode.c_str());
++	ss->LoadMemoryCompiledShader(hash.c_str(), bytecode.c_str());
+ 
+ 	/* this is a bit weak, but works */
+ 	OSLShaderInfo info;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302042119.r14LJd1J092548>