components/openexr/Makefile
changeset 7964 d9801318ed3d
parent 7697 8a41b565423d
equal deleted inserted replaced
7963:18067c41cdb2 7964:d9801318ed3d
    21 
    21 
    22 #
    22 #
    23 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
    23 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
    24 #
    24 #
    25 BUILD_BITS= 64_and_32
    25 BUILD_BITS= 64_and_32
       
    26 COMPILER= gcc
    26 include ../../make-rules/shared-macros.mk
    27 include ../../make-rules/shared-macros.mk
    27 
    28 
    28 COMPONENT_NAME=         openexr
    29 COMPONENT_NAME=         openexr
    29 COMPONENT_VERSION=      2.2.0
    30 COMPONENT_VERSION=      2.2.0
    30 COMPONENT_PROJECT_URL=  http://www.openexr.com/
    31 COMPONENT_PROJECT_URL=  http://www.openexr.com/
    41 PATCH_LEVEL = 0
    42 PATCH_LEVEL = 0
    42 
    43 
    43 # there seems to be no other way to enable large files support
    44 # there seems to be no other way to enable large files support
    44 CXXFLAGS += $(CPP_LARGEFILES)
    45 CXXFLAGS += $(CPP_LARGEFILES)
    45 
    46 
       
    47 # All C++ code should be built with -std=c++11 from now on.
       
    48 CXXFLAGS += -std=c++11
       
    49 
       
    50 # Needed to get the tests to work correctly. For more information see:
       
    51 # https://github.com/openexr/openexr/issues/67
       
    52 #CXXFLAGS += -ffloat-store
       
    53 
    46 # it seems that --with-pic doesn't get PIC flags to the C++ compiler
    54 # it seems that --with-pic doesn't get PIC flags to the C++ compiler
    47 CXXFLAGS += $(CC_PIC)
    55 CXXFLAGS += $(CC_PIC)
    48 CXXFLAGS += -template=extdef
       
    49 CXXFLAGS += -std=sun03
       
    50 
    56 
    51 # libtools seems to be forcing -nolibs, so we have to add back libc, libm,
    57 # START: remove this section (and the depend.mk file) when build servers are
    52 # libCstd and libCrun. The last two are needed because with Studio 12.2
    58 # installed with the new ilmbase.
    53 # (and beyond), there is a bug in the CC driver that is not correctly using
    59 ILMBASE_PROTO =		$(WS_COMPONENTS)/ilmbase/build/prototype/$(MACH)
    54 # the '-library=Cstd,Crun' we are passing to it.
    60 ILMBASE_LIBDIR.32 =	$(ILMBASE_PROTO)$(USRLIBDIR)
    55 LIBS += -lc -lm -lCstd -lCrun
    61 ILMBASE_LIBDIR.64 =	$(ILMBASE_PROTO)$(USRLIBDIR64)
       
    62 ILMBASE_LIBDIR =	$(ILMBASE_LIBDIR.$(BITS))
       
    63 CONFIGURE_ENV +=	LD_LIBRARY_PATH=$(ILMBASE_LIBDIR)
       
    64 CONFIGURE_ENV +=	LDFLAGS="$(LDFLAGS) -L$(ILMBASE_LIBDIR)"
       
    65 CONFIGURE_OPTIONS +=	--with-ilmbase-prefix=$(ILMBASE_PROTO)$(USRDIR)
       
    66 
       
    67 # Remove ilmbase .la files to allow openexr libtool usage to work correctly.
       
    68 COMPONENT_PRE_CONFIGURE_ACTION = \
       
    69 	(cd $(ILMBASE_PROTO) ; \
       
    70         mlist=`/usr/bin/find . -name '*.la'` ; \
       
    71         for f in $$mlist ; do \
       
    72                 $(RM) $$f ; \
       
    73         done)
       
    74 
       
    75 # Needed to successfully run various binaries (such as b44ExpLogTable) during
       
    76 # the build process.
       
    77 COMPONENT_BUILD_ENV +=	LD_LIBRARY_PATH=$(ILMBASE_LIBDIR)
       
    78 
       
    79 # Needed to successfully run the various test programs.
       
    80 COMPONENT_TEST_ENV +=	LD_LIBRARY_PATH=$(ILMBASE_LIBDIR)
       
    81 
       
    82 # END: remove this section (and the depend.mk file) when build servers are
       
    83 # installed with the new ilmbase.
    56 
    84 
    57 COMPONENT_TEST_TRANSFORMS += \
    85 COMPONENT_TEST_TRANSFORMS += \
    58      '-e "s^-L$(CONFIGURE_LIBDIR.$(BITS))^^g"' \
    86      '-e "s^-L$(CONFIGURE_LIBDIR.$(BITS))^^g"' \
    59      '-e "/libtool/d"' \
    87      '-e "/libtool/d"' \
    60      '-e "/-m32/d"' \
    88      '-e "/-m32/d"' \
    61      '-e "/-m64/d"' \
    89      '-e "/-m64/d"' \
    62      '-e "/Nothing to be done/d"' \
    90      '-e "/Nothing to be done/d"' \
    63      '-e "/Leaving directory/d"' \
    91      '-e "/Leaving directory/d"' \
    64      '-e "/Entering directory/d"' \
    92      '-e "/Entering directory/d"' \
       
    93      '-e "/mv -f /d"' \
    65      '-e "/mkdir .libs/d"' \
    94      '-e "/mkdir .libs/d"' \
    66      '-e "/is up to date/d"' \
    95      '-e "/is up to date/d"' \
    67      '-e "/creating IlmImfTest/d"' \
    96      '-e "/creating IlmImfTest/d"' \
    68      '-e "/DEPDIR=/d"' \
    97      '-e "/DEPDIR=/d"' \
    69      '-e "/\/var\/tmp/d"' \
    98      '-e "/\/var\/tmp/d"' \
    70      '-e "/Generating headers and data/d"'
    99      '-e "/Generating headers and data/d"'
    71 
       
    72 CONFIGURE_ENV += LIBS="$(LIBS)"
       
    73 
   100 
    74 CONFIGURE_OPTIONS  +=           --disable-static
   101 CONFIGURE_OPTIONS  +=           --disable-static
    75 CONFIGURE_OPTIONS  +=           --enable-threading
   102 CONFIGURE_OPTIONS  +=           --enable-threading
    76 CONFIGURE_OPTIONS  +=           --enable-posix-sem
   103 CONFIGURE_OPTIONS  +=           --enable-posix-sem
    77 CONFIGURE_OPTIONS  +=           --with-pic
   104 CONFIGURE_OPTIONS  +=           --with-pic
    89 	( cd $(PROTOPKGCONFIGDIR.$(BITS)) ; \
   116 	( cd $(PROTOPKGCONFIGDIR.$(BITS)) ; \
    90 	$(GSED) -i "s^-L$(CONFIGURE_LIBDIR.$(BITS))^^g" OpenEXR.pc )
   117 	$(GSED) -i "s^-L$(CONFIGURE_LIBDIR.$(BITS))^^g" OpenEXR.pc )
    91 
   118 
    92 REQUIRED_PACKAGES += library/ilmbase
   119 REQUIRED_PACKAGES += library/ilmbase
    93 REQUIRED_PACKAGES += library/zlib
   120 REQUIRED_PACKAGES += library/zlib
    94 REQUIRED_PACKAGES += system/library/c++-runtime
   121 REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
       
   122 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
    95 REQUIRED_PACKAGES += system/library/math
   123 REQUIRED_PACKAGES += system/library/math