aboutsummaryrefslogtreecommitdiff
path: root/graphics/openexr
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2018-09-22 10:15:22 +0000
committerMatthias Andree <mandree@FreeBSD.org>2018-09-22 10:15:22 +0000
commitd1cfeab07edadd10dd4f099e9dd0c9103b3596be (patch)
tree3378240ab0ba279cc8a007880049ac1be723082d /graphics/openexr
parentaf8a39ccb6a2b032b3db242b42f46734d62da830 (diff)
downloadports-d1cfeab07edadd10dd4f099e9dd0c9103b3596be.tar.gz
ports-d1cfeab07edadd10dd4f099e9dd0c9103b3596be.zip
Update ilmbase and openexr to 2.3.0, rename OpenEXR to openexr.
Release notes: <https://github.com/openexr/openexr/releases/tag/v2.3.0> Adjust LIB_DEPENDS of all ports that require ilmbase or openexr to chase the new lower-case spelling of the name, and to omit the version from the library name to ease future maintenance. Bump PORTREVISION of all ports that depend on ilmbase or openexr directly, so that they all get rebuilt on upgrades. Add patches to graphics/ampasCTL to keep it alive, with (a) ilmbase now that its Iex::BaseExc class is no longer derived from std::string, details were given upstream through https://github.com/ampas/CTL/issues/71 and (b) to unwind semicolon/;-lists in cmake that stem from openexr/ ilmbase pkg-config variables. (Note ampasCTL is unmaintained as FreeBSD port, and upstream, and I cannot run-time test it.) Poudriere build tests on 11.2-RELEASE-p1 amd64 of ALL ports depending directly or indirectly on ilmbase and/or openexr have passed without regressions. Thus invoking due diligence, I believe I have done the equivalent of an -exp run, and do not require approval for the dependency chases to third-party ports.
Notes
Notes: svn path=/head/; revision=480374
Diffstat (limited to 'graphics/openexr')
-rw-r--r--graphics/openexr/Makefile100
-rw-r--r--graphics/openexr/distinfo5
-rw-r--r--graphics/openexr/files/patch-IlmImfTest__main.cpp11
-rw-r--r--graphics/openexr/files/patch-IlmImfTest_testOptimizedInterleavePatterns.cpp22
-rw-r--r--graphics/openexr/files/patch-IlmImfUtilTest_main.cpp11
-rw-r--r--graphics/openexr/files/patch-IlmImf__ImfSystemSpecific.cpp29
-rw-r--r--graphics/openexr/files/patch-exrenvmap__main.cpp10
-rw-r--r--graphics/openexr/files/patch-exrmaketiled__main.cpp10
-rw-r--r--graphics/openexr/pkg-descr24
-rw-r--r--graphics/openexr/pkg-plist105
10 files changed, 327 insertions, 0 deletions
diff --git a/graphics/openexr/Makefile b/graphics/openexr/Makefile
new file mode 100644
index 000000000000..8bedc98be780
--- /dev/null
+++ b/graphics/openexr/Makefile
@@ -0,0 +1,100 @@
+# Created by: nork@FreeBSD.org
+# $FreeBSD$
+
+PORTNAME= openexr
+PORTVERSION= 2.3.0
+CATEGORIES= graphics devel
+MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/v${PORTVERSION}/:dist \
+ LOCAL/mandree/:test
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:dist \
+ ${PORTNAME}-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_3.so.24:graphics/ilmbase
+
+WRKSRC= ${WRKDIR}/${DISTNAME}
+
+USES= compiler:c++14-lang 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.md
+
+DOCSRCDIR2= ${WRKSRC}/doc
+DOC_FILES2= *.pdf
+
+OPTIONS_DEFINE= DOCS EXAMPLES LARGE_STACK
+LARGE_STACK_DESC= Enable sys-dependent 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_3
+VER= 24
+
+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-EXAMPLES-on:
+ ${MV} \
+ ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME}/examples/ ${STAGEDIR}${EXAMPLESDIR}
+ @${RMDIR} ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME} 2>/dev/null || :
+
+post-install-EXAMPLES-off:
+ ${RM} -R ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME}/examples/
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${STAGEDIR}${DOCSDIR}
+
+post-install-DOCS-off:
+ @${RMDIR} ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME} 2>/dev/null || :
+.include <bsd.port.post.mk>
diff --git a/graphics/openexr/distinfo b/graphics/openexr/distinfo
new file mode 100644
index 000000000000..45397e165495
--- /dev/null
+++ b/graphics/openexr/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1536500711
+SHA256 (openexr-2.3.0.tar.gz) = fd6cb3a87f8c1a233be17b94c74799e6241d50fc5efd4df75c7a4b9cf4e25ea6
+SIZE (openexr-2.3.0.tar.gz) = 18412067
+SHA256 (openexr-2.2.0-comp_dwa-test-images.tar.xz) = bbb8ff547e9b68f0dfb1e8804a7ad984978c2b15897988399cc68176e99dd63a
+SIZE (openexr-2.2.0-comp_dwa-test-images.tar.xz) = 653768
diff --git a/graphics/openexr/files/patch-IlmImfTest__main.cpp b/graphics/openexr/files/patch-IlmImfTest__main.cpp
new file mode 100644
index 000000000000..b22b303fa5d4
--- /dev/null
+++ b/graphics/openexr/files/patch-IlmImfTest__main.cpp
@@ -0,0 +1,11 @@
+--- IlmImfTest/main.cpp.orig 2014-08-10 04:23:59 UTC
++++ IlmImfTest/main.cpp
+@@ -100,7 +100,7 @@
+ #include <string.h>
+ #include <time.h>
+
+-#if defined(OPENEXR_IMF_HAVE_LINUX_PROCFS) || defined(OPENEXR_IMF_HAVE_DARWIN)
++#if defined(OPENEXR_IMF_HAVE_LINUX_PROCFS) || defined(OPENEXR_IMF_HAVE_DARWIN) || defined(__FreeBSD__)
+ #include <unistd.h>
+ #include <sstream>
+ #endif
diff --git a/graphics/openexr/files/patch-IlmImfTest_testOptimizedInterleavePatterns.cpp b/graphics/openexr/files/patch-IlmImfTest_testOptimizedInterleavePatterns.cpp
new file mode 100644
index 000000000000..63cd46ad9297
--- /dev/null
+++ b/graphics/openexr/files/patch-IlmImfTest_testOptimizedInterleavePatterns.cpp
@@ -0,0 +1,22 @@
+--- IlmImfTest/testOptimizedInterleavePatterns.cpp.orig 2014-08-10 02:03:49 UTC
++++ IlmImfTest/testOptimizedInterleavePatterns.cpp
+@@ -226,7 +226,8 @@ bool compare(const FrameBuffer& asRead,
+ writtenHalf=half(i.slice().fillValue);
+ }
+
+- if (writtenHalf.bits()!=readHalf.bits())
++ if (writtenHalf.bits()!=readHalf.bits() &&
++ !(writtenHalf.isNan() && readHalf.isNan()))
+ {
+ if (nonfatal)
+ {
+@@ -235,7 +236,8 @@ bool compare(const FrameBuffer& asRead,
+ else
+ {
+ cout << "\n\nerror reading back channel " << i.name() << " pixel " << x << ',' << y << " got " << readHalf << " expected " << writtenHalf << endl;
+- assert(writtenHalf.bits()==readHalf.bits());
++ assert(writtenHalf.bits()==readHalf.bits() ||
++ (writtenHalf.isNan() && readHalf.isNan()));
+ exit(1);
+ }
+ }
diff --git a/graphics/openexr/files/patch-IlmImfUtilTest_main.cpp b/graphics/openexr/files/patch-IlmImfUtilTest_main.cpp
new file mode 100644
index 000000000000..1b3147705c70
--- /dev/null
+++ b/graphics/openexr/files/patch-IlmImfUtilTest_main.cpp
@@ -0,0 +1,11 @@
+--- IlmImfUtilTest/main.cpp.orig 2014-08-10 04:24:00 UTC
++++ IlmImfUtilTest/main.cpp
+@@ -46,7 +46,7 @@
+ #include <cstring>
+ #include <time.h>
+
+-#if defined(OPENEXR_IMF_HAVE_LINUX_PROCFS) || defined(OPENEXR_IMF_HAVE_DARWIN)
++#if defined(OPENEXR_IMF_HAVE_LINUX_PROCFS) || defined(OPENEXR_IMF_HAVE_DARWIN) || defined(__FreeBSD__)
+ #include <unistd.h>
+ #endif
+
diff --git a/graphics/openexr/files/patch-IlmImf__ImfSystemSpecific.cpp b/graphics/openexr/files/patch-IlmImf__ImfSystemSpecific.cpp
new file mode 100644
index 000000000000..74e5054a3175
--- /dev/null
+++ b/graphics/openexr/files/patch-IlmImf__ImfSystemSpecific.cpp
@@ -0,0 +1,29 @@
+--- IlmImf/ImfSystemSpecific.cpp.orig 2017-11-17 23:00:24 UTC
++++ IlmImf/ImfSystemSpecific.cpp
+@@ -44,11 +44,23 @@ namespace {
+ // Helper functions for gcc + SSE enabled
+ void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx)
+ {
++#if __i386__
+ __asm__ __volatile__ (
+- "cpuid"
+- : /* Output */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx)
+- : /* Input */ "a"(n)
++ "xchgl %%ebx,%k1\n"
++ "cpuid\n"
++ "xchgl %%ebx,%k1" \
++ : /* Output */ "=a"(eax), "=&r"(ebx), "=c"(ecx), "=d"(edx)
++ : /* Input */ "0"(n)
+ : /* Clobber */);
++#else
++ __asm__ __volatile__ (
++ "xchgq %%rbx,%q1\n"
++ "cpuid\n"
++ "xchgq %%rbx,%q1" \
++ : /* Output */ "=a"(eax), "=&r"(ebx), "=c"(ecx), "=d"(edx)
++ : /* Input */ "0"(n)
++ : /* Clobber */);
++#endif
+ }
+
+ #else // IMF_HAVE_SSE2 && __GNUC__
diff --git a/graphics/openexr/files/patch-exrenvmap__main.cpp b/graphics/openexr/files/patch-exrenvmap__main.cpp
new file mode 100644
index 000000000000..77cab6dfc684
--- /dev/null
+++ b/graphics/openexr/files/patch-exrenvmap__main.cpp
@@ -0,0 +1,10 @@
+--- exrenvmap/main.cpp.orig 2014-08-10 04:24:00 UTC
++++ exrenvmap/main.cpp
+@@ -47,6 +47,7 @@
+ #include <ImfHeader.h>
+
+ #include <iostream>
++#include <cstring>
+ #include <exception>
+ #include <string>
+ #include <string.h>
diff --git a/graphics/openexr/files/patch-exrmaketiled__main.cpp b/graphics/openexr/files/patch-exrmaketiled__main.cpp
new file mode 100644
index 000000000000..7b83c1a5a5a1
--- /dev/null
+++ b/graphics/openexr/files/patch-exrmaketiled__main.cpp
@@ -0,0 +1,10 @@
+--- exrmaketiled/main.cpp.orig 2014-08-10 04:24:00 UTC
++++ exrmaketiled/main.cpp
+@@ -43,6 +43,7 @@
+ #include "makeTiled.h"
+
+ #include <iostream>
++#include <cstring>
+ #include <exception>
+ #include <string>
+ #include <string.h>
diff --git a/graphics/openexr/pkg-descr b/graphics/openexr/pkg-descr
new file mode 100644
index 000000000000..15159b668a58
--- /dev/null
+++ b/graphics/openexr/pkg-descr
@@ -0,0 +1,24 @@
+OpenEXR is a high dynamic-range (HDR) image file format developed by
+Industrial Light & Magic for use in computer imaging applications.
+
+OpenEXR is used by ILM on all motion pictures currently in production.
+The first movies to employ OpenEXR were Harry Potter and the Sorcerers Stone,
+Men in Black II, Gangs of New York, and Signs. Since then, OpenEXR has become
+ILM's main image file format.
+
+OpenEXR's features include:
+* Higher dynamic range and color precision than existing 8- and 10-bit
+ image file formats.
+* Support for 16-bit floating-point, 32-bit floating-point, and 32-bit
+ integer pixels. The 16-bit floating-point format, called "half", is compatible
+ with the half data type in NVIDIA's Cg graphics language and is supported
+ natively on their new GeForce FX and Quadro FX 3D graphics solutions.
+* Multiple lossless image compression algorithms. Some of the included codecs
+ can achieve 2:1 lossless compression ratios on images with film grain.
+* Extensibility. New compression codecs and image types can easily be added
+ by extending the C++ classes included in the OpenEXR software distribution.
+ New image attributes (strings, vectors, integers, etc.) can be added to
+ OpenEXR image headers without affecting backward compatibility with existing
+ OpenEXR applications.
+
+WWW: http://www.openexr.org/
diff --git a/graphics/openexr/pkg-plist b/graphics/openexr/pkg-plist
new file mode 100644
index 000000000000..6e803923d848
--- /dev/null
+++ b/graphics/openexr/pkg-plist
@@ -0,0 +1,105 @@
+bin/exrenvmap
+bin/exrheader
+bin/exrmakepreview
+bin/exrmaketiled
+bin/exrmultipart
+bin/exrmultiview
+bin/exrstdattr
+include/OpenEXR/ImfAcesFile.h
+include/OpenEXR/ImfArray.h
+include/OpenEXR/ImfAttribute.h
+include/OpenEXR/ImfB44Compressor.h
+include/OpenEXR/ImfBoxAttribute.h
+include/OpenEXR/ImfCRgbaFile.h
+include/OpenEXR/ImfChannelList.h
+include/OpenEXR/ImfChannelListAttribute.h
+include/OpenEXR/ImfChromaticities.h
+include/OpenEXR/ImfChromaticitiesAttribute.h
+include/OpenEXR/ImfCompositeDeepScanLine.h
+include/OpenEXR/ImfCompression.h
+include/OpenEXR/ImfCompressionAttribute.h
+include/OpenEXR/ImfConvert.h
+include/OpenEXR/ImfDeepCompositing.h
+include/OpenEXR/ImfDeepFrameBuffer.h
+include/OpenEXR/ImfDeepImageState.h
+include/OpenEXR/ImfDeepImageStateAttribute.h
+include/OpenEXR/ImfDeepScanLineInputFile.h
+include/OpenEXR/ImfDeepScanLineInputPart.h
+include/OpenEXR/ImfDeepScanLineOutputFile.h
+include/OpenEXR/ImfDeepScanLineOutputPart.h
+include/OpenEXR/ImfDeepTiledInputFile.h
+include/OpenEXR/ImfDeepTiledInputPart.h
+include/OpenEXR/ImfDeepTiledOutputFile.h
+include/OpenEXR/ImfDeepTiledOutputPart.h
+include/OpenEXR/ImfDoubleAttribute.h
+include/OpenEXR/ImfEnvmap.h
+include/OpenEXR/ImfEnvmapAttribute.h
+include/OpenEXR/ImfExport.h
+include/OpenEXR/ImfFloatAttribute.h
+include/OpenEXR/ImfForward.h
+include/OpenEXR/ImfFrameBuffer.h
+include/OpenEXR/ImfFramesPerSecond.h
+include/OpenEXR/ImfGenericInputFile.h
+include/OpenEXR/ImfGenericOutputFile.h
+include/OpenEXR/ImfHeader.h
+include/OpenEXR/ImfHuf.h
+include/OpenEXR/ImfIO.h
+include/OpenEXR/ImfInputFile.h
+include/OpenEXR/ImfInputPart.h
+include/OpenEXR/ImfInt64.h
+include/OpenEXR/ImfIntAttribute.h
+include/OpenEXR/ImfKeyCode.h
+include/OpenEXR/ImfKeyCodeAttribute.h
+include/OpenEXR/ImfLineOrder.h
+include/OpenEXR/ImfLineOrderAttribute.h
+include/OpenEXR/ImfLut.h
+include/OpenEXR/ImfMatrixAttribute.h
+include/OpenEXR/ImfMisc.h
+include/OpenEXR/ImfMultiPartInputFile.h
+include/OpenEXR/ImfMultiPartOutputFile.h
+include/OpenEXR/ImfMultiView.h
+include/OpenEXR/ImfName.h
+include/OpenEXR/ImfNamespace.h
+include/OpenEXR/ImfOpaqueAttribute.h
+include/OpenEXR/ImfOutputFile.h
+include/OpenEXR/ImfOutputPart.h
+include/OpenEXR/ImfPartHelper.h
+include/OpenEXR/ImfPartType.h
+include/OpenEXR/ImfPixelType.h
+include/OpenEXR/ImfPreviewImage.h
+include/OpenEXR/ImfPreviewImageAttribute.h
+include/OpenEXR/ImfRational.h
+include/OpenEXR/ImfRationalAttribute.h
+include/OpenEXR/ImfRgba.h
+include/OpenEXR/ImfRgbaFile.h
+include/OpenEXR/ImfRgbaYca.h
+include/OpenEXR/ImfStandardAttributes.h
+include/OpenEXR/ImfStdIO.h
+include/OpenEXR/ImfStringAttribute.h
+include/OpenEXR/ImfStringVectorAttribute.h
+include/OpenEXR/ImfTestFile.h
+include/OpenEXR/ImfThreading.h
+include/OpenEXR/ImfTileDescription.h
+include/OpenEXR/ImfTileDescriptionAttribute.h
+include/OpenEXR/ImfTiledInputFile.h
+include/OpenEXR/ImfTiledInputPart.h
+include/OpenEXR/ImfTiledOutputFile.h
+include/OpenEXR/ImfTiledOutputPart.h
+include/OpenEXR/ImfTiledRgbaFile.h
+include/OpenEXR/ImfTimeCode.h
+include/OpenEXR/ImfTimeCodeAttribute.h
+include/OpenEXR/ImfVecAttribute.h
+include/OpenEXR/ImfVersion.h
+include/OpenEXR/ImfWav.h
+include/OpenEXR/ImfXdr.h
+include/OpenEXR/OpenEXRConfig.h
+lib/libIlmImf-%%MAJORVER%%.so.%%VER%%
+lib/libIlmImf-%%MAJORVER%%.so.%%VER%%.0.0
+lib/libIlmImf.a
+lib/libIlmImf.so
+lib/libIlmImfUtil-%%MAJORVER%%.so.%%VER%%
+lib/libIlmImfUtil-%%MAJORVER%%.so.%%VER%%.0.0
+lib/libIlmImfUtil.a
+lib/libIlmImfUtil.so
+libdata/pkgconfig/OpenEXR.pc
+share/aclocal/openexr.m4