aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--graphics/OpenEXR/Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/graphics/OpenEXR/Makefile b/graphics/OpenEXR/Makefile
index c04d5f0f9233..2c169e8177b5 100644
--- a/graphics/OpenEXR/Makefile
+++ b/graphics/OpenEXR/Makefile
@@ -17,7 +17,7 @@ LIB_DEPENDS= libImath.so:${PORTSDIR}/graphics/ilmbase
WRKSRC= ${WRKDIR}/${DISTNAME}
-USES= gmake libtool:keepla pathfix pkgconfig
+USES= compiler:features gmake libtool:keepla pathfix pkgconfig
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--disable-ilmbasetest --enable-imfexamples
USE_LDCONFIG= yes
@@ -59,6 +59,18 @@ post-patch:
-e 's|$$(EXTRA_DIST)||' \
${WRKSRC}/doc/Makefile.am ${WRKSRC}/doc/Makefile.in
+# too many reports about compileration failures, so sanity check C++
+# library
+_ilm_libcxx=${COMPILER_FEATURES:Mlib*c++}
+pre-configure:
+ @${OBJDUMP} -j .dynstr -p ${LOCALBASE}/lib/libImath.so \
+ | ${EGREP} -q '^[[:space:]]*NEEDED[[:space:]]+${_ilm_libcxx:C/\+/\\+/g}\.' \
+ || { ${ECHO_CMD} "*** Your ilmbase package uses a non-default C++ standard library. ***" ; \
+ ${ECHO_CMD} "*** Please recompile and reinstall ilmbase with the default ***" ; \
+ ${ECHO_CMD} "*** C++ compiler before trying to build OpenEXR. Aborting. ***" ; \
+ exit 1; }
+
+
.if ! ${PORT_OPTIONS:MEXAMPLES}
EXTRA_PATCHES+=${FILESDIR}/extra-patch-IlmImfExamples__Makefile.in
.endif