Ticket #12221: python24-cgi.patch

File python24-cgi.patch, 1.9 KB (added by afb@…, 17 years ago)

python24-cgi.patch

  • files/patch-Lib-cgi.py

     
     1--- Lib/cgi.py.orig     2006-08-11 09:14:38.000000000 +0200
     2+++ Lib/cgi.py  2007-08-21 15:36:54.000000000 +0200
     3@@ -1,13 +1,6 @@
     4-#! /usr/local/bin/python
     5+#! __PREFIX__/bin/python2.4
     6 
     7-# NOTE: the above "/usr/local/bin/python" is NOT a mistake.  It is
     8-# intentionally NOT "/usr/bin/env python".  On many systems
     9-# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
     10-# scripts, and /usr/local/bin is the default directory where Python is
     11-# installed, so /usr/bin/env would be unable to find python.  Granted,
     12-# binary installations by Linux vendors often install Python in
     13-# /usr/bin.  So let those vendors patch cgi.py to match their choice
     14-# of installation.
     15+# NOTE: /usr/local/bin/python patched for MacPorts installation
     16 
     17 """Support module for CGI (Common Gateway Interface) scripts.
     18 
  • Portfile

     
    44
    55name            python24
    66version         2.4.4
    7 revision        1
     7revision        2
    88set major_version   2
    99set minor_version   4
    1010categories      lang
     
    2121checksums       md5 0ba90c79175c017101100ebf5978e906
    2222patchfiles      patch-configure \
    2323                patch-Makefile.pre.in \
     24                patch-Lib-cgi.py \
    2425                patch-Lib-site.py \
    2526                patch-setup.py \
    2627                patch-Include-pyport.h \
     
    4344
    4445post-patch {
    4546    cd ${worksrcpath}
     47    reinplace "s|__PREFIX__|${prefix}|g" Lib/cgi.py
    4648    reinplace "s|__PREFIX__|${prefix}|g" Lib/site.py
    4749    reinplace "s|__PREFIX__|${prefix}|g" Mac/OSX/Makefile.in
    4850    reinplace "s|__PREFIX__|${prefix}|g" setup.py