[150998] trunk/dports/lang/python35

mojca at macports.org mojca at macports.org
Fri Aug 5 02:28:10 PDT 2016


Revision: 150998
          https://trac.macports.org/changeset/150998
Author:   mojca at macports.org
Date:     2016-08-05 02:28:10 -0700 (Fri, 05 Aug 2016)
Log Message:
-----------
python: fix for Xcode 4 (closes #49272, maintainer timeout)

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

Added Paths:
-----------
    trunk/dports/lang/python35/files/patch-xcode4bug.diff

Modified: trunk/dports/lang/python35/Portfile
===================================================================
--- trunk/dports/lang/python35/Portfile	2016-08-05 07:05:16 UTC (rev 150997)
+++ trunk/dports/lang/python35/Portfile	2016-08-05 09:28:10 UTC (rev 150998)
@@ -38,7 +38,8 @@
                         patch-setup.py-disabled_modules.diff \
                         patch-Lib-ctypes-macholib-dyld.py.diff \
                         patch-libedit.diff \
-                        omit-local-site-packages.patch
+                        omit-local-site-packages.patch \
+                        patch-xcode4bug.diff
 
 depends_lib             port:zlib path:lib/libssl.dylib:openssl \
                         port:sqlite3 port:ncurses \

Added: trunk/dports/lang/python35/files/patch-xcode4bug.diff
===================================================================
--- trunk/dports/lang/python35/files/patch-xcode4bug.diff	                        (rev 0)
+++ trunk/dports/lang/python35/files/patch-xcode4bug.diff	2016-08-05 09:28:10 UTC (rev 150998)
@@ -0,0 +1,33 @@
+https://trac.macports.org/ticket/49272
+https://bugs.python.org/issue24844
+
+Compiling python fails in Xcode 4 (clang < 3.3) where existence of 'atomic'
+is detected by configure, but it is not fully functional.
+
+--- configure.orig
++++ configure
+@@ -16238,6 +16240,24 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+     volatile int val = 1;
+     int main() {
+       __atomic_load_n(&val, __ATOMIC_SEQ_CST);
++
++      // https://bugs.python.org/issue24844
++      #define VERSION_CHECK(cc_major, cc_minor, req_major, req_minor) \
++          ((cc_major) > (req_major) || \
++          (cc_major) == (req_major) && (cc_minor) >= (req_minor))
++      #if defined(__clang__)
++          #if defined(__apple_build_version__)
++              // either one test or the other should work
++              // #if __apple_build_version__ < 5000000
++              #if !VERSION_CHECK(__clang_major__, __clang_minor__, 5, 0)
++                  #error
++              #endif
++          // not sure if this is 3.3 or 3.4
++          #elif !VERSION_CHECK(__clang_major__, __clang_minor__, 3, 3)
++              #error
++          #endif
++      #endif
++
+       return 0;
+     }
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160805/0bdf14a6/attachment.html>


More information about the macports-changes mailing list