aboutsummaryrefslogtreecommitdiff
path: root/graphics/openexr
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2020-01-05 02:17:32 +0000
committerMatthias Andree <mandree@FreeBSD.org>2020-01-05 02:17:32 +0000
commit2e26d3323d12788197470dacc7187bd0ae521260 (patch)
tree269343fdae7d3d844d32dffd91353ecb698cc304 /graphics/openexr
parentc11266721adcfed6be82ec16fec43adbc2f5ffa1 (diff)
downloadports-2e26d3323d12788197470dacc7187bd0ae521260.tar.gz
ports-2e26d3323d12788197470dacc7187bd0ae521260.zip
graphics/ilmbase, graphics/openexr: upgrade to upstream v2.4.0
graphics/gstreamer1-plugins-openexr: switch from C++98 to C++11 to match new OpenEXR headers and unbreak compilation. Bump PORTREVISION of all ports depending directly on either, based on assessing INDEX-12 (bump_portrevision.pl -l (shallow) used). Release Notes: https://github.com/AcademySoftwareFoundation/openexr/releases/tag/v2.4.0 The update was deliberately deferred until after 2020Q1, and should not be MFH'd back to it.
Notes
Notes: svn path=/head/; revision=522079
Diffstat (limited to 'graphics/openexr')
-rw-r--r--graphics/openexr/Makefile58
-rw-r--r--graphics/openexr/distinfo6
-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_ImfFrameBuffer.cpp91
-rw-r--r--graphics/openexr/files/patch-IlmImf_ImfFrameBuffer.h56
-rw-r--r--graphics/openexr/files/patch-IlmImf_ImfHeader.cpp64
-rw-r--r--graphics/openexr/files/patch-IlmImf_ImfRgbaFile.h68
-rw-r--r--graphics/openexr/files/patch-IlmImf_ImfScanLineInputFile.cpp52
-rw-r--r--graphics/openexr/files/patch-IlmImf_ImfSystemSpecific.cpp29
-rw-r--r--graphics/openexr/files/patch-config_CMakeLists.txt15
-rw-r--r--graphics/openexr/files/patch-exrenvmap_main.cpp10
-rw-r--r--graphics/openexr/files/patch-exrenvmap_readInputImage.cpp11
-rw-r--r--graphics/openexr/files/patch-exrmakepreview_makePreview.cpp11
-rw-r--r--graphics/openexr/files/patch-exrmaketiled_Image.h20
-rw-r--r--graphics/openexr/files/patch-exrmaketiled_main.cpp10
-rw-r--r--graphics/openexr/files/patch-exrmultiview_Image.h45
-rw-r--r--graphics/openexr/pkg-plist26
19 files changed, 69 insertions, 547 deletions
diff --git a/graphics/openexr/Makefile b/graphics/openexr/Makefile
index 42d3728413d1..8dd18401c7bc 100644
--- a/graphics/openexr/Makefile
+++ b/graphics/openexr/Makefile
@@ -2,13 +2,10 @@
# $FreeBSD$
PORTNAME= openexr
-PORTVERSION= 2.3.0
-PORTREVISION= 3
+PORTVERSION= 2.4.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
+MASTER_SITES= LOCAL/mandree/:test
+DISTFILES= ${PORTNAME}-2.2.0-comp_dwa-test-images.tar.xz:test
MAINTAINER= mandree@FreeBSD.org
COMMENT= High dynamic-range (HDR) image file format
@@ -16,16 +13,15 @@ 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
+LIB_DEPENDS= libImath-2_4.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
+USES= cmake compiler:c++14-lang libtool pathfix pkgconfig
USE_LDCONFIG= yes
TEST_TARGET= check
+USE_GITHUB= yes
+GH_TUPLE= AcademySoftwareFoundation:openexr:v2.4.0
+
CPPFLAGS+= -I. -I../IlmImf
# must be linked with -l{thr|pthread} explicitly
LDFLAGS+= -lpthread
@@ -33,15 +29,18 @@ LDFLAGS+= -lpthread
PORTDOCS= *
PORTEXAMPLES= *
-DOCSRCDIR1= ${WRKSRC}
-DOC_FILES1= AUTHORS ChangeLog NEWS README.md
+DOCSRCDIR1= ${WRKSRC}/..
+DOC_FILES1= CHANGES.md CONTRIBUTING.md GOVERNANCE.md LICENSE.md SECURITY.md \
+ CODE_OF_CONDUCT.md CONTRIBUTORS.md README.md
DOCSRCDIR2= ${WRKSRC}/doc
-DOC_FILES2= *.pdf
+DOC_FILES2= *.odt *.pdf
OPTIONS_DEFINE= DOCS EXAMPLES LARGE_STACK
LARGE_STACK_DESC= Enable sys-dependent large stack optimizations
+WRKSRC_SUBDIR= OpenEXR
+
OPTIONS_SUB= yes
LARGE_STACK_CONFIGURE_ENABLE= large-stack
@@ -52,23 +51,14 @@ LARGE_STACK_CONFIGURE_ENABLE= large-stack
USE_GCC= yes
.endif
-MAJORVER= 2_3
+MAJORVER= 2_4
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
+# too many reports about compilation failures, so
+# sanity check we are using the same C++ standard library
_ilm_libcxx=${COMPILER_FEATURES:Mlib*c++}
pre-configure:
@${READELF} -d ${LOCALBASE}/lib/libImath.so \
@@ -82,20 +72,28 @@ post-install:
${STRIP_CMD} \
${STAGEDIR}${PREFIX}/lib/libIlmImf-${MAJORVER}.so.${VER} \
${STAGEDIR}${PREFIX}/lib/libIlmImfUtil-${MAJORVER}.so.${VER}
+.for i in libIlmImf libIlmImfUtil
+ ${LN} -s ${i}-${MAJORVER}.so.${VER} ${STAGEDIR}${PREFIX}/lib/${i}.so
+.endfor
post-install-EXAMPLES-on:
${MV} \
- ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME}/examples/ ${STAGEDIR}${EXAMPLESDIR}
- @${RMDIR} ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME} 2>/dev/null || :
+ ${STAGEDIR}${PREFIX}/share/doc/OpenEXR/examples/ ${STAGEDIR}${EXAMPLESDIR}
+ @${RMDIR} ${STAGEDIR}${PREFIX}/share/doc/OpenEXR 2>/dev/null || :
post-install-EXAMPLES-off:
- ${RM} -R ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME}/examples/
+ ${RM} -R ${STAGEDIR}${PREFIX}/share/doc/OpenEXR/examples/
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${STAGEDIR}${DOCSDIR}
+ ${MV} ${STAGEDIR}${DOCSDIR}/../OpenEXR/[a-df-zA-Z]* ${STAGEDIR}${DOCSDIR}
post-install-DOCS-off:
@${RMDIR} ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME} 2>/dev/null || :
+
+regression-test check:
+ cd ${BUILD_WRKSRC} && ctest -j ${MAKE_JOBS_NUMBER}
+
.include <bsd.port.post.mk>
diff --git a/graphics/openexr/distinfo b/graphics/openexr/distinfo
index 45397e165495..b60a7cbf12dd 100644
--- a/graphics/openexr/distinfo
+++ b/graphics/openexr/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1536500711
-SHA256 (openexr-2.3.0.tar.gz) = fd6cb3a87f8c1a233be17b94c74799e6241d50fc5efd4df75c7a4b9cf4e25ea6
-SIZE (openexr-2.3.0.tar.gz) = 18412067
+TIMESTAMP = 1577537381
SHA256 (openexr-2.2.0-comp_dwa-test-images.tar.xz) = bbb8ff547e9b68f0dfb1e8804a7ad984978c2b15897988399cc68176e99dd63a
SIZE (openexr-2.2.0-comp_dwa-test-images.tar.xz) = 653768
+SHA256 (AcademySoftwareFoundation-openexr-2.4.0-v2.4.0_GH0.tar.gz) = 4904c5ea7914a58f60a5e2fbc397be67e7a25c380d7d07c1c31a3eefff1c92f1
+SIZE (AcademySoftwareFoundation-openexr-2.4.0-v2.4.0_GH0.tar.gz) = 26806627
diff --git a/graphics/openexr/files/patch-IlmImfTest_main.cpp b/graphics/openexr/files/patch-IlmImfTest_main.cpp
deleted file mode 100644
index 65b8592f3f0a..000000000000
--- a/graphics/openexr/files/patch-IlmImfTest_main.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- IlmImfTest/main.cpp.orig 2018-08-10 01:34: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
deleted file mode 100644
index f5711dc1df46..000000000000
--- a/graphics/openexr/files/patch-IlmImfTest_testOptimizedInterleavePatterns.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
---- IlmImfTest/testOptimizedInterleavePatterns.cpp.orig 2018-08-10 01:34:59 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
deleted file mode 100644
index 0ee02fdb1aa0..000000000000
--- a/graphics/openexr/files/patch-IlmImfUtilTest_main.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- IlmImfUtilTest/main.cpp.orig 2018-08-10 01:34:59 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_ImfFrameBuffer.cpp b/graphics/openexr/files/patch-IlmImf_ImfFrameBuffer.cpp
deleted file mode 100644
index 95bfd885699a..000000000000
--- a/graphics/openexr/files/patch-IlmImf_ImfFrameBuffer.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
---- IlmImf/ImfFrameBuffer.cpp.orig 2018-08-10 01:34:58 UTC
-+++ IlmImf/ImfFrameBuffer.cpp
-@@ -74,6 +74,88 @@ Slice::Slice (PixelType t,
- // empty
- }
-
-+Slice
-+Slice::Make (
-+ PixelType type,
-+ const void* ptr,
-+ const IMATH_NAMESPACE::V2i& origin,
-+ int64_t w,
-+ int64_t h,
-+ size_t xStride,
-+ size_t yStride,
-+ int xSampling,
-+ int ySampling,
-+ double fillValue,
-+ bool xTileCoords,
-+ bool yTileCoords)
-+{
-+ char* base = reinterpret_cast<char*> (const_cast<void *> (ptr));
-+ if (xStride == 0)
-+ {
-+ switch (type)
-+ {
-+ case UINT: xStride = sizeof (uint32_t); break;
-+ case HALF: xStride = sizeof (uint16_t); break;
-+ case FLOAT: xStride = sizeof (float); break;
-+ case NUM_PIXELTYPES:
-+ THROW (IEX_NAMESPACE::ArgExc, "Invalid pixel type.");
-+ }
-+ }
-+ if (yStride == 0)
-+ yStride = static_cast<size_t> (w / xSampling) * xStride;
-+
-+ // data window is an int, so force promote to higher type to avoid
-+ // overflow for off y (degenerate size checks should be in
-+ // ImfHeader::sanityCheck, but offset can be large-ish)
-+ int64_t offx = (static_cast<int64_t> (origin.x) /
-+ static_cast<int64_t> (xSampling));
-+ offx *= static_cast<int64_t> (xStride);
-+
-+ int64_t offy = (static_cast<int64_t> (origin.y) /
-+ static_cast<int64_t> (ySampling));
-+ offy *= static_cast<int64_t> (yStride);
-+
-+ return Slice (
-+ type,
-+ base - offx - offy,
-+ xStride,
-+ yStride,
-+ xSampling,
-+ ySampling,
-+ fillValue,
-+ xTileCoords,
-+ yTileCoords);
-+}
-+
-+Slice
-+Slice::Make (
-+ PixelType type,
-+ const void* ptr,
-+ const IMATH_NAMESPACE::Box2i& dataWindow,
-+ size_t xStride,
-+ size_t yStride,
-+ int xSampling,
-+ int ySampling,
-+ double fillValue,
-+ bool xTileCoords,
-+ bool yTileCoords)
-+{
-+ return Make (
-+ type,
-+ ptr,
-+ dataWindow.min,
-+ static_cast<int64_t> (dataWindow.max.x) -
-+ static_cast<int64_t> (dataWindow.min.x) + 1,
-+ static_cast<int64_t> (dataWindow.max.y) -
-+ static_cast<int64_t> (dataWindow.min.y) + 1,
-+ xStride,
-+ yStride,
-+ xSampling,
-+ ySampling,
-+ fillValue,
-+ xTileCoords,
-+ yTileCoords);
-+}
-
- void
- FrameBuffer::insert (const char name[], const Slice &slice)
diff --git a/graphics/openexr/files/patch-IlmImf_ImfFrameBuffer.h b/graphics/openexr/files/patch-IlmImf_ImfFrameBuffer.h
deleted file mode 100644
index 0a7e9264464a..000000000000
--- a/graphics/openexr/files/patch-IlmImf_ImfFrameBuffer.h
+++ /dev/null
@@ -1,56 +0,0 @@
---- IlmImf/ImfFrameBuffer.h.orig 2018-08-10 01:34:58 UTC
-+++ IlmImf/ImfFrameBuffer.h
-@@ -48,14 +48,15 @@
- #include "ImfPixelType.h"
- #include "ImfExport.h"
- #include "ImfNamespace.h"
-+#include "ImathBox.h"
-
- #include <map>
- #include <string>
-+#include <cstdint>
-
-
- OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
-
--
- //-------------------------------------------------------
- // Description of a single slice of the frame buffer:
- //
-@@ -148,6 +149,36 @@ struct Slice
- double fillValue = 0.0,
- bool xTileCoords = false,
- bool yTileCoords = false);
-+
-+ // Does the heavy lifting of computing the base pointer for a slice,
-+ // avoiding overflow issues with large origin offsets
-+ //
-+ // if xStride == 0, assumes sizeof(pixeltype)
-+ // if yStride == 0, assumes xStride * ( w / xSampling )
-+ static Slice Make(PixelType type,
-+ const void *ptr,
-+ const IMATH_NAMESPACE::V2i &origin,
-+ int64_t w,
-+ int64_t h,
-+ size_t xStride = 0,
-+ size_t yStride = 0,
-+ int xSampling = 1,
-+ int ySampling = 1,
-+ double fillValue = 0.0,
-+ bool xTileCoords = false,
-+ bool yTileCoords = false);
-+ // same as above, just computes w and h for you
-+ // from a data window
-+ static Slice Make(PixelType type,
-+ const void *ptr,
-+ const IMATH_NAMESPACE::Box2i &dataWindow,
-+ size_t xStride = 0,
-+ size_t yStride = 0,
-+ int xSampling = 1,
-+ int ySampling = 1,
-+ double fillValue = 0.0,
-+ bool xTileCoords = false,
-+ bool yTileCoords = false);
- };
-
-
diff --git a/graphics/openexr/files/patch-IlmImf_ImfHeader.cpp b/graphics/openexr/files/patch-IlmImf_ImfHeader.cpp
deleted file mode 100644
index f93473fc7ae4..000000000000
--- a/graphics/openexr/files/patch-IlmImf_ImfHeader.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
---- IlmImf/ImfHeader.cpp.orig 2018-08-10 01:34:58 UTC
-+++ IlmImf/ImfHeader.cpp
-@@ -785,30 +785,46 @@ Header::sanityCheck (bool isTiled, bool isMultipartFil
- throw IEX_NAMESPACE::ArgExc ("Invalid data window in image header.");
- }
-
-- if (maxImageWidth > 0 &&
-- maxImageWidth < (dataWindow.max.x - dataWindow.min.x + 1))
-+ int w = (dataWindow.max.x - dataWindow.min.x + 1);
-+ if (maxImageWidth > 0 && maxImageWidth < w)
- {
- THROW (IEX_NAMESPACE::ArgExc, "The width of the data window exceeds the "
- "maximum width of " << maxImageWidth << "pixels.");
- }
-
-- if (maxImageHeight > 0 &&
-- maxImageHeight < dataWindow.max.y - dataWindow.min.y + 1)
-+ int h = (dataWindow.max.y - dataWindow.min.y + 1);
-+ if (maxImageHeight > 0 && maxImageHeight < h)
- {
-- THROW (IEX_NAMESPACE::ArgExc, "The width of the data window exceeds the "
-- "maximum width of " << maxImageHeight << "pixels.");
-+ THROW (IEX_NAMESPACE::ArgExc, "The height of the data window exceeds the "
-+ "maximum height of " << maxImageHeight << "pixels.");
- }
-
-- // chunk table must be smaller than the maximum image area
-- // (only reachable for unknown types or damaged files: will have thrown earlier
-- // for regular image types)
-- if( maxImageHeight>0 && maxImageWidth>0 &&
-- hasChunkCount() && chunkCount()>Int64(maxImageWidth)*Int64(maxImageHeight))
-- {
-- THROW (IEX_NAMESPACE::ArgExc, "chunkCount exceeds maximum area of "
-- << Int64(maxImageWidth)*Int64(maxImageHeight) << " pixels." );
-+ // make sure to avoid simple math overflow for large offsets
-+ // we know we're at a positive width because of checks above
-+ long long bigW = static_cast<long long>( w );
-+ long long absOffY = std::abs ( dataWindow.min.y );
-+ long long absOffX = std::abs ( dataWindow.min.x );
-+ long long offX = static_cast<long long>( INT_MAX ) - absOffX;
-+ long long offsetCount = absOffY * bigW;
-+ long long bytesLeftPerLine = static_cast<long long>( INT_MAX ) / bigW;
-+ if (bytesLeftPerLine < absOffY || offX < offsetCount)
-+ {
-+ THROW (IEX_NAMESPACE::ArgExc, "Data window [ (" << dataWindow.min.x
-+ << ", " << dataWindow.min.x << ") - (" << dataWindow.max.x
-+ << ", " << dataWindow.max.x
-+ << ") ] offset / size will overflow pointer calculations");
-+ }
-+
-+ // chunk table must be smaller than the maximum image area
-+ // (only reachable for unknown types or damaged files: will have thrown earlier
-+ // for regular image types)
-+ if( maxImageHeight>0 && maxImageWidth>0 &&
-+ hasChunkCount() && chunkCount()>Int64(maxImageWidth)*Int64(maxImageHeight))
-+ {
-+ THROW (IEX_NAMESPACE::ArgExc, "chunkCount exceeds maximum area of "
-+ << Int64(maxImageWidth)*Int64(maxImageHeight) << " pixels." );
-
-- }
-+ }
-
-
- //
diff --git a/graphics/openexr/files/patch-IlmImf_ImfRgbaFile.h b/graphics/openexr/files/patch-IlmImf_ImfRgbaFile.h
deleted file mode 100644
index 8c9469aef1f9..000000000000
--- a/graphics/openexr/files/patch-IlmImf_ImfRgbaFile.h
+++ /dev/null
@@ -1,68 +0,0 @@
---- IlmImf/ImfRgbaFile.h.orig 2018-08-10 01:34:58 UTC
-+++ IlmImf/ImfRgbaFile.h
-@@ -60,6 +60,65 @@
-
- OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
-
-+//-------------------------------------------------------
-+// Utility to compute the origin-based pointer address
-+//
-+// With large offsets for the data window, the naive code
-+// can wrap around, especially on 32-bit machines.
-+// This can be used to avoid that
-+//-------------------------------------------------------
-+
-+inline const Rgba *
-+ComputeBasePointer (
-+ const Rgba* ptr,
-+ const IMATH_NAMESPACE::V2i& origin,
-+ int64_t w,
-+ size_t xStride = 1,
-+ size_t yStride = 0)
-+{
-+ if (yStride == 0)
-+ yStride = w;
-+ int64_t offx = static_cast<int64_t> (origin.x);
-+ offx *= xStride;
-+ int64_t offy = static_cast<int64_t> (origin.y);
-+ offy *= yStride;
-+ return ptr - offx - offy;
-+}
-+
-+inline const Rgba *
-+ComputeBasePointer (const Rgba* ptr, const IMATH_NAMESPACE::Box2i& dataWindow)
-+{
-+ return ComputeBasePointer (ptr, dataWindow.min,
-+ static_cast<int64_t> (dataWindow.max.x) -
-+ static_cast<int64_t> (dataWindow.min.x) + 1);
-+}
-+
-+inline Rgba*
-+ComputeBasePointer (
-+ Rgba* ptr,
-+ const IMATH_NAMESPACE::V2i& origin,
-+ int64_t w,
-+ size_t xStride = 1,
-+ size_t yStride = 0)
-+{
-+ if (yStride == 0)
-+ yStride = w;
-+ int64_t offx = static_cast<int64_t> (origin.x);
-+ offx *= xStride;
-+ int64_t offy = static_cast<int64_t> (origin.y);
-+ offy *= yStride;
-+ return ptr - offx - offy;
-+}
-+
-+inline Rgba*
-+ComputeBasePointer (Rgba* ptr, const IMATH_NAMESPACE::Box2i& dataWindow)
-+{
-+ return ComputeBasePointer (
-+ ptr,
-+ dataWindow.min,
-+ static_cast<int64_t> (dataWindow.max.x) -
-+ static_cast<int64_t> (dataWindow.min.x) + 1);
-+}
-
- //
- // RGBA output file.
diff --git a/graphics/openexr/files/patch-IlmImf_ImfScanLineInputFile.cpp b/graphics/openexr/files/patch-IlmImf_ImfScanLineInputFile.cpp
deleted file mode 100644
index 20f30dcd6966..000000000000
--- a/graphics/openexr/files/patch-IlmImf_ImfScanLineInputFile.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
---- IlmImf/ImfScanLineInputFile.cpp.orig 2018-08-10 01:34:58 UTC
-+++ IlmImf/ImfScanLineInputFile.cpp
-@@ -524,14 +524,14 @@ LineBufferTask::execute ()
-
- if (_lineBuffer->uncompressedData == 0)
- {
-- int uncompressedSize = 0;
-+ size_t uncompressedSize = 0;
- int maxY = min (_lineBuffer->maxY, _ifd->maxY);
-
- for (int i = _lineBuffer->minY - _ifd->minY;
- i <= maxY - _ifd->minY;
- ++i)
- {
-- uncompressedSize += (int) _ifd->bytesPerLine[i];
-+ uncompressedSize += _ifd->bytesPerLine[i];
- }
-
- if (_lineBuffer->compressor &&
-@@ -628,11 +628,11 @@ LineBufferTask::execute ()
- //
-
- char *linePtr = slice.base +
-- divp (y, slice.ySampling) *
-- slice.yStride;
-+ intptr_t( divp (y, slice.ySampling) ) *
-+ intptr_t( slice.yStride );
-
-- char *writePtr = linePtr + dMinX * slice.xStride;
-- char *endPtr = linePtr + dMaxX * slice.xStride;
-+ char *writePtr = linePtr + intptr_t( dMinX ) * intptr_t( slice.xStride );
-+ char *endPtr = linePtr + intptr_t( dMaxX ) * intptr_t( slice.xStride );
-
- copyIntoFrameBuffer (readPtr, writePtr, endPtr,
- slice.xStride, slice.fill,
-@@ -838,14 +838,14 @@ LineBufferTaskIIF::execute()
-
- if (_lineBuffer->uncompressedData == 0)
- {
-- int uncompressedSize = 0;
-+ size_t uncompressedSize = 0;
- int maxY = min (_lineBuffer->maxY, _ifd->maxY);
-
- for (int i = _lineBuffer->minY - _ifd->minY;
- i <= maxY - _ifd->minY;
- ++i)
- {
-- uncompressedSize += (int) _ifd->bytesPerLine[i];
-+ uncompressedSize += _ifd->bytesPerLine[i];
- }
-
- if (_lineBuffer->compressor &&
diff --git a/graphics/openexr/files/patch-IlmImf_ImfSystemSpecific.cpp b/graphics/openexr/files/patch-IlmImf_ImfSystemSpecific.cpp
deleted file mode 100644
index fb41a812614b..000000000000
--- a/graphics/openexr/files/patch-IlmImf_ImfSystemSpecific.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
---- IlmImf/ImfSystemSpecific.cpp.orig 2018-08-10 01:34:58 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-config_CMakeLists.txt b/graphics/openexr/files/patch-config_CMakeLists.txt
new file mode 100644
index 000000000000..5d0e087d07dc
--- /dev/null
+++ b/graphics/openexr/files/patch-config_CMakeLists.txt
@@ -0,0 +1,15 @@
+--- config/CMakeLists.txt.orig 2019-12-28 20:44:23 UTC
++++ config/CMakeLists.txt
+@@ -72,9 +72,9 @@ if(OPENEXR_INSTALL_PKG_CONFIG)
+ # use a helper function to avoid variable pollution, but pretty simple
+ function(openexr_pkg_config_help pcinfile)
+ set(prefix ${CMAKE_INSTALL_PREFIX})
+- set(exec_prefix ${CMAKE_INSTALL_BINDIR})
+- set(libdir ${CMAKE_INSTALL_LIBDIR})
+- set(includedir ${CMAKE_INSTALL_INCLUDEDIR})
++ set(exec_prefix "\${prefix}")
++ set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
++ set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
+ set(LIB_SUFFIX_DASH ${OPENEXR_LIB_SUFFIX})
+ if(TARGET Threads::Threads)
+ # hrm, can't use properties as they end up as generator expressions
diff --git a/graphics/openexr/files/patch-exrenvmap_main.cpp b/graphics/openexr/files/patch-exrenvmap_main.cpp
deleted file mode 100644
index 5c6c30d4b7cb..000000000000
--- a/graphics/openexr/files/patch-exrenvmap_main.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- exrenvmap/main.cpp.orig 2018-08-10 01:35: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-exrenvmap_readInputImage.cpp b/graphics/openexr/files/patch-exrenvmap_readInputImage.cpp
deleted file mode 100644
index 4e09ed86a59b..000000000000
--- a/graphics/openexr/files/patch-exrenvmap_readInputImage.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- exrenvmap/readInputImage.cpp.orig 2018-08-10 01:35:00 UTC
-+++ exrenvmap/readInputImage.cpp
-@@ -194,7 +194,7 @@ readSixImages (const char inFileName[],
- "from the data window of other cube faces.");
- }
-
-- in.setFrameBuffer (pixels - dw.min.x - dw.min.y * w, 1, w);
-+ in.setFrameBuffer (ComputeBasePointer (pixels, dw), 1, w);
- in.readPixels (dw.min.y, dw.max.y);
-
- pixels += w * h;
diff --git a/graphics/openexr/files/patch-exrmakepreview_makePreview.cpp b/graphics/openexr/files/patch-exrmakepreview_makePreview.cpp
deleted file mode 100644
index 1654923d7465..000000000000
--- a/graphics/openexr/files/patch-exrmakepreview_makePreview.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- exrmakepreview/makePreview.cpp.orig 2018-08-10 01:35:00 UTC
-+++ exrmakepreview/makePreview.cpp
-@@ -110,7 +110,7 @@ generatePreview (const char inFileName[],
- int h = dw.max.y - dw.min.y + 1;
-
- Array2D <Rgba> pixels (h, w);
-- in.setFrameBuffer (&pixels[0][0] - dw.min.y * w - dw.min.x, 1, w);
-+ in.setFrameBuffer (ComputeBasePointer (&pixels[0][0], dw), 1, w);
- in.readPixels (dw.min.y, dw.max.y);
-
- //
diff --git a/graphics/openexr/files/patch-exrmaketiled_Image.h b/graphics/openexr/files/patch-exrmaketiled_Image.h
deleted file mode 100644
index 21aef45d0335..000000000000
--- a/graphics/openexr/files/patch-exrmaketiled_Image.h
+++ /dev/null
@@ -1,20 +0,0 @@
---- exrmaketiled/Image.h.orig 2018-08-10 01:35:00 UTC
-+++ exrmaketiled/Image.h
-@@ -190,12 +190,12 @@ OPENEXR_IMF_INTERNAL_NAMESPACE::Slice
- TypedImageChannel<T>::slice () const
- {
- const IMATH_NAMESPACE::Box2i &dw = image().dataWindow();
-- int w = dw.max.x - dw.min.x + 1;
-
-- return OPENEXR_IMF_INTERNAL_NAMESPACE::Slice (pixelType(),
-- (char *) (&_pixels[0][0] - dw.min.y * w - dw.min.x),
-- sizeof (T),
-- w * sizeof (T));
-+ return OPENEXR_IMF_INTERNAL_NAMESPACE::Slice::Make (
-+ pixelType(),
-+ &_pixels[0][0],
-+ dw,
-+ sizeof (T));
- }
-
-
diff --git a/graphics/openexr/files/patch-exrmaketiled_main.cpp b/graphics/openexr/files/patch-exrmaketiled_main.cpp
deleted file mode 100644
index 857ff8a6268d..000000000000
--- a/graphics/openexr/files/patch-exrmaketiled_main.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- exrmaketiled/main.cpp.orig 2018-08-10 01:35: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/files/patch-exrmultiview_Image.h b/graphics/openexr/files/patch-exrmultiview_Image.h
deleted file mode 100644
index 6fe137edef07..000000000000
--- a/graphics/openexr/files/patch-exrmultiview_Image.h
+++ /dev/null
@@ -1,45 +0,0 @@
---- exrmultiview/Image.h.orig 2018-08-10 01:35:00 UTC
-+++ exrmultiview/Image.h
-@@ -159,6 +159,8 @@ TypedImageChannel<T>::TypedImageChannel
- _ySampling (ySampling),
- _pixels (0, 0)
- {
-+ if ( _xSampling < 1 || _ySampling < 1 )
-+ throw IEX_NAMESPACE::ArgExc ("Invalid x/y sampling values");
- resize();
- }
-
-@@ -201,14 +203,14 @@ TypedImageChannel<T>::slice () const
- const IMATH_NAMESPACE::Box2i &dw = image().dataWindow();
- int w = dw.max.x - dw.min.x + 1;
-
-- return IMF::Slice (pixelType(),
-- (char *) (&_pixels[0][0] -
-- dw.min.y / _ySampling * (w / _xSampling) -
-- dw.min.x / _xSampling),
-- sizeof (T),
-- (w / _xSampling) * sizeof (T),
-- _xSampling,
-- _ySampling);
-+ return IMF::Slice::Make (
-+ pixelType(),
-+ &_pixels[0][0],
-+ dw,
-+ sizeof(T),
-+ (w / _xSampling) * sizeof (T),
-+ _xSampling,
-+ _ySampling);
- }
-
-
-@@ -227,7 +229,9 @@ template <class T>
- void
- TypedImageChannel<T>::black ()
- {
-- memset(&_pixels[0][0],0,image().width()/_xSampling*image().height()/_ySampling*sizeof(T));
-+ size_t nx = static_cast<size_t>( image().width() ) / static_cast<size_t>( _xSampling );
-+ size_t ny = static_cast<size_t>( image().height() ) / static_cast<size_t>( _ySampling );
-+ memset(&_pixels[0][0],0,nx*ny*sizeof(T));
- }
-
-
diff --git a/graphics/openexr/pkg-plist b/graphics/openexr/pkg-plist
index 6e803923d848..b96521dc01e2 100644
--- a/graphics/openexr/pkg-plist
+++ b/graphics/openexr/pkg-plist
@@ -1,3 +1,4 @@
+bin/exr2aces
bin/exrenvmap
bin/exrheader
bin/exrmakepreview
@@ -21,6 +22,10 @@ include/OpenEXR/ImfCompressionAttribute.h
include/OpenEXR/ImfConvert.h
include/OpenEXR/ImfDeepCompositing.h
include/OpenEXR/ImfDeepFrameBuffer.h
+include/OpenEXR/ImfDeepImage.h
+include/OpenEXR/ImfDeepImageChannel.h
+include/OpenEXR/ImfDeepImageIO.h
+include/OpenEXR/ImfDeepImageLevel.h
include/OpenEXR/ImfDeepImageState.h
include/OpenEXR/ImfDeepImageStateAttribute.h
include/OpenEXR/ImfDeepScanLineInputFile.h
@@ -35,7 +40,12 @@ include/OpenEXR/ImfDoubleAttribute.h
include/OpenEXR/ImfEnvmap.h
include/OpenEXR/ImfEnvmapAttribute.h
include/OpenEXR/ImfExport.h
+include/OpenEXR/ImfFlatImage.h
+include/OpenEXR/ImfFlatImageChannel.h
+include/OpenEXR/ImfFlatImageIO.h
+include/OpenEXR/ImfFlatImageLevel.h
include/OpenEXR/ImfFloatAttribute.h
+include/OpenEXR/ImfFloatVectorAttribute.h
include/OpenEXR/ImfForward.h
include/OpenEXR/ImfFrameBuffer.h
include/OpenEXR/ImfFramesPerSecond.h
@@ -44,6 +54,12 @@ include/OpenEXR/ImfGenericOutputFile.h
include/OpenEXR/ImfHeader.h
include/OpenEXR/ImfHuf.h
include/OpenEXR/ImfIO.h
+include/OpenEXR/ImfImage.h
+include/OpenEXR/ImfImageChannel.h
+include/OpenEXR/ImfImageChannelRenaming.h
+include/OpenEXR/ImfImageDataWindow.h
+include/OpenEXR/ImfImageIO.h
+include/OpenEXR/ImfImageLevel.h
include/OpenEXR/ImfInputFile.h
include/OpenEXR/ImfInputPart.h
include/OpenEXR/ImfInt64.h
@@ -73,6 +89,7 @@ include/OpenEXR/ImfRationalAttribute.h
include/OpenEXR/ImfRgba.h
include/OpenEXR/ImfRgbaFile.h
include/OpenEXR/ImfRgbaYca.h
+include/OpenEXR/ImfSampleCountChannel.h
include/OpenEXR/ImfStandardAttributes.h
include/OpenEXR/ImfStdIO.h
include/OpenEXR/ImfStringAttribute.h
@@ -88,18 +105,21 @@ include/OpenEXR/ImfTiledOutputPart.h
include/OpenEXR/ImfTiledRgbaFile.h
include/OpenEXR/ImfTimeCode.h
include/OpenEXR/ImfTimeCodeAttribute.h
+include/OpenEXR/ImfUtilExport.h
include/OpenEXR/ImfVecAttribute.h
include/OpenEXR/ImfVersion.h
include/OpenEXR/ImfWav.h
include/OpenEXR/ImfXdr.h
include/OpenEXR/OpenEXRConfig.h
+lib/cmake/OpenEXR/OpenEXRConfig-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/OpenEXR/OpenEXRConfig.cmake
+lib/cmake/OpenEXR/OpenEXRConfigVersion.cmake
+lib/libIlmImf-%%MAJORVER%%.so
lib/libIlmImf-%%MAJORVER%%.so.%%VER%%
lib/libIlmImf-%%MAJORVER%%.so.%%VER%%.0.0
-lib/libIlmImf.a
lib/libIlmImf.so
+lib/libIlmImfUtil-%%MAJORVER%%.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