blob: 2178a514ae45d020cefeac3541069850e3a0a56c (
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
76
77
78
79
80
81
|
PORTNAME= openexr
PORTVERSION= 3.1.5
CATEGORIES= graphics devel
MAINTAINER= mandree@FreeBSD.org
COMMENT= High dynamic-range (HDR) image file format
WWW= https://www.openexr.com/
LICENSE= BSD3CLAUSE
# exact version required to avoid hard-to-debug issues
LIB_DEPENDS= libImath-3_1.so.29:math/Imath
USES= cmake compiler:c++14-lang cpe pathfix pkgconfig
USE_GITHUB= yes
GH_TUPLE= AcademySoftwareFoundation:openexr:v${PORTVERSION}
USE_LDCONFIG= yes
CMAKE_ARGS+= -DCMAKE_DEBUG_POSTFIX=
CPPFLAGS+= -I.
# must be linked with -l{thr|pthread} explicitly
LDFLAGS+= -lpthread
PATCH_STRIP= -p0
_MAJORVER= 3_1
_VER= 30
_MINVER= 5
_PLVER= 1
PLIST_SUB+= MAJORVER=${_MAJORVER} \
VER=${_VER} \
MINVER=${_MINVER} \
PLVER=${_PLVER}
PORTDOCS= *
PORTEXAMPLES= *
OPTIONS_DEFINE= DOCS EXAMPLES
OPTIONS_SUB= yes
DOCS_BUILD_DEPENDS=breathe-apidoc:devel/py-breathe
DOCS_CMAKE_BOOL=DOCS
_DOCSRCDIR1= ${WRKSRC}
_DOC_FILES1= CHANGES.md CONTRIBUTING.md GOVERNANCE.md LICENSE.md SECURITY.md \
CODE_OF_CONDUCT.md CONTRIBUTORS.md README.md
# too many reports about compilation failures, so
# sanity check we are using the same C++ standard library
_imath_libcxx= ${COMPILER_FEATURES:Mlib*c++}
pre-configure:
@${READELF} -d ${LOCALBASE}/lib/libImath.so \
| ${EGREP} -q '\<NEEDED\>.*\[${_imath_libcxx:C/\+/\\+/g}\.' \
|| { ${ECHO_CMD} "*** Your Imath package uses a different C++ standard library than ***" ; \
${ECHO_CMD} "*** OpenEXR would. Please recompile and reinstall Imath with the ***" ; \
${ECHO_CMD} "*** same C++ std. library before trying to build OpenEXR. Abort. ***" ; \
exit 1; }
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${_DOC_FILES1:S|^|${_DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
( cd ${BUILD_WRKSRC}/docs/sphinx && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} )
${RM} -r ${STAGEDIR}${DOCSDIR}/.??* ${STAGEDIR}${DOCSDIR}/../OpenEXR/sphinx
post-install-DOCS-off:
@${RMDIR} ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME} 2>/dev/null || :
post-install-EXAMPLES-on:
${MV} \
${STAGEDIR}${PREFIX}/share/doc/OpenEXR/examples/ ${STAGEDIR}${EXAMPLESDIR}
@${RMDIR} ${STAGEDIR}${PREFIX}/share/doc/OpenEXR 2>/dev/null || :
post-install-EXAMPLES-off:
${RM} -R ${STAGEDIR}${PREFIX}/share/doc/OpenEXR/examples/
@${RMDIR} ${STAGEDIR}${PREFIX}/share/doc/OpenEXR 2>/dev/null || :
do-test:
cd ${BUILD_WRKSRC} && ctest -j ${MAKE_JOBS_NUMBER}
.include <bsd.port.mk>
|