aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/appleseed/Makefile
blob: 4f01dc367f3254ee21ca49e15ed2faf6d65db5a6 (plain) (blame)
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
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
# $FreeBSD$

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

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

LICENSE=    MIT

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:outsource 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_USE= QT4=moc_build,qmake_build,rcc_build,uic_build,opengl
STUDIO_CMAKE_OFF=   -DWITH_STUDIO: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>