summaryrefslogtreecommitdiff
path: root/graphics/blender/Makefile
blob: 7fe0a2ad97c8b93926c8aa83dd2b8577815ff20e (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
# $NetBSD: Makefile,v 1.59 2008/01/04 19:56:45 markd Exp $

DISTNAME=	blender-2.45
CATEGORIES=	graphics
MASTER_SITES=	ftp://ftp.cs.umn.edu/pub/blender.org/source/ \
		http://download.blender.org/source/

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

USE_TOOLS+=		gmake
USE_LANGUAGES=		c c++
USE_CMAKE=		yes
CMAKE_ARG_PATH=		..
CONFIGURE_DIRS=		_build
PKG_DESTDIR_SUPPORT=	user-destdir

LDFLAGS+=		-lcrypto

.include "options.mk"

INSTALLATION_DIRS=	bin

CMAKE_ARGS+=	-DFREETYPE_INC=${BUILDLINK_PREFIX.freetype2}/include/freetype2
CMAKE_ARGS+=	-DSDL_INCLUDE_DIR=${BUILDLINK_PREFIX.SDL}/include/SDL

CHECK_INTERPRETER_SKIP= share/blender/scripts/*.py share/blender/scripts/*/*.py

pre-configure:
	${MKDIR} ${WRKSRC}/_build

WRKSRCBIN=	${WRKSRC}/_build/bin

post-build:
	${CP} -f ${WRKSRCBIN}/blender ${WRKSRCBIN}/blender-bin
	${SED} -e "s|__PREFIX__|${PREFIX}|g" files/blender > ${WRKSRCBIN}/blender
	${CHMOD} +x ${WRKSRCBIN}/blender
	${CHMOD} -x ${WRKSRCBIN}/.blender/scripts/*.py
	${CHMOD} -x ${WRKSRCBIN}/.blender/scripts/*/*.py

do-install:
	${INSTALL_PROGRAM} ${WRKSRCBIN}/blender-bin ${DESTDIR}${PREFIX}/bin
	${INSTALL_SCRIPT} ${WRKSRCBIN}/blender ${DESTDIR}${PREFIX}/bin
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/blender
	${CP} -R ${WRKSRCBIN}/.blender/scripts \
		${DESTDIR}${PREFIX}/share/blender/
	${CP} -R ${WRKSRCBIN}/.blender/locale \
		${DESTDIR}${PREFIX}/share/blender/
	${INSTALL_DATA} ${WRKSRCBIN}/.blender/.Blanguages \
		${DESTDIR}${PREFIX}/share/blender
	${INSTALL_DATA} ${WRKSRCBIN}/.blender/.bfont.ttf \
		${DESTDIR}${PREFIX}/share/blender
	${INSTALL_DATA} ${WRKSRCBIN}/BlenderQuickStart.pdf \
		${DESTDIR}${PREFIX}/share/blender

.include "../../devel/SDL/buildlink3.mk"
.include "../../graphics/Mesa/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"

.include "../../lang/python/pyversion.mk"

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