Ticket #11860: python244.diff

File python244.diff, 13.5 KB (added by roederja, 17 years ago)
  • files/patch-Mac-OSX-Makefile

     
    1 --- Mac/OSX/Makefile    Mon Apr  4 16:01:42 2005
    2 +++ Mac/OSX/Makefile.new        Mon Apr  4 16:02:02 2005
    3 @@ -17,8 +17,8 @@
    4  endif
    5  
    6  # These are normally glimpsed from the previous set
    7 -bindir=/usr/local/bin
    8 -PYTHONAPPSPATH=/Applications/MacPython-$(VERSION)
    9 +bindir=__PREFIX__/bin
    10 +PYTHONAPPSPATH=/Applications/MacPorts/MacPython
    11  PYTHONAPPSDIR=$(PYTHONAPPSPATH)
    12  APPINSTALLDIR=$(prefix)/Resources/Python.app
    13  
  • files/patch-Mac-OSX-IDLE-Makefile.in

     
     1--- Mac/OSX/IDLE/Makefile.in.orig       2006-10-08 10:41:25.000000000 -0700
     2+++ Mac/OSX/IDLE/Makefile.in    2007-04-27 13:27:07.000000000 -0700
     3@@ -21,7 +21,7 @@
     4 
     5 BUNDLEBULDER=$(srcdir)/../../../Lib/plat-mac/bundlebuilder.py
     6 
     7-PYTHONAPPSDIR=/Applications/MacPython $(VERSION)
     8+PYTHONAPPSDIR=/Applications/Macports/MacPython $(VERSION)
     9 
     10 all: IDLE.app
     11 
  • files/patch-Makefile.pre.in

     
    1 --- Makefile.pre.in     2005-03-29 01:23:01.000000000 +0200
    2 +++ Makefile.pre.in     2006-01-29 12:55:03.000000000 +0100
     1--- Makefile.pre.in.orig        2006-10-08 10:41:25.000000000 -0700
     2+++ Makefile.pre.in     2007-04-20 18:06:11.000000000 -0700
    33@@ -56,7 +56,7 @@
    44 OPT=           @OPT@
    55 BASECFLAGS=    @BASECFLAGS@
     
    99 LDFLAGS=       @LDFLAGS@
    1010 LDLAST=                @LDLAST@
    1111 SGI_ABI=       @SGI_ABI@
    12 @@ -305,7 +305,7 @@
     12@@ -309,7 +309,7 @@
    1313 # Rules
    1414 
    1515 # Default target
     
    1818 
    1919 # Build the interpreter
    2020 $(BUILDPYTHON):        Modules/$(MAINOBJ) $(LIBRARY) $(LDLIBRARY)
    21 @@ -360,6 +360,10 @@
     21@@ -364,6 +364,10 @@
    2222 libpython$(VERSION).sl: $(LIBRARY_OBJS)
    23         $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(LIBC) $(LIBM)
     23        $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
    2424 
    2525+libpython$(VERSION).dylib: $(LIBRARY_OBJS)
    2626+       $(LINKCC) -dynamiclib -install_name $(LIBDIR)/$@ -current_version $(VERSION) -compatibility_version $(VERSION) -o $@ -flat_namespace -undefined suppress $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
     
    2929 # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
    3030 # minimal framework (not including the Lib directory and such) in the current
    3131 # directory.
    32 @@ -625,7 +629,12 @@
     32@@ -655,7 +659,12 @@
    3333                                (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \
    3434                        fi \
    3535                fi; \
     
    4343        fi
    4444 
    4545 # Install the manual page
     46 
  • files/patch-Mac-OSX-Makefile.in

     
     1--- Mac/OSX/Makefile.in.orig    2006-10-08 10:41:25.000000000 -0700
     2+++ Mac/OSX/Makefile.in 2007-04-27 11:07:02.000000000 -0700
     3@@ -5,7 +5,7 @@
     4 VERSION=@VERSION@
     5 builddir = ../..
     6 srcdir = @srcdir@
     7-prefix=/Library/Frameworks/Python.framework/Versions/$(VERSION)
     8+prefix=__PREFIX__/Library/Frameworks/Python.framework/Versions/$(VERSION)
     9 LIBDEST=$(prefix)/lib/python$(VERSION)
     10 BUILDPYTHON=$(builddir)/python.exe
     11 RUNSHARED=       @RUNSHARED@
     12@@ -16,7 +16,7 @@
     13 
     14 # These are normally glimpsed from the previous set
     15 bindir=@exec_prefix@/bin
     16-PYTHONAPPSPATH=/Applications/MacPython $(VERSION)
     17+PYTHONAPPSPATH=/Applications/Macports/MacPython $(VERSION)
     18 PYTHONAPPSDIR=$(PYTHONAPPSPATH)
     19 APPINSTALLDIR=$(prefix)/Resources/Python.app
     20 
  • files/patch-Mac-OSX-PythonLauncher-Makefile.in

     
     1--- Mac/OSX/PythonLauncher/Makefile.in.orig     2006-10-08 10:41:25.000000000 -0700
     2+++ Mac/OSX/PythonLauncher/Makefile.in  2007-04-27 13:33:26.000000000 -0700
     3@@ -20,7 +20,7 @@
     4 
     5 BUNDLEBULDER=$(srcdir)/../../../Lib/plat-mac/bundlebuilder.py
     6 
     7-PYTHONAPPSDIR=/Applications/MacPython $(VERSION)
     8+PYTHONAPPSDIR=/Applications/Macports/MacPython $(VERSION)
     9 OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o
     10 
     11 all: PythonLauncher.app
  • files/patch-Lib-plat-mac-applesingle.py

     
    1 --- Lib/plat-mac/applesingle.py 2004-07-18 02:14:45.000000000 -0400
    2 +++ Lib/plat-mac/applesingle.py 2006-03-29 19:48:18.000000000 -0500
    3 @@ -25,14 +25,14 @@
    4      pass
    5  
    6  # File header format: magic, version, unused, number of entries
    7 -AS_HEADER_FORMAT="LL16sh"
    8 +AS_HEADER_FORMAT=">LL16sh"
    9  AS_HEADER_LENGTH=26
    10  # The flag words for AppleSingle
    11  AS_MAGIC=0x00051600
    12  AS_VERSION=0x00020000
    13  
    14  # Entry header format: id, offset, length
    15 -AS_ENTRY_FORMAT="lll"
    16 +AS_ENTRY_FORMAT=">lll"
    17  AS_ENTRY_LENGTH=12
    18  
    19  # The id values
  • files/patch-configure

     
    1 --- work/Python-2.4.2/configure 2005-08-07 23:08:42.000000000 +0200
    2 +++ configure   2005-12-11 01:27:37.000000000 +0100
    3 @@ -3828,7 +3828,12 @@
     1--- configure.orig      2007-04-05 21:32:57.000000000 -0700
     2+++ configure   2007-04-05 21:32:59.000000000 -0700
     3@@ -3907,7 +3907,12 @@
    44            ;;
    55        # is there any other compiler on Darwin besides gcc?
    66        Darwin*)
    77-           BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
    8 +               if [[ `/usr/bin/arch` = 'ppc' ]]
    9 +               then
    10 +                       BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common"
    11 +               else
    12 +                       BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -fno-common"
    13 +               fi
    14             ;;
    15      esac
    16      ;;
    17 @@ -10230,7 +10235,7 @@
     8+           if [[ `/usr/bin/arch` = 'ppc' ]]
     9+        then
     10+          BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common"
     11+        else
     12+          BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -fno-common"
     13+        fi
     14            if test "${enable_universalsdk}"; then
     15                BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
     16            fi
     17@@ -10328,7 +10333,7 @@
    1818         else
    1919             LIBTOOL_CRUFT=""
    2020     fi
     
    2323     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
    2424     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
    2525 esac
    26 @@ -10364,8 +10369,8 @@
     26@@ -10472,8 +10477,8 @@
    2727                                LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
    2828                        else
    2929                                # No framework, use the Python app as bundle-loader
  • Portfile

     
    22
    33PortSystem 1.0
    44
    5 name                    python24
    6 version                 2.4.3
    7 revision                1
    8 set major_version       2
    9 set minor_version       4
    10 categories              lang
    11 platforms               darwin
    12 maintainers             mww@macports.org
    13 description             An interpreted, object-oriented programming language
    14 long_description        Python is an interpreted, interactive, object-oriented \
    15                                         programming language.
     5name            python24
     6version         2.4.4
     7set major_version   2
     8set minor_version   4
     9categories      lang
     10platforms       darwin
     11maintainers     mww@macports.org
     12description     An interpreted, object-oriented programming language
     13long_description    Python is an interpreted, interactive, object-oriented \
     14                    programming language.
    1615
    17 homepage                http://www.python.org/
    18 master_sites    ${homepage}/ftp/python/2.4.3/ \
    19                                 ftp://ftp.python.org/pub/python/2.4.3/
    20 distname                Python-${version}
    21 checksums               md5 141c683447d5e76be1d2bd4829574f02
    22 patchfiles              patch-Makefile.pre.in \
    23                                 patch-configure \
    24                                 patch-Lib-site.py \
    25                                 patch-Mac-OSX-Makefile \
    26                                 patch-setup.py \
    27                                 patch-Include-pyport.h \
    28                                 patch-Lib-plat-mac-applesingle.py
     16homepage        http://www.python.org/
     17master_sites    ${homepage}/ftp/python/${version}/ \
     18                ftp://ftp.python.org/pub/python/${version}/
     19distname        Python-${version}
     20checksums       md5 0ba90c79175c017101100ebf5978e906
     21patchfiles      patch-configure \
     22                patch-Makefile.pre.in \
     23                patch-Lib-site.py \
     24                patch-setup.py \
     25                patch-Include-pyport.h \
     26                patch-Mac-OSX-Makefile.in \
     27                patch-Mac-OSX-IDLE-Makefile.in \
     28                patch-Mac-OSX-PythonLauncher-Makefile.in
    2929
    30 use_bzip2               yes
     30use_bzip2       yes
    3131
     32configure.args  --enable-shared \
     33                --mandir=${prefix}/share/man \
     34                --bindir=${prefix}/bin \
     35                --libdir=${prefix}/lib \
     36                --without-readline \
     37                --enable-framework=${prefix}/Library/Frameworks \
     38                --disable-tk \
     39                --enable-ipv6
     40
    3241post-patch {
    33         cd ${worksrcpath}
    34         reinplace "s|__PREFIX__|${prefix}|g" Lib/site.py Mac/OSX/Makefile
     42    cd ${worksrcpath}
     43    reinplace "s|__PREFIX__|${prefix}|g" Lib/site.py
     44    reinplace "s|__PREFIX__|${prefix}|g" Mac/OSX/Makefile.in
    3545}
    3646
    37 configure.args  --enable-shared \
    38                                 --mandir=${prefix}/share/man \
    39                                 --bindir=${prefix}/bin \
    40                                 --libdir=${prefix}/lib \
    41                                 --without-readline \
    42                                 --enable-framework=${prefix}/Library/Frameworks \
    43                                 --enable-ipv6 \
    44                                 --disable-tk
    45 post-configure {
    46         cd ${worksrcpath}
    47         reinplace "s|^LIBDIR=.*|LIBDIR=${prefix}/lib|g" Makefile
    48         reinplace "s|^INCLUDEDIR=.*|INCLUDEDIR=${prefix}/include|g" Makefile
    49         reinplace "s|^CONFINCLUDEDIR=.*|CONFINCLUDEDIR=${prefix}/include|g" Makefile
    50 }
     47test.run        yes
     48test.target     test
    5149
    52 test.run                yes
    53 test.target             test
    54 
    55 destroot.target frameworkinstall maninstall
     50destroot.target frameworkinstall maninstall
    5651post-destroot {
    57         if { ![variant_isset puredarwin]} {
    58                 set framewdir ${prefix}/Library/Frameworks/Python.framework/
    59                 xinstall -m 755 -d ${destroot}${framewdir}/Versions/2.4/include
    60                 system "cd ${destroot}${framewdir} \
    61                         && ln -s Versions/Current/lib Libraries"
    62                 system "ln -sf ${prefix}/include/python2.4 ${destroot}${framewdir}/Versions/2.4/include/python2.4"
    63                 system "cd ${destroot}${prefix}/bin \
    64                         && ln -sf ${framewdir}/Versions/2.4/bin/pydoc pydoc \
    65                         && ln -sf ${framewdir}/Versions/2.4/bin/pydoc pydoc24"
    66                 system "cd ${destroot}${framewdir}/Versions/2.4/lib/python2.4 \
    67                         && ln -s ${prefix}/lib/python2.4/config config"
     52    if { ![variant_isset puredarwin]} {
     53        set framewdir ${prefix}/Library/Frameworks/Python.framework
     54        xinstall -m 755 -d ${destroot}${framewdir}/Versions/2.4/include
     55        system "cd ${destroot}${framewdir} \
     56            && ln -s Versions/Current/lib Libraries"
     57        system "ln -sf ${prefix}/include/python2.4 ${destroot}${framewdir}/Versions/2.4/include/python2.4"
     58        system "cd ${destroot}${prefix}/bin \
     59            && ln -sf ${framewdir}/Versions/2.4/bin/pydoc pydoc \
     60            && ln -sf ${framewdir}/Versions/2.4/bin/pydoc pydoc24"
     61        system "cd ${destroot}${framewdir}/Versions/2.4/lib/python2.4 \
     62            && ln -s ${prefix}/lib/python2.4/config config"
     63        system "cd ${destroot}${prefix}/lib && \
     64        ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib \
     65            libpython${version}.dylib && \
     66        ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib \
     67            libpython${major_version}.dylib && \
     68        ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib \
     69            libpython.dylib"
     70        } else {
     71            system "cd ${destroot}${prefix}/lib && \
     72        ln -s libpython${major_version}.${minor_version}.dylib \
     73            libpython${version}.dylib && \
     74        ln -s libpython${major_version}.${minor_version}.dylib \
     75            libpython${major_version}.dylib && \
     76        ln -s libpython${major_version}.${minor_version}.dylib \
     77            libpython.dylib"
    6878        }
    69         system "cd ${destroot}${prefix}/lib && \
    70                 ln -s libpython${major_version}.${minor_version}.dylib \
    71                         libpython${version}.dylib && \
    72                 ln -s libpython${major_version}.${minor_version}.dylib \
    73                         libpython${major_version}.dylib && \
    74                 ln -s libpython${major_version}.${minor_version}.dylib \
    75                         libpython.dylib"
    7679}
    7780
    7881platform puredarwin {
    79         configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
    80         configure.args-append   --disable-toolbox-glue --disable-framework
    81         destroot.target         install maninstall
     82    configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
     83    configure.args-append   --disable-toolbox-glue --disable-framework
     84    destroot.target     install maninstall
    8285}
    8386
    8487platform darwin 8 {
    85         configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
    86         configure.args-append --with-cxx=/usr/bin/g++-4.0
     88    configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
     89    configure.args-append --with-cxx=/usr/bin/g++-4.0
    8790}
    8891
    89 livecheck.check regex
    90 livecheck.url   http://www.python.org/download/releases/
    91 livecheck.regex Python (2.4.\[0-9\]+)
     92livecheck.check regex
     93livecheck.url   http://www.python.org/download/releases/
     94livecheck.regex Python (2.4.\[0-9\]+)
    9295