[122030] trunk/dports/lang/python27

jwa at macports.org jwa at macports.org
Sun Jul 13 02:27:35 PDT 2014


Revision: 122030
          https://trac.macports.org/changeset/122030
Author:   jwa at macports.org
Date:     2014-07-13 02:27:35 -0700 (Sun, 13 Jul 2014)
Log Message:
-----------
python27: patch pyport.h to be safe for C++, closes #44288

Modified Paths:
--------------
    trunk/dports/lang/python27/Portfile

Added Paths:
-----------
    trunk/dports/lang/python27/files/patch-Include-pyport.h.diff

Modified: trunk/dports/lang/python27/Portfile
===================================================================
--- trunk/dports/lang/python27/Portfile	2014-07-13 09:12:13 UTC (rev 122029)
+++ trunk/dports/lang/python27/Portfile	2014-07-13 09:27:35 UTC (rev 122030)
@@ -8,6 +8,7 @@
 epoch               2
 # Remember to keep py27-tkinter and py27-gdbm's versions sync'd with this
 version             2.7.8
+revision            1
 
 set major           [lindex [split $version .] 0]
 set branch          [join [lrange [split ${version} .] 0 1] .]
@@ -36,7 +37,8 @@
                     patch-Lib-cgi.py.diff \
                     patch-Lib-ctypes-macholib-dyld.py.diff \
                     patch-configure.diff \
-                    patch-libedit.diff
+                    patch-libedit.diff \
+                    patch-Include-pyport.h.diff
 
 depends_lib         port:gettext \
                     port:zlib \

Added: trunk/dports/lang/python27/files/patch-Include-pyport.h.diff
===================================================================
--- trunk/dports/lang/python27/files/patch-Include-pyport.h.diff	                        (rev 0)
+++ trunk/dports/lang/python27/files/patch-Include-pyport.h.diff	2014-07-13 09:27:35 UTC (rev 122030)
@@ -0,0 +1,23 @@
+--- Include/pyport.h.orig	2014-06-29 21:05:24.000000000 -0500
++++ Include/pyport.h	2014-07-11 13:36:52.000000000 -0500
+@@ -713,6 +713,12 @@
+ #endif
+ 
+ #ifdef _PY_PORT_CTYPE_UTF8_ISSUE
++#ifndef __cplusplus
++   /* The workaround below is unsafe in C++ because
++    * the <locale> defines these symbols as real functions,
++    * with a slightly different signature.
++    * See issue #10910
++    */
+ #include <ctype.h>
+ #include <wctype.h>
+ #undef isalnum
+@@ -730,6 +736,7 @@
+ #undef toupper
+ #define toupper(c) towupper(btowc(c))
+ #endif
++#endif
+ 
+ 
+ /* Declarations for symbol visibility.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140713/098bb29d/attachment.html>


More information about the macports-changes mailing list