[115445] trunk/dports/python/py-imread

stromnov at macports.org stromnov at macports.org
Thu Jan 2 00:13:08 PST 2014


Revision: 115445
          https://trac.macports.org/changeset/115445
Author:   stromnov at macports.org
Date:     2014-01-02 00:13:08 -0800 (Thu, 02 Jan 2014)
Log Message:
-----------
py-imread: fix for py32 subport (#41997)

Modified Paths:
--------------
    trunk/dports/python/py-imread/Portfile

Added Paths:
-----------
    trunk/dports/python/py-imread/files/patch-imread__imread.cpp.diff

Modified: trunk/dports/python/py-imread/Portfile
===================================================================
--- trunk/dports/python/py-imread/Portfile	2014-01-02 06:21:49 UTC (rev 115444)
+++ trunk/dports/python/py-imread/Portfile	2014-01-02 08:13:08 UTC (rev 115445)
@@ -34,7 +34,8 @@
                             port:tiff \
                             port:webp
 
-    patchfiles              patch-setup.py.diff
+    patchfiles              patch-setup.py.diff \
+                            patch-imread__imread.cpp.diff
 
     livecheck.type          none
 } else {

Added: trunk/dports/python/py-imread/files/patch-imread__imread.cpp.diff
===================================================================
--- trunk/dports/python/py-imread/files/patch-imread__imread.cpp.diff	                        (rev 0)
+++ trunk/dports/python/py-imread/files/patch-imread__imread.cpp.diff	2014-01-02 08:13:08 UTC (rev 115445)
@@ -0,0 +1,15 @@
+--- imread/_imread.cpp.orig	2014-01-02 11:53:27.000000000 +0400
++++ imread/_imread.cpp	2014-01-02 12:09:13.000000000 +0400
+@@ -47,8 +47,12 @@
+     return PyString_AsString(stro);
+ #else
+     if (!PyUnicode_Check(stro)) return 0;
++#if (PY_VERSION_HEX < 0x03030000)
++    return PyBytes_AsString(PyUnicode_AsUTF8String(stro));
++#else
+     return PyUnicode_AsUTF8(stro);
+ #endif
++#endif
+ }
+ 
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140102/c0689a7a/attachment.html>


More information about the macports-changes mailing list