1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-18 03:46:03 +00:00
freebsd-ports/graphics/OpenEXR/Makefile
Matthias Andree 1fb0ae7cf9 Security update OpenEXR and ilmbase to 2.2.1.
While here, fix libIlmImfUtil_la_LDFLAGp so that when linking libIlmImfUtil,
the locally built libIlmImf gets precedence over the one in /usr/local,
to permit upgrades in a running system with the older version installed.

This changes the library's SONAME, so bump PORTREVISION of all dependees.

Unfortunately, this looks a bit too intrusive for an MFH to 2017Q4.

Security:	CVE-2017-9110
Security:	CVE-2017-9111
Security:	CVE-2017-9112
Security:	CVE-2017-9113
Security:	CVE-2017-9114
Security:	CVE-2017-9115
Security:	CVE-2017-9116
Security:	803879e9-4195-11e7-9b08-080027ef73ec
2017-12-01 01:58:23 +00:00

94 lines
2.6 KiB
Makefile

# Created by: nork@FreeBSD.org
# $FreeBSD$
PORTNAME= OpenEXR
PORTVERSION= 2.2.1
PORTREVISION= 0
CATEGORIES= graphics devel
MASTER_SITES= SAVANNAH/openexr/:dist \
LOCAL/mandree/:test
DISTNAME= openexr-${DISTVERSION}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:dist \
openexr-2.2.0-comp_dwa-test-images.tar.xz:test
MAINTAINER= mandree@FreeBSD.org
COMMENT= High dynamic-range (HDR) image file format
LICENSE= BSD3CLAUSE
# exact version required to avoid hard-to-debug issues
LIB_DEPENDS= libImath-2_2.so.23:graphics/ilmbase
WRKSRC= ${WRKDIR}/${DISTNAME}
USES= compiler:features gmake libtool pathfix pkgconfig
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-ilmbasetest --enable-imfexamples
USE_LDCONFIG= yes
TEST_TARGET= check
CPPFLAGS+= -I. -I../IlmImf
# must be linked with -l{thr|pthread} explicitly
LDFLAGS+= -lpthread
PORTDOCS= *
PORTEXAMPLES= *
DOCSRCDIR1= ${WRKSRC}
DOC_FILES1= AUTHORS ChangeLog NEWS README
DOCSRCDIR2= ${WRKSRC}/doc
DOCSDIR2= ${DOCSDIR}/doc
DOC_FILES2= *.pdf
OPTIONS_DEFINE= DOCS EXAMPLES LARGE_STACK
LARGE_STACK_DESC= Enable sys-dependant large stack optimizations
OPTIONS_SUB= yes
LARGE_STACK_CONFIGURE_ENABLE= large-stack
.include <bsd.port.pre.mk>
.if ${ARCH} == powerpc
USE_GCC= yes
.endif
MAJORVER= 2_2
VER= 23
PLIST_SUB= MAJORVER=${MAJORVER}
PLIST_SUB+= VER=${VER}
post-patch:
@${REINPLACE_CMD} -e 's|== x|= x|g' ${WRKSRC}/configure
@${REINPLACE_CMD} \
-e 's|$$(datadir)/doc/OpenEXR-@OPENEXR_VERSION@/examples|$$(prefix)/share/examples/${PORTNAME}|' \
${WRKSRC}/IlmImfExamples/Makefile.in
@${REINPLACE_CMD} -e 's|$$(datadir)/doc/OpenEXR-@OPENEXR_VERSION@||' \
-e 's|$$(EXTRA_DIST)||' \
${WRKSRC}/doc/Makefile.am ${WRKSRC}/doc/Makefile.in
# too many reports about compilation failures, so sanity check C++
# library
_ilm_libcxx=${COMPILER_FEATURES:Mlib*c++}
pre-configure:
@${READELF} -d ${LOCALBASE}/lib/libImath.so \
| ${EGREP} -q '\<NEEDED\>.*\[${_ilm_libcxx:C/\+/\\+/g}\.' \
|| { ${ECHO_CMD} "*** Your ilmbase package uses a different C++ standard library than ***" ; \
${ECHO_CMD} "*** OpenEXR would. Please recompile and reinstall ilmbase with the ***" ; \
${ECHO_CMD} "*** same C++ std. library before trying to build OpenEXR. Abort. ***" ; \
exit 1; }
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libIlmImf-${MAJORVER}.so.${VER} \
${STAGEDIR}${PREFIX}/lib/libIlmImfUtil-${MAJORVER}.so.${VER}
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR2}
${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${STAGEDIR}${DOCSDIR2}
.include <bsd.port.post.mk>