[87442] trunk/dports/lang

jmr at macports.org jmr at macports.org
Mon Nov 21 14:46:47 PST 2011


Revision: 87442
          http://trac.macports.org/changeset/87442
Author:   jmr at macports.org
Date:     2011-11-21 14:46:45 -0800 (Mon, 21 Nov 2011)
Log Message:
-----------
python2*: make sure we compile with -fwrapv (#30031)

Modified Paths:
--------------
    trunk/dports/lang/python24/Portfile
    trunk/dports/lang/python25/Portfile
    trunk/dports/lang/python26/Portfile
    trunk/dports/lang/python27/Portfile

Added Paths:
-----------
    trunk/dports/lang/python24/files/patch-fwrapv.diff
    trunk/dports/lang/python25/files/patch-fwrapv.diff

Modified: trunk/dports/lang/python24/Portfile
===================================================================
--- trunk/dports/lang/python24/Portfile	2011-11-21 17:46:24 UTC (rev 87441)
+++ trunk/dports/lang/python24/Portfile	2011-11-21 22:46:45 UTC (rev 87442)
@@ -5,7 +5,7 @@
 
 name                    python24
 version                 2.4.6
-revision                9
+revision                10
 set major               [lindex [split $version .] 0]
 set branch              [join [lrange [split ${version} .] 0 1] .]
 categories              lang
@@ -38,7 +38,8 @@
                         patch-Include-pyport.h \
                         patch-Mac-OSX-Makefile.in \
                         patch-Mac-OSX-IDLE-Makefile.in \
-                        patch-Mac-OSX-PythonLauncher-Makefile.in
+                        patch-Mac-OSX-PythonLauncher-Makefile.in \
+                        patch-fwrapv.diff
 
 depends_lib             port:gettext port:openssl
 depends_run             port:python_select

Added: trunk/dports/lang/python24/files/patch-fwrapv.diff
===================================================================
--- trunk/dports/lang/python24/files/patch-fwrapv.diff	                        (rev 0)
+++ trunk/dports/lang/python24/files/patch-fwrapv.diff	2011-11-21 22:46:45 UTC (rev 87442)
@@ -0,0 +1,19 @@
+--- configure.orig	2011-11-22 09:17:41.000000000 +1100
++++ configure	2011-11-22 09:28:46.000000000 +1100
+@@ -3820,13 +3820,13 @@
+ 	    if test "$Py_DEBUG" = 'true' ; then
+ 		# Optimization messes up debuggers, so turn it off for
+ 		# debug builds.
+-		OPT="-g -Wall -Wstrict-prototypes"
++		OPT="-g -fwrapv -Wall -Wstrict-prototypes"
+ 	    else
+-		OPT="-g -O3 -Wall -Wstrict-prototypes"
++		OPT="-g -fwrapv -O3 -Wall -Wstrict-prototypes"
+ 	    fi
+ 	    ;;
+ 	*)
+-	    OPT="-O3 -Wall -Wstrict-prototypes"
++	    OPT="-O3 -fwrapv -Wall -Wstrict-prototypes"
+ 	    ;;
+ 	esac
+ 	case $ac_sys_system in

Modified: trunk/dports/lang/python25/Portfile
===================================================================
--- trunk/dports/lang/python25/Portfile	2011-11-21 17:46:24 UTC (rev 87441)
+++ trunk/dports/lang/python25/Portfile	2011-11-21 22:46:45 UTC (rev 87442)
@@ -6,7 +6,7 @@
 
 name                    python25
 version                 2.5.6
-revision                2
+revision                3
 
 set branch              [join [lrange [split ${version} .] 0 1] .]
 categories              lang
@@ -38,7 +38,8 @@
                         patch-64bit.diff \
                         patch-setup_no_tkinter.py.diff \
                         patch-mac_ver.diff \
-                        patch-libedit.diff
+                        patch-libedit.diff \
+                        patch-fwrapv.diff
 
 depends_lib             port:gettext port:zlib port:openssl \
                         port:sqlite3 port:db46 port:bzip2 \

Added: trunk/dports/lang/python25/files/patch-fwrapv.diff
===================================================================
--- trunk/dports/lang/python25/files/patch-fwrapv.diff	                        (rev 0)
+++ trunk/dports/lang/python25/files/patch-fwrapv.diff	2011-11-21 22:46:45 UTC (rev 87442)
@@ -0,0 +1,12 @@
+--- configure.orig	2011-11-22 09:08:58.000000000 +1100
++++ configure	2011-11-22 09:10:56.000000000 +1100
+@@ -4428,9 +4428,7 @@
+ 	    STRICT_PROTO="-Wstrict-prototypes"
+ 	fi
+         # For gcc 4.x we need to use -fwrapv so lets check if its supported
+-        if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
+            WRAP="-fwrapv"
+-        fi
+ 	case $ac_cv_prog_cc_g in
+ 	yes)
+ 	    if test "$Py_DEBUG" = 'true' ; then

Modified: trunk/dports/lang/python26/Portfile
===================================================================
--- trunk/dports/lang/python26/Portfile	2011-11-21 17:46:24 UTC (rev 87441)
+++ trunk/dports/lang/python26/Portfile	2011-11-21 22:46:45 UTC (rev 87442)
@@ -7,7 +7,7 @@
 name                    python26
 # Remember to keep py26-tkinter's version sync'd with this
 version                 2.6.7
-revision                2
+revision                3
 set major               [lindex [split $version .] 0]
 set branch              [join [lrange [split ${version} .] 0 1] .]
 categories              lang
@@ -56,6 +56,10 @@
                         --enable-ipv6
 configure.ccache        no
 
+# signed integer overflow is normally undefined as per the C spec, but python
+# needs it to be defined as twos-complement
+configure.cflags-append -fwrapv
+
 post-patch {
    reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/Lib/cgi.py \
       ${worksrcpath}/Lib/ctypes/macholib/dyld.py

Modified: trunk/dports/lang/python27/Portfile
===================================================================
--- trunk/dports/lang/python27/Portfile	2011-11-21 17:46:24 UTC (rev 87441)
+++ trunk/dports/lang/python27/Portfile	2011-11-21 22:46:45 UTC (rev 87442)
@@ -8,7 +8,7 @@
 epoch               2
 # Remember to keep py27-tkinter's version sync'd with this
 version             2.7.2
-revision            2
+revision            3
 
 set major           [lindex [split $version .] 0]
 set branch          [join [lrange [split ${version} .] 0 1] .]
@@ -60,6 +60,10 @@
 
 configure.ccache    no
 
+# signed integer overflow is normally undefined as per the C spec, but python
+# needs it to be defined as twos-complement
+configure.cflags-append -fwrapv
+
 post-patch {
     reinplace "s|@@PREFIX@@|${prefix}|g" \
         ${worksrcpath}/Lib/cgi.py \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111121/7aaed151/attachment-0001.html>


More information about the macports-changes mailing list