Ticket #16765: 0001-Whitespace-changes.patch

File 0001-Whitespace-changes.patch, 6.2 KB (added by blb@…, 12 years ago)

0001-Whitespace-changes.patch

  • Portfile

    diff --git a/Portfile b/Portfile
    index b516e6b..53c9c44 100644
    a b configure.args --enable-shared \ 
    4444use_parallel_build      no
    4545
    4646post-patch {
    47         reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py
    48         reinplace "s|/Applications/MacPython|/Applications/MacPorts/MacPython|g" \
    49                 Mac/Makefile.in Mac/IDLE/Makefile.in \
    50                 Mac/IDLE/Makefile.in Mac/Tools/Doc/setup.py \
    51                 Mac/PythonLauncher/Makefile.in \
    52                 Mac/BuildScript/build-installer.py
    53         reinplace "s|xargs -0 rm -r|xargs -0 rm -rf|g" \
    54                 Mac/PythonLauncher/Makefile.in
     47   reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py
     48   reinplace "s|/Applications/MacPython|/Applications/MacPorts/MacPython|g" \
     49      Mac/Makefile.in Mac/IDLE/Makefile.in \
     50      Mac/IDLE/Makefile.in Mac/Tools/Doc/setup.py \
     51      Mac/PythonLauncher/Makefile.in \
     52      Mac/BuildScript/build-installer.py
     53   reinplace "s|xargs -0 rm -r|xargs -0 rm -rf|g" \
     54      Mac/PythonLauncher/Makefile.in
    5555}
    5656
    5757build.target            all libpython${branch}.dylib
    test.target test 
    7070destroot.target         frameworkinstall maninstall
    7171
    7272post-destroot {
    73         set framewpath ${prefix}/Library/Frameworks/Python.framework
    74         set framewdir  ${framewpath}/Versions/${branch}
    75 
    76         foreach dir { lib include } {
    77             file rename ${destroot}${framewdir}/${dir}/python${branch} ${destroot}${prefix}/${dir}
    78             ln -s ${prefix}/${dir}/python${branch} ${destroot}${framewdir}/${dir}/python${branch}
    79         }
    80 
    81         file rename ${destroot}${framewdir}/lib/libpython${branch}.dylib ${destroot}${prefix}/lib
    82         ln -s ${prefix}/lib/libpython${branch}.dylib ${destroot}${framewdir}/lib/libpython${branch}.dylib
    83 
    84         file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1
    85 
    86         # delete symlinks without version suffix, use python_select instead to choose version
    87         foreach bin { python pythonw idle pydoc smtpd.py python-config } {
    88             file delete ${destroot}${prefix}/bin/${bin}
    89         }
    90         foreach bin [list python${branch} pythonw${branch} idle${branch} pydoc${branch} smtpd${branch}.py python${branch}-config] {
    91             file rename -force ${destroot}${framewdir}/bin/${bin} ${destroot}${prefix}/bin
    92             ln -s ${prefix}/bin/${bin} ${destroot}${framewdir}/bin/${bin}
    93         }
    94 
    95         foreach dir { Headers Resources Python Versions/Current } {
    96             file delete ${destroot}${framewpath}/${dir}
    97         }
    98 
    99         # install select file for python_select
    100         xinstall -m 755 -d ${destroot}${prefix}/etc/select/python
    101         xinstall -m 644 ${filespath}/python[string map {. {}} ${branch}] ${destroot}${prefix}/etc/select/python/
     73   set framewpath ${prefix}/Library/Frameworks/Python.framework
     74   set framewdir  ${framewpath}/Versions/${branch}
     75
     76   foreach dir { lib include } {
     77      file rename ${destroot}${framewdir}/${dir}/python${branch} ${destroot}${prefix}/${dir}
     78      ln -s ${prefix}/${dir}/python${branch} ${destroot}${framewdir}/${dir}/python${branch}
     79   }
     80
     81   file rename ${destroot}${framewdir}/lib/libpython${branch}.dylib ${destroot}${prefix}/lib
     82   ln -s ${prefix}/lib/libpython${branch}.dylib ${destroot}${framewdir}/lib/libpython${branch}.dylib
     83
     84   file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1
     85
     86   # delete symlinks without version suffix, use python_select instead to choose version
     87   foreach bin { python pythonw idle pydoc smtpd.py python-config } {
     88      file delete ${destroot}${prefix}/bin/${bin}
     89   }
     90   foreach bin [list python${branch} pythonw${branch} idle${branch} pydoc${branch} smtpd${branch}.py python${branch}-config] {
     91      file rename -force ${destroot}${framewdir}/bin/${bin} ${destroot}${prefix}/bin
     92      ln -s ${prefix}/bin/${bin} ${destroot}${framewdir}/bin/${bin}
     93   }
     94
     95   foreach dir { Headers Resources Python Versions/Current } {
     96      file delete ${destroot}${framewpath}/${dir}
     97   }
     98
     99   # install select file for python_select
     100   xinstall -m 755 -d ${destroot}${prefix}/etc/select/python
     101   xinstall -m 644 ${filespath}/python[string map {. {}} ${branch}] ${destroot}${prefix}/etc/select/python/
    102102}
    103103
    104104post-activate {
    105     ui_msg "\nTo fully complete your installation and make python $branch the default, please run
     105   ui_msg "\nTo fully complete your installation and make python $branch the default, please run
    106106\n\tsudo port install python_select \
    107107\n\tsudo python_select $name\n"
    108108}
    109109
    110110platform darwin 7 {
    111         # there is no SystemStubs on 10.3
    112         post-patch {
    113                 reinplace "s|-lSystemStubs||g" \
    114                         configure configure.in
    115         }
    116         post-configure {
    117                 reinplace "s|-lSystemStubs||g" \
    118                         Makefile.pre.in Makefile.pre Makefile
    119         }
    120         # To avoid GCC incompatibility issue. See http://nxg.me.uk/note/2004/restFP/ (by ebgssth@gmail.com, ticket #13322)
    121         configure.ldflags-append "-lcc_dynamic"
     111   # there is no SystemStubs on 10.3
     112   post-patch {
     113      reinplace "s|-lSystemStubs||g" configure configure.in
     114   }
     115   post-configure {
     116      reinplace "s|-lSystemStubs||g" Makefile.pre.in Makefile.pre Makefile
     117   }
     118   # To avoid GCC incompatibility issue. See http://nxg.me.uk/note/2004/restFP/ (by ebgssth@gmail.com, ticket #13322)
     119   configure.ldflags-append   "-lcc_dynamic"
    122120}
    123121
    124122platform darwin 8 {
    125         # TODO: would configure.compiler be more appropriate?
    126         configure.args-append           --with-cxx=/usr/bin/g++-4.0
     123   # TODO: would configure.compiler be more appropriate?
     124   configure.args-append   --with-cxx=/usr/bin/g++-4.0
    127125}
    128126
    129127platform darwin 9 {
    130         configure.cppflags-append       -D__DARWIN_UNIX03
     128   configure.cppflags-append   -D__DARWIN_UNIX03
    131129}
    132130
    133131variant universal {
    134         configure.args-append           --enable-universalsdk
     132   configure.args-append   --enable-universalsdk
    135133}
    136134
    137135livecheck.check         regex
    138136livecheck.url           ${homepage}download/releases/
    139137livecheck.regex         Python (${branch}.\[0-9\]+)
     138