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

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

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

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

BROKEN=		fails to build
DEPRECATED=	Broken for more than 6 months
EXPIRATION_DATE=	2019-05-08

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
OPTIONS_SUB=	yes

CPP11_DESC=	Build in C++11 mode

CPP11_CMAKE_ON=	-DUSE_CPP11:BOOL=ON

EXAMPLES_CMAKE_OFF=	-DWITH_SAMPLES:BOOL=OFF

.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>