blob: 91f1a5b4a1438bf5136194f71c84fb23a290afc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
# Created by: Jimmy Olgeni <olgeni@uli.it>
# $FreeBSD$
PORTNAME= blender
PORTVERSION= 2.76b
PORTREVISION= 1
CATEGORIES= graphics games
MASTER_SITES= http://download.blender.org/source/ \
http://mirror.cs.umn.edu/blender.org/source/ \
http://public.planetmirror.com/pub/blender/source/
MAINTAINER= mva@FreeBSD.org
COMMENT= 3D modeling/rendering/animation/gaming package
LICENSE= GPLv2
LIB_DEPENDS= libpng.so:graphics/png \
libfreetype.so:print/freetype2
USE_XORG= x11 xext xmu
USE_GL= glew
USES= cmake:outsource compiler:features desktop-file-utils \
jpeg python:3.4 shebangfix
INSTALLS_ICONS= yes
CMAKE_ARGS= -DWITH_PYTHON_INSTALL:BOOL=OFF \
-DWITH_PYTHON_INSTALL_NUMPY:BOOL=OFF \
-DWITH_INSTALL_PORTABLE:BOOL=FALSE
SHEBANG_FILES= release/bin/blender-thumbnailer.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
BL_VERSION= 2.76
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
OUTDIR= ${INSTALL_WRKSRC}/bin/${BL_VERSION}
PLIST_SUB+= VER=${BL_VERSION}
OPTIONS_SUB= yes
.include "${.CURDIR}/Makefile.options"
MOD_BOOLEAN_CMAKE_ON= -DWITH_MOD_BOOLEAN:BOOL=ON
MOD_BOOLEAN_CMAKE_OFF= -DWITH_MOD_BOOLEAN:BOOL=OFF
MOD_BOOLEAN_LIB_DEPENDS= libboost_thread.so:devel/boost-libs
MOD_FLUID_CMAKE_ON= -DWITH_MOD_FLUID:BOOL=ON
MOD_FLUID_CMAKE_OFF= -DWITH_MOD_FLUID:BOOL=OFF
MOD_REMESH_CMAKE_ON= -DWITH_MOD_REMESH:BOOL=ON
MOD_REMESH_CMAKE_OFF= -DWITH_MOD_REMESH:BOOL=OFF
MOD_SMOKE_CMAKE_ON= -DWITH_MOD_SMOKE:BOOL=ON
MOD_SMOKE_CMAKE_OFF= -DWITH_MOD_SMOKE:BOOL=OFF
AVI_CMAKE_ON= -DWITH_CODEC_AVI:BOOL=ON
AVI_CMAKE_OFF= -DWITH_CODEC_AVI:BOOL=OFF
BULLET_CMAKE_ON= -DWITH_BULLET:BOOL=ON
BULLET_CMAKE_OFF= -DWITH_BULLET:BOOL=OFF
CINEON_CMAKE_ON= -DWITH_IMAGE_CINEON:BOOL=ON
CINEON_CMAKE_OFF= -DWITH_IMAGE_CINEON:BOOL=OFF
CYCLES_CMAKE_ON= -DWITH_CYCLES:BOOL=ON
CYCLES_CMAKE_OFF= -DWITH_CYCLES:BOOL=OFF
CAMERATRACK_CMAKE_ON= -DWITH_LIBMV:BOOL=ON
CAMERATRACK_CMAKE_OFF= -DWITH_LIBMV:BOOL=OFF
CAMERATRACK_LIB_DEPENDS= libunwind.so:devel/libunwind
COLLADA_CMAKE_ON= -DWITH_OPENCOLLADA:BOOL=ON
COLLADA_CMAKE_OFF= -DWITH_OPENCOLLADA:BOOL=OFF
COLLADA_LIB_DEPENDS= libOpenCOLLADABaseUtils.so:graphics/opencollada
COMPOSITOR_CMAKE_ON= -DWITH_COMPOSITOR:BOOL=ON
COMPOSITOR_CMAKE_OFF= -DWITH_COMPOSITOR:BOOL=OFF
DDS_CMAKE_ON= -DWITH_IMAGE_DDS:BOOL=ON
DDS_CMAKE_OFF= -DWITH_IMAGE_DDS:BOOL=OFF
FFMPEG_CMAKE_ON= -DWITH_CODEC_FFMPEG:BOOL=ON
FFMPEG_CMAKE_OFF= -DWITH_CODEC_FFMPEG:BOOL=OFF
FFMPEG_LIB_DEPENDS= libavutil.so:multimedia/ffmpeg
FFTW3_CMAKE_ON= -DWITH_FFTW3:BOOL=ON
FFTW3_CMAKE_OFF= -DWITH_FFTW3:BOOL=OFF
FFTW3_LIB_DEPENDS= libfftw3.so:math/fftw3
FRAMESERVER_CMAKE_ON= -DWITH_IMAGE_FRAMESERVER:BOOL=ON
FRAMESERVER_CMAKE_OFF= -DWITH_IMAGE_FRAMESERVER:BOOL=OFF
FREESTYLE_CMAKE_ON= -DWITH_FREESTYLE:BOOL=ON
FREESTYLE_CMAKE_OFF= -DWITH_FREESTYLE:BOOL=OFF
GAMEENGINE_CMAKE_ON= -DWITH_GAMEENGINE:BOOL=ON
GAMEENGINE_CMAKE_OFF= -DWITH_GAMEENGINE:BOOL=OFF
HEADLESS_CMAKE_ON= -DWITH_HEADLESS:BOOL=ON
HEADLESS_CMAKE_OFF= -DWITH_HEADLESS:BOOL=OFF
HDR_CMAKE_ON= -DWITH_IMAGE_HDR:BOOL=ON
HDR_CMAKE_OFF= -DWITH_IMAGE_HDR:BOOL=OFF
INPUT_NDOF_CMAKE_ON= -DWITH_INPUT_NDOF:BOOL=ON
INPUT_NDOF_CMAKE_OFF= -DWITH_INPUT_NDOF:BOOL=OFF
JACK_CMAKE_ON= -DWITH_JACK:BOOL=ON
JACK_CMAKE_OFF= -DWITH_JACK:BOOL=OFF
JACK_LIB_DEPENDS= libjack.so:audio/jack
LZO_CMAKE_ON= -DWITH_LZO:BOOL=ON
LZO_CMAKE_OFF= -DWITH_LZO:BOOL=OFF
LZMA_CMAKE_ON= -DWITH_LZMA:BOOL=ON
LZMA_CMAKE_OFF= -DWITH_LZMA:BOOL=OFF
LIBMV_CMAKE_ON= -DWITH_LIBMV:BOOL=ON
LIBMV_CMAKE_OFF= -DWITH_LIBMV:BOOL=OFF
MENU_USES= desktop-file-utils
MOD_OCEANSIM_CMAKE_ON= -DWITH_MOD_OCEANSIM:BOOL=ON
MOD_OCEANSIM_CMAKE_OFF= -DWITH_MOD_OCEANSIM:BOOL=OFF
NLS_CMAKE_ON= -DWITH_INTERNATIONAL:BOOL=ON
NLS_CMAKE_OFF= -DWITH_INTERNATIONAL:BOOL=OFF
# Use iconv:wchar_t to force the usage of iconv from ports.
# libboost_locale.so uses libiconv_open, while we only provide
# iconv_open in 10.x+
NLS_USES= gettext iconv:lib,wchar_t
OPENAL_CMAKE_ON= -DWITH_OPENAL:BOOL=ON
OPENAL_CMAKE_OFF= -DWITH_OPENAL:BOOL=OFF
OPENAL_USES= openal:al,alut
OPENCOLORIO_CMAKE_ON= -DWITH_OPENCOLORIO:BOOL=ON
OPENCOLORIO_CMAKE_OFF= -DWITH_OPENCOLORIO:BOOL=OFF
OPENCOLORIO_LIB_DEPENDS= libOpenColorIO.so:graphics/opencolorio
OPENEXR_CMAKE_ON= -DWITH_IMAGE_OPENEXR:BOOL=ON
OPENEXR_CMAKE_OFF= -DWITH_IMAGE_OPENEXR:BOOL=OFF
OPENEXR_LIB_DEPENDS= libIlmImf.so:graphics/OpenEXR
OPENIMAGEIO_CMAKE_ON= -DWITH_OPENIMAGEIO:BOOL=ON
OPENIMAGEIO_CMAKE_OFF= -DWITH_OPENIMAGEIO:BOOL=OFF
OPENIMAGEIO_LIB_DEPENDS= libOpenImageIO.so:graphics/openimageio
OPENJPEG_CMAKE_ON= -DWITH_SYSTEM_OPENJPEG:BOOL=ON \
-DWITH_IMAGE_OPENJPEG:BOOL=ON
OPENJPEG_CMAKE_OFF= -DWITH_IMAGE_OPENJPEG:BOOL=OFF
OPENJPEG_LIB_DEPENDS= libopenjpeg.so:graphics/openjpeg15
# Only works, if everything else is compiled with the same compiler
# OPENMP_CMAKE_ON= -DWITH_OPENMP:BOOL=ON
# OPENMP_CMAKE_OFF= -DWITH_OPENMP:BOOL=OFF
# OPENMP_USES= compiler:openmp
# OPENMP_USES_OFF= compiler:features
OPENSUBDIV_CMAKE_ON= -DWITH_OPENSUBDIV:BOOL=ON
OPENSUBDIV_CMAKE_OFF= -DWITH_OPENSUBDIV:BOOL=OFF
OPENSUBDIV_LIB_DEPENDS= libosdCPU.so:graphics/opensubdiv
PLAYER_CMAKE_ON= -DWITH_PLAYER:BOOL=ON
PLAYER_CMAKE_OFF= -DWITH_PLAYER:BOOL=OFF
RAYOPTIMIZATION_CMAKE_ON= -DWITH_RAYOPTIMIZATION:BOOL=ON
RAYOPTIMIZATION_CMAKE_OFF= -DWITH_RAYOPTIMIZATION:BOOL=OFF
REDCODE_CMAKE_ON= -DWITH_IMAGE_REDCODE:BOOL=ON
REDCODE_CMAKE_OFF= -DWITH_IMAGE_REDCODE:BOOL=OFF
SDL_CMAKE_ON= -DWITH_SDL:BOOL=ON
SDL_CMAKE_OFF= -DWITH_SDL:BOOL=OFF
SDL_USE= SDL=sdl
SNDFILE_CMAKE_ON= -DWITH_CODEC_SNDFILE:BOOL=ON
SNDFILE_CMAKE_OFF= -DWITH_CODEC_SNDFILE:BOOL=OFF
SNDFILE_LIB_DEPENDS= libsndfile.so:audio/libsndfile
TIFF_CMAKE_ON= -DWITH_IMAGE_TIFF:BOOL=ON
TIFF_CMAKE_OFF= -DWITH_IMAGE_TIFF:BOOL=OFF
TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff
XINPUT_CMAKE_ON= -DWITH_X11_XINPUT:BOOL=ON
XINPUT_CMAKE_OFF= -DWITH_X11_XINPUT:BOOL=OFF
XINPUT_USE= XORG=xi
XF86VMODE_CMAKE_ON= -DWITH_X11_XF86VMODE:BOOL=ON
XF86VMODE_CMAKE_OFF= -DWITH_X11_XF86VMODE:BOOL=OFF
XF86VMODE_USE= XORG=xi,xxf86vm
.include <bsd.port.options.mk>
.if defined(WITH_DEBUG)
CMAKE_ARGS+= -DWITH_GHOST_DEBUG:BOOL=ON
.endif
.if ${PORT_OPTIONS:MMOD_OCEANSIM} && !${PORT_OPTIONS:MFFTW3}
BROKEN= MOD_OCEANSIM requires FFTW3
.endif
.if ${PORT_OPTIONS:MCYCLES} && !${PORT_OPTIONS:MOPENIMAGEIO}
BROKEN= CYCLES requires OPENIMAGEIO
.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 \
-DLLVM_STATIC:BOOL=OFF \
-DWITH_LLVM:BOOL=ON \
-DLLVM_VERSION:STRING="3.4" \
-DLLVM_CONFIG:STRING="${LOCALBASE}/bin/llvm-config34"
LIB_DEPENDS+= liboslexec.so:graphics/openshadinglanguage
BUILD_DEPENDS+= llvm-config34:devel/llvm34
.else
CMAKE_ARGS+= -DWITH_CYCLES_OSL:BOOL=OFF
.endif
.if ${PORT_OPTIONS:MHEADLESS}
.if ${PORT_OPTIONS:MXINPUT} || ${PORT_OPTIONS:MXF86VMODE}
BROKEN= HEADLESS does not require any X11 dependency
.endif
.endif
.if ${PORT_OPTIONS:MOPENIMAGEIO}
.if !${PORT_OPTIONS:MOPENEXR} || !${PORT_OPTIONS:MTIFF}
BROKEN= OPENIMAGEIO requires OPENEXR and TIFF
.endif
.endif
.if ${PORT_OPTIONS:MPLAYER} && !${PORT_OPTIONS:MGAMEENGINE}
BROKEN= PLAYER requires GAMEENGINE
.endif
.if ${PORT_OPTIONS:MREDCODE}
.if !${PORT_OPTIONS:MOPENJPEG} || !${PORT_OPTIONS:MFFMPEG}
BROKEN= REDCODE requires OPENJPEG and FFMPEG
.endif
.endif
.include <bsd.port.pre.mk>
.if ${COMPILER_TYPE} == gcc
# gcc 4.2 does not support -msse4.1, which is needed for blender 2.70+
USE_GCC= yes
.endif
post-patch:
.if ${PORT_OPTIONS:MOPENCOLORIO}
@${REINPLACE_CMD} -e 's|yaml-cpp|&03|' \
${PATCH_WRKSRC}/build_files/cmake/Modules/FindOpenColorIO.cmake
.endif
post-build:
@(cd ${WRKSRC}/doc/manpage && \
${PYTHON_CMD} blender.1.py \
${INSTALL_WRKSRC}/bin/blender \
${INSTALL_WRKSRC}/bin/${PORTNAME}.1)
post-install:
.if ${PORT_OPTIONS:MMENU}
@-update-desktop-database -q
.endif
${INSTALL_MAN} ${INSTALL_WRKSRC}/bin/${PORTNAME}.1 \
${STAGEDIR}${MAN1PREFIX}/man/man1
.include <bsd.port.post.mk>
|