components/openexr/Makefile
changeset 3758 cc71a31c59be
parent 2225 f064d3d3190d
child 3817 30b42c38bbc4
--- a/components/openexr/Makefile	Wed Jan 21 04:13:34 2015 -0800
+++ b/components/openexr/Makefile	Tue Feb 10 11:59:45 2015 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 include ../../make-rules/shared-macros.mk
 
@@ -42,14 +42,23 @@
 
 # there seems to be no other way to enable large files support
 CXXFLAGS += $(CPP_LARGEFILES)
+
 # it seems that --with-pic doesn't get PIC flags to the C++ compiler
 CXXFLAGS += $(CC_PIC)
+
+ifneq (, $(findstring 12.4,$(CXX)))
+  CXXFLAGS += -template=extdef
+endif
+
 # libtools seems to be forcing -nolibs, so we have to add back libc, libm,
 # libCstd and libCrun. The last two are needed because with Studio 12.2
 # (and beyond), there is a bug in the CC driver that is not correctly using
 # the '-library=Cstd,Crun' we are passing to it.
 LIBS += -lc -lm -lCstd -lCrun
 
+COMPONENT_TEST_TRANSFORMS += \
+     '-e "s^-L$(CONFIGURE_LIBDIR.$(BITS))^^g"'
+
 CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
 CONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
 CONFIGURE_ENV += LIBS="$(LIBS)"
@@ -60,6 +69,13 @@
 CONFIGURE_OPTIONS  +=           --enable-posix-sem
 CONFIGURE_OPTIONS  +=           --with-pic
 
+PROTOPKGCONFIGDIR.32 = $(PROTOUSRLIBDIR)/pkgconfig
+PROTOPKGCONFIGDIR.64 = $(PROTOUSRLIBDIR64)/pkgconfig
+
+COMPONENT_POST_INSTALL_ACTION = \
+	( cd $(PROTOPKGCONFIGDIR.$(BITS)) ; \
+	$(GSED) -i "s^-L$(CONFIGURE_LIBDIR.$(BITS))^^g" OpenEXR.pc )
+
 ASLR_MODE = $(ASLR_ENABLE)
 
 configure:	$(CONFIGURE_32_and_64)