pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/py-openexr py-openexr: build with openexr3



details:   https://anonhg.NetBSD.org/pkgsrc/rev/12c15a2a8b72
branches:  trunk
changeset: 455687:12c15a2a8b72
user:      markd <markd%pkgsrc.org@localhost>
date:      Thu Jul 08 21:23:23 2021 +0000

description:
py-openexr: build with openexr3

diffstat:

 graphics/py-openexr/Makefile                  |   7 +-
 graphics/py-openexr/distinfo                  |   4 +-
 graphics/py-openexr/patches/patch-OpenEXR.cpp |  93 ++++++++++++++++++++++++++-
 3 files changed, 99 insertions(+), 5 deletions(-)

diffs (144 lines):

diff -r e22e4452e54c -r 12c15a2a8b72 graphics/py-openexr/Makefile
--- a/graphics/py-openexr/Makefile      Thu Jul 08 21:22:34 2021 +0000
+++ b/graphics/py-openexr/Makefile      Thu Jul 08 21:23:23 2021 +0000
@@ -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_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 -r e22e4452e54c -r 12c15a2a8b72 graphics/py-openexr/distinfo
--- a/graphics/py-openexr/distinfo      Thu Jul 08 21:22:34 2021 +0000
+++ b/graphics/py-openexr/distinfo      Thu Jul 08 21:23:23 2021 +0000
@@ -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 -r e22e4452e54c -r 12c15a2a8b72 graphics/py-openexr/patches/patch-OpenEXR.cpp
--- a/graphics/py-openexr/patches/patch-OpenEXR.cpp     Thu Jul 08 21:22:34 2021 +0000
+++ b/graphics/py-openexr/patches/patch-OpenEXR.cpp     Thu Jul 08 21:23:23 2021 +0000
@@ -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 @@
  #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) {



Home | Main Index | Thread Index | Old Index