summaryrefslogtreecommitdiff
path: root/graphics/appleseed/Makefile
blob: 58bcd4e696644e7a9ed18f07309ef040c45aa86d (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
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
# $FreeBSD$

PORTNAME=	appleseed
DISTVERSION=	1.7.1-beta
PORTREVISION=	5
CATEGORIES=	graphics

MAINTAINER=	danfe@FreeBSD.org
COMMENT=	Modern, physically-based production renderer

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

BROKEN=		fails to build

LIB_DEPENDS=	libboost_thread.so:devel/boost-libs \
		libpng.so:graphics/png \
		libIlmImf.so:graphics/openexr \
		libxerces-c.so:textproc/xerces-c3 \
		liboslexec.so:graphics/openshadinglanguage

USE_GITHUB=	yes
GH_ACCOUNT=	${PORTNAME}hq

ONLY_FOR_ARCHS=	i386 amd64
ONLY_FOR_ARCHS_REASON=	not ported to it yet

USES=		cmake compiler:env

LDFLAGS+=	-lboost_atomic
CMAKE_ARGS=	-DUSE_STATIC_BOOST:BOOL=OFF -DUSE_STATIC_OIIO:BOOL=OFF \
		-DUSE_STATIC_OSL:BOOL=OFF -DWITH_DOXYGEN:BOOL=OFF \
		-DWITH_HEADERS:BOOL=OFF -DWITH_PYTHON:BOOL=OFF \
		-DWITH_TESTS:BOOL=OFF -DWARNINGS_AS_ERRORS:BOOL=OFF

.for lib in EXR OIIO OSL PNG SEEXPR XERCES ZLIB
CMAKE_ARGS+=	-DUSE_EXTERNAL_${lib}:BOOL=ON
.endfor

# Not ready for hier(7)-conforming installation yet
CMAKE_INSTALL_PREFIX=	${PREFIX}/${PKGBASE}
PLIST_SUB=	APPHOME=${CMAKE_INSTALL_PREFIX}

SUB_FILES=	pkg-message
SUB_LIST:=	${PLIST_SUB}

OPTIONS_DEFINE=	CPP11 EXAMPLES DISNEY STUDIO
OPTIONS_DEFAULT=	DISNEY STUDIO
OPTIONS_SUB=	yes

CPP11_DESC=	Build in C++11 mode
DISNEY_DESC=	Disney material support
STUDIO_DESC=	Build appleseed.studio (Qt-based GUI program)

CPP11_CMAKE_ON=	-DUSE_CPP11:BOOL=ON

EXAMPLES_CMAKE_OFF=	-DWITH_SAMPLES:BOOL=OFF

DISNEY_LIB_DEPENDS=	libSeExpr.so:graphics/seexpr
DISNEY_CMAKE_ON=	-DWITH_DISNEY_MATERIAL:BOOL=ON

STUDIO_USES=	qt:4
STUDIO_USE=	QT=moc_build,qmake_build,rcc_build,uic_build,opengl
STUDIO_CMAKE_OFF=	-DWITH_STUDIO:BOOL=OFF

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MSTUDIO}
DEPRECATED=		Qt4 has been EOL since december 2015
EXPIRATION_DATE=	2019-03-15
.endif

.include <bsd.port.pre.mk>

post-patch:
	@${RMDIR} ${WRKSRC}/sandbox/docs/api
.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 39
	@${ECHO_MSG} "===>  Patching for Core Working Group (CWG) Defect 253 (see r455830)"
	@${REINPLACE_CMD} -E 's,const (.*MDF ),\1,' \
		${WRKSRC}/src/appleseed/renderer/modeling/bsdf/disneybrdf.cpp \
		${WRKSRC}/src/appleseed/renderer/modeling/bsdf/microfacetbrdf.cpp \
		${WRKSRC}/src/appleseed/foundation/meta/tests/test_microfacet.cpp
.endif

.include <bsd.port.post.mk>