summaryrefslogtreecommitdiff
path: root/graphics/blender/Makefile
blob: 409b68703c137db9d978d2000f290ef4ee3d84d8 (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
# $NetBSD: Makefile,v 1.111 2014/11/07 19:39:34 adam Exp $

DISTNAME=	blender-2.71
PKGREVISION=	4
CATEGORIES=	graphics
MASTER_SITES=	http://download.blender.org/source/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.blender.org/
COMMENT=	Fully integrated 3D graphics creation suite
LICENSE=	gnu-gpl-v2

#WRKSRC=		${WRKDIR}/blender-2.71

USE_TOOLS+=		gmake sed
USE_LANGUAGES=		c c++

PYTHON_VERSIONS_ACCEPTED=	34 33

BUILD_DEPENDS+=		scons-[0-9]*:../../devel/scons

FIND_PREFIX:=		SCONSDIR=scons
.include "../../mk/find-prefix.mk"

.include "options.mk"

INSTALLATION_DIRS=	bin share/blender

.if ${OPSYS} == "NetBSD" && exists(/usr/include/execinfo.h)
PYLDFLAGS+=		'-lexecinfo',
.endif
PYLDFLAGS+=		'${COMPILER_RPATH_FLAG}${PREFIX}/lib', \
			'${COMPILER_RPATH_FLAG}${X11BASE}/lib'

# To pass LDFLAGS to compiler/linker
SUBST_CLASSES+=		ldflags
SUBST_STAGE.ldflags=	pre-configure
SUBST_MESSAGE.ldflags=	Setting LDFLAGS
SUBST_FILES.ldflags+=	build_files/scons/config/*-config.py
SUBST_VARS.ldflags+=	PYLDFLAGS

SCONS_ARGS+=	WITH_BF_JACK=False
SCONS_ARGS+=	WITH_BF_OPENAL=False
SCONS_ARGS+=	WITH_BF_SNDFILE=False
SCONS_ARGS+=	WITH_BF_FFMPEG=False
SCONS_ARGS+=	WITH_BF_3DMOUSE=False

SCONS_ARGS+=	BF_PYTHON=${PREFIX}
#SCONS_ARGS+=	BF_PYTHON_INC=${PREFIX}/include/python${PYVERSSUFFIX}
SCONS_ARGS+=	BF_PYTHON_ABI_FLAGS=''
SCONS_ARGS+=	BF_PYTHON_VERSION=${PYVERSSUFFIX}
SCONS_ARGS+=	BF_SDL=${BUILDLINK_PREFIX.SDL}
SCONS_ARGS+=	BF_OPENEXR=${BUILDLINK_PREFIX.openexr}
SCONS_ARGS+=	BF_JPEG=${BUILDLINK_PREFIX.jpeg}
SCONS_ARGS+=	BF_PNG=${BUILDLINK_PREFIX.png}
SCONS_ARGS+=	BF_TIFF=${BUILDLINK_PREFIX.tiff}
SCONS_ARGS+=	BF_GETTEXT=${BUILDLINK_PREFIX.gettext-tools}
SCONS_ARGS+=	BF_FREETYPE=${BUILDLINK_PREFIX.freetype2}
SCONS_ARGS+=	BF_OPENJPEG=${BUILDLINK_PREFIX.openjpeg15}
SCONS_ARGS+=	BF_OPENJPEG_INC=${BUILDLINK_PREFIX.openjpeg15}/include/openjpeg-1.5
SCONS_ARGS+=	BF_OPENGL=${BUILDLINK_PREFIX.Mesa}
SCONS_ARGS+=	BF_PCRE=${BUILDLINK_PREFIX.pcre}
#SCONS_ARGS+=	BF_FFMPEG=${BUILDLINK_PREFIX.ffmpeg010}
#SCONS_ARGS+=	BF_FFMPEG_INC=${BUILDLINK_PREFIX.ffmpeg010}/include/ffmpeg010
#SCONS_ARGS+=	BF_FFMPEG_LIBPATH='${BUILDLINK_PREFIX.ffmpeg010}/lib/ffmpeg010'
SCONS_ARGS+=	BF_FFTW3=${BUILDLINK_PREFIX.fftw}
SCONS_ARGS+=	BF_INSTALLDIR=${DESTDIR}${PREFIX}/share/blender

PLIST_SUBST+=	PYVERSSUFFIX=${PYVERSSUFFIX}

# I cannot separate build and install...
do-build:

# build is done in install phase.
do-install:
	cd ${WRKSRC:Q} && ${PKGSRC_SETENV} ${MAKE_ENV}			\
		${SCONSDIR}/bin/scons ${SCONS_ARGS} ${_MAKE_JOBS}

CHECK_INTERPRETER_SKIP=	share/blender/${DISTNAME:S/blender-//:C/[a-z]//}/scripts/*.py share/blender/${DISTNAME:S/blender-//:C/[a-z]//}datafiles/*.py \
			share/blender/${DISTNAME:S/blender-//:C/[a-z]//}/python/lib/python3.3/venv/scripts/posix/pydoc

REPLACE_PYTHON+=	release/bin/blender-thumbnailer.py
REPLACE_PYTHON+=	intern/cycles/kernel/SConscript

post-install:
	${LN} -sf ${PREFIX}/share/blender/blender \
		${DESTDIR}${PREFIX}/bin

.include "../../devel/SDL/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
.include "../../devel/gettext-tools/buildlink3.mk"
.include "../../devel/libexecinfo/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../graphics/Mesa/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
#.include "../../graphics/glew/buildlink3.mk"
.include "../../graphics/openexr/buildlink3.mk"
.include "../../graphics/openimageio/buildlink3.mk"
.include "../../graphics/openjpeg15/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"
.include "../../math/fftw/buildlink3.mk"
#.include "../../multimedia/ffmpeg010/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"

.include "../../lang/python/application.mk"

.include "../../mk/bsd.pkg.mk"