summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authormarkd <markd@pkgsrc.org>2021-07-08 21:23:23 +0000
committermarkd <markd@pkgsrc.org>2021-07-08 21:23:23 +0000
commit1dafa0a784b3b4a06897e7f34ac6323b0e10c6d3 (patch)
tree8561418a845eea18b64ca975018ba1101b8deb0b /graphics
parent5c8aecf7cd3dff99e81999fce9046c2886892e60 (diff)
downloadpkgsrc-1dafa0a784b3b4a06897e7f34ac6323b0e10c6d3.tar.gz
py-openexr: build with openexr3
Diffstat (limited to 'graphics')
-rw-r--r--graphics/py-openexr/Makefile7
-rw-r--r--graphics/py-openexr/distinfo4
-rw-r--r--graphics/py-openexr/patches/patch-OpenEXR.cpp93
3 files changed, 99 insertions, 5 deletions
diff --git a/graphics/py-openexr/Makefile b/graphics/py-openexr/Makefile
index 563ec0b8b94..bd85c91a902 100644
--- a/graphics/py-openexr/Makefile
+++ b/graphics/py-openexr/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.8 2020/05/21 20:53:44 ryoon Exp $
+# $NetBSD: Makefile,v 1.9 2021/07/08 21:23:23 markd Exp $
DISTNAME= OpenEXR-1.3.2
PKGNAME= ${PYPKGPREFIX}-${DISTNAME:tl}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= graphics python
MASTER_SITES= ${MASTER_SITE_PYPI:=O/OpenEXR/}
@@ -18,7 +18,10 @@ SUBST_MESSAGE.fix-path= Fixing paths.
SUBST_STAGE.fix-path= pre-configure
SUBST_FILES.fix-path= setup.py
SUBST_SED.fix-path= -e 's,/usr/include/OpenEXR,${BUILDLINK_PREFIX.openexr}/include/OpenEXR,'
+SUBST_SED.fix-path+= -e 's,/usr/local/include/OpenEXR,${BUILDLINK_PREFIX.imath}/include/Imath,'
SUBST_SED.fix-path+= -e 's,/usr/local/lib,${BUILDLINK_PREFIX.openexr}/lib,'
+SUBST_SED.fix-path+= -e 's,Half,OpenEXR,'
+SUBST_SED.fix-path+= -e 's,IlmImf,IlmThread,'
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/openexr/buildlink3.mk"
diff --git a/graphics/py-openexr/distinfo b/graphics/py-openexr/distinfo
index 434353cef50..fc9bc490904 100644
--- a/graphics/py-openexr/distinfo
+++ b/graphics/py-openexr/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.5 2018/10/26 12:45:47 jperkin Exp $
+$NetBSD: distinfo,v 1.6 2021/07/08 21:23:23 markd Exp $
SHA1 (OpenEXR-1.3.2.tar.gz) = 46827a186976972f2cd1e30f11baaef062c98c74
RMD160 (OpenEXR-1.3.2.tar.gz) = a4cb806ffa825c380cfa9cd50c5307ded028b725
SHA512 (OpenEXR-1.3.2.tar.gz) = b4b85f3f8860639c4f65a3fe59c721e08573ffe9b2af5cc7e398d9ff249bac604b43fa5bda6f05f8cd248ed7346df1a2972ac7c5a3df12fe0a73b859c618e33d
Size (OpenEXR-1.3.2.tar.gz) = 10927 bytes
-SHA1 (patch-OpenEXR.cpp) = 9d4bbbfd4e37cacc0c0d8393e65c8f8cedecf6d3
+SHA1 (patch-OpenEXR.cpp) = f49eafd7188802593b23fe6632327e21cabd8525
diff --git a/graphics/py-openexr/patches/patch-OpenEXR.cpp b/graphics/py-openexr/patches/patch-OpenEXR.cpp
index a836f22f2af..475f1452b9f 100644
--- a/graphics/py-openexr/patches/patch-OpenEXR.cpp
+++ b/graphics/py-openexr/patches/patch-OpenEXR.cpp
@@ -1,6 +1,7 @@
-$NetBSD: patch-OpenEXR.cpp,v 1.1 2018/10/26 12:45:47 jperkin Exp $
+$NetBSD: patch-OpenEXR.cpp,v 1.2 2021/07/08 21:23:23 markd Exp $
Avoid CS define on SunOS.
+openexr3 deprecates Int64
--- OpenEXR.cpp.orig 2018-08-30 14:53:51.000000000 +0000
+++ OpenEXR.cpp
@@ -14,3 +15,93 @@ Avoid CS define on SunOS.
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
#define PY_SSIZE_T_MAX INT_MAX
+@@ -44,6 +48,7 @@ typedef int Py_ssize_t;
+ #include <ImfChannelListAttribute.h>
+ #include <ImfChromaticitiesAttribute.h>
+ #include <ImfCompressionAttribute.h>
++#include <ImfFrameBuffer.h>
+ #include <ImfDoubleAttribute.h>
+ #include <ImfEnvmapAttribute.h>
+ #include <ImfFloatAttribute.h>
+@@ -72,6 +77,7 @@ typedef int Py_ssize_t;
+ #include <iostream>
+ #include <iomanip>
+ #include <iostream>
++#include <fstream>
+ #include <vector>
+
+ using namespace std;
+@@ -105,8 +111,8 @@ class C_IStream: public IStream
+ C_IStream (PyObject *fo):
+ IStream(""), _fo(fo) {}
+ virtual bool read (char c[], int n);
+- virtual Int64 tellg ();
+- virtual void seekg (Int64 pos);
++ virtual uint64_t tellg ();
++ virtual void seekg (uint64_t pos);
+ virtual void clear ();
+ virtual const char* fileName() const;
+ private:
+@@ -132,7 +138,7 @@ const char* C_IStream::fileName() const
+ }
+
+
+-Int64
++uint64_t
+ C_IStream::tellg ()
+ {
+ PyObject *rv = PyObject_CallMethod(_fo, (char*)"tell", NULL);
+@@ -141,14 +147,14 @@ C_IStream::tellg ()
+ long long t = PyLong_AsLong(lrv);
+ Py_DECREF(lrv);
+ Py_DECREF(rv);
+- return (Int64)t;
++ return (uint64_t)t;
+ } else {
+ throw Iex::InputExc("tell failed");
+ }
+ }
+
+ void
+-C_IStream::seekg (Int64 pos)
++C_IStream::seekg (uint64_t pos)
+ {
+ PyObject *data = PyObject_CallMethod(_fo, (char*)"seek", (char*)"(L)", pos);
+ if (data != NULL) {
+@@ -170,8 +176,8 @@ class C_OStream: public OStream
+ public:
+ C_OStream (PyObject *fo): OStream(""), _fo(fo) {}
+ virtual void write (const char *c, int n);
+- virtual Int64 tellp ();
+- virtual void seekp (Int64 pos);
++ virtual uint64_t tellp ();
++ virtual void seekp (uint64_t pos);
+ virtual void clear ();
+ virtual const char* fileName() const;
+ private:
+@@ -196,7 +202,7 @@ const char* C_OStream::fileName() const
+ }
+
+
+-Int64
++uint64_t
+ C_OStream::tellp ()
+ {
+ PyObject *rv = PyObject_CallMethod(_fo, (char*)"tell", NULL);
+@@ -205,14 +211,14 @@ C_OStream::tellp ()
+ long long t = PyLong_AsLong(lrv);
+ Py_DECREF(lrv);
+ Py_DECREF(rv);
+- return (Int64)t;
++ return (uint64_t)t;
+ } else {
+ throw Iex::InputExc("tell failed");
+ }
+ }
+
+ void
+-C_OStream::seekp (Int64 pos)
++C_OStream::seekp (uint64_t pos)
+ {
+ PyObject *data = PyObject_CallMethod(_fo, (char*)"seek", (char*)"(L)", pos);
+ if (data != NULL) {