Changeset 37814 for trunk/dports


Ignore:
Timestamp:
Jun 24, 2008, 9:52:54 PM (16 years ago)
Author:
raimue@…
Message:

Merged revisions 36460,36462-36463,36654,37481,37529,37811-37812 via svnmerge from
https://svn.macosforge.org/repository/macports/branches/python-frameworks/dports/lang/python24

........

r36460 | raimue@… | 2008-05-03 02:22:04 +0200 (Sat, 03 May 2008) | 3 lines


lang/python24:
Remove all hardcoded versions

........

r36462 | raimue@… | 2008-05-03 05:01:09 +0200 (Sat, 03 May 2008) | 6 lines


lang/python24, lang/python25:
Major changes to make the ports more similar. I hope I didn't miss some
changes.
This still does not contain any hook to make the transition easier, but these
ports are now very similar which makes them easier to maintain.

........

r36463 | raimue@… | 2008-05-03 05:08:16 +0200 (Sat, 03 May 2008) | 3 lines


lang/python24:
Update to 2.4.5

........

r36654 | raimue@… | 2008-05-09 16:29:30 +0200 (Fri, 09 May 2008) | 3 lines


lang/python{24,25}:
Remove unnecessary links to libpython.dylib, should be handled by python_select

........

r37481 | raimue@… | 2008-06-09 19:36:10 +0200 (Mon, 09 Jun 2008) | 5 lines


lang/python{24,25,30}:
Make the ports more similar.
These ports install fine for me now and also work with py-* and py25-* ports
providing modules, but need testing by others.

........

r37529 | raimue@… | 2008-06-11 17:32:11 +0200 (Wed, 11 Jun 2008) | 3 lines


lang/python{24,25,30}:
Correct a symlink inside the framework directory pointing into the destroot

........

r37811 | raimue@… | 2008-06-24 22:36:46 +0200 (Tue, 24 Jun 2008) | 3 lines


lang/python{24,25,30}:
Add better post-activate message

........

r37812 | raimue@… | 2008-06-24 22:38:25 +0200 (Tue, 24 Jun 2008) | 3 lines


lang/python{24,25,30}:
Bump revisions

........

Location:
trunk/dports/lang/python24
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/python24

  • trunk/dports/lang/python24/Portfile

    r37335 r37814  
    33PortSystem 1.0
    44
    5 name            python24
    6 version         2.4.5
    7 revision        1
    8 set major_version   2
    9 set minor_version   4
    10 categories      lang
    11 platforms       darwin freebsd linux
    12 maintainers     nomaintainer
    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.5
     7revision                2
     8set major               2
     9set branch              2.4
     10categories              lang
     11platforms               darwin
     12maintainers             nomaintainer
    1613
    17 homepage        http://www.python.org/
    18 master_sites    ${homepage}ftp/python/${version}/ \
    19                 ftp://ftp.python.org/pub/python/${version}/
    20 distname        Python-${version}
    21 checksums       md5 750b652bfdd12675e102bbe25e5e9893
    22 patchfiles      patch-configure \
    23                 patch-Makefile.pre.in \
    24                 patch-Lib-cgi.py \
    25                 patch-Lib-site.py \
    26                 patch-setup.py \
    27                 patch-Include-pyport.h \
    28                 patch-Mac-OSX-Makefile.in \
    29                 patch-Mac-OSX-IDLE-Makefile.in \
    30                 patch-Mac-OSX-PythonLauncher-Makefile.in
    31 #the bzip2-archive of 2.4.5 on python.org is broken (its a gzip-archive..);
    32 #use_bzip2       yes
    33 extract.suffix  .tgz
     14description             An interpreted, object-oriented programming language
     15long_description        Python is an interpreted, interactive, object-oriented \
     16                        programming language.
    3417
    35 depends_lib     port:gettext
     18homepage                http://www.python.org/
     19master_sites            ${homepage}/ftp/python/${version}/ \
     20                        ftp://ftp.python.org/pub/python/${version}/ \
     21                        ftp://ftp.fastorama.com/mirrors/ftp.python.org/pub/python/${version}/ \
     22                        ftp://ftp.python.jp/pub/python/${version}/
    3623
    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                 --disable-tk \
    44                 --enable-ipv6
     24distname                Python-${version}
     25extract.suffix          .tgz
     26
     27checksums               md5     750b652bfdd12675e102bbe25e5e9893 \
     28                        sha1    927c6e93ed3ea3bee4e07eff4b0f14254dc04147 \
     29                        rmd160  6c1c2905b166038fda5edb14baadbeb59acc8005
     30
     31patchfiles              patch-configure \
     32                        patch-Makefile.pre.in \
     33                        patch-Lib-cgi.py \
     34                        patch-Lib-site.py \
     35                        patch-setup.py \
     36                        patch-Include-pyport.h \
     37                        patch-Mac-OSX-Makefile.in \
     38                        patch-Mac-OSX-IDLE-Makefile.in \
     39                        patch-Mac-OSX-PythonLauncher-Makefile.in
     40
     41depends_lib             port:gettext
     42
     43configure.args          --enable-shared \
     44                        --enable-framework=${prefix}/Library/Frameworks \
     45                        --mandir=${prefix}/share/man \
     46                        --without-readline \
     47                        --disable-tk \
     48                        --enable-ipv6
     49
     50use_parallel_build      no
    4551
    4652post-patch {
    47     reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py
    48     reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/site.py
    49     reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Mac/OSX/Makefile.in
    50     reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
     53        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py
     54        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/site.py
     55        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Mac/OSX/Makefile.in
     56        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
    5157}
    5258
    53 build.target    all libpython2.4.dylib
     59build.target            all libpython${branch}.dylib
    5460
    5561# Workaround for case-sensitive file systems
    5662post-build {
    5763    if { ![file exists ${worksrcpath}/python.exe] } {
    58         ln -s python ${worksrcpath}/python.exe 
     64        ln -s python ${worksrcpath}/python.exe
    5965    }
    6066}
    6167
    62 test.run        yes
    63 test.target     test
     68test.run                yes
     69test.target             test
    6470
    65 destroot.target frameworkinstall maninstall
     71destroot.target         frameworkinstall maninstall
     72
    6673post-destroot {
    67     if { [variant_isset macosx]} {
    68         set framewdir ${prefix}/Library/Frameworks/Python.framework
    69         xinstall -m 755 -d ${destroot}${framewdir}/Versions/2.4/include
    70        ln -s Versions/Current/lib ${destroot}${framewdir}/Libraries
    71        ln -sf ${framewdir}/Versions/2.4/bin/pydoc ${destroot}${prefix}/bin/pydoc
    72        ln -sf ${framewdir}/Versions/2.4/bin/pydoc ${destroot}${prefix}/bin/pydoc24
    73        ln -s ${prefix}/lib/python2.4/config ${destroot}${framewdir}/Versions/2.4/lib/python2.4/config
    74        ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${version}.dylib
    75        ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${major_version}.${minor_version}.dylib
    76        ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${major_version}.dylib
    77        ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython.dylib
    78     } elseif { [variant_isset darwin]} {
    79        ln -s libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${version}.dylib
    80        ln -s libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${major_version}.dylib
    81        ln -s libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython.dylib
    82     } else {
    83         system "cd ${destroot}${prefix}/lib && \
    84         ln -s libpython${major_version}.${minor_version}.so \
    85             libpython${version}.so && \
    86         ln -s libpython${major_version}.${minor_version}.so \
    87             libpython${major_version}.so && \
    88         ln -s libpython${major_version}.${minor_version}.so \
    89             libpython.so"
    90     }
    91 }
     74        set framewpath ${prefix}/Library/Frameworks/Python.framework
     75        set framewdir  ${framewpath}/Versions/${branch}
    9276
    93 # needed to trigger the variant_isset check above
    94 platform macosx {}
     77        foreach dir { lib include } {
     78            file rename ${destroot}${framewdir}/${dir}/python${branch} ${destroot}${prefix}/${dir}
     79            ln -s ${destroot}${prefix}/${dir}/python${branch} ${destroot}${framewdir}/${dir}/python${branch}
     80        }
    9581
    96 # delete symlinks without version suffix, use python_select instead to choose version
    97 platform darwin {
    98     post-destroot {
    99         file delete ${destroot}${prefix}/bin/python
    100         file delete ${destroot}${prefix}/bin/pythonw
    101         file delete ${destroot}${prefix}/bin/idle
    102         file delete ${destroot}${prefix}/bin/pydoc
    103         file delete ${destroot}${prefix}/bin/smtpd.py
    104         file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python2.4.1
     82        file rename ${destroot}${framewdir}/lib/libpython${branch}.dylib ${destroot}${prefix}/lib
     83        ln -s ${destroot}${prefix}/lib/libpython${branch}.dylib ${destroot}${framewdir}/lib/libpython${branch}.dylib
     84
     85        file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1
     86
     87        # delete symlinks without version suffix, use python_select instead to choose version
     88        foreach bin { python pythonw idle pydoc smtpd.py } {
     89            file delete ${destroot}${prefix}/bin/${bin}
     90        }
     91        foreach bin [list python${branch} pythonw${branch} idle${branch} pydoc${branch} smtpd${branch}.py] {
     92            file rename -force ${destroot}${framewdir}/bin/${bin} ${destroot}${prefix}/bin
     93            ln -s ${prefix}/bin/${bin} ${destroot}${framewdir}/bin/${bin}
     94        }
     95
     96        foreach dir { Headers Resources Python Versions/Current } {
     97            file delete ${destroot}${framewpath}/${dir}
     98        }
    10599
    106100        # install select file for python_select
    107101        xinstall -m 755 -d ${destroot}${prefix}/etc/select/python
    108         xinstall -m 644 ${filespath}/python24 ${destroot}${prefix}/etc/select/python/
    109     }
     102        xinstall -m 644 ${filespath}/python[string map {. {}} ${branch}] ${destroot}${prefix}/etc/select/python/
    110103}
    111104
    112 platform puredarwin {
    113     configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
    114     configure.args-append   --disable-toolbox-glue --disable-framework
    115     destroot.target     install maninstall
     105post-activate {
     106    ui_msg "\nTo fully complete your installation and make python $branch the default, please run
     107\n\tsudo port install python_select \
     108\n\tsudo python_select $name\n"
    116109}
    117110
    118111platform darwin 8 {
    119     configure.args-append --with-cxx=/usr/bin/g++-4.0
     112        # TODO: would configure.compiler be more appropriate?
     113        configure.args-append           --with-cxx=/usr/bin/g++-4.0
    120114}
    121115
    122116platform darwin 9 {
    123     configure.cppflags-append    -D__DARWIN_UNIX03
     117        configure.cppflags-append       -D__DARWIN_UNIX03
    124118}
    125119
    126 platform freebsd {
    127     configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
    128     configure.args-append   --disable-framework
    129     build.target        all libpython2.4.so
    130     destroot.target     install maninstall
    131 }
     120# TODO: test if this universal variant actually works
     121# variant universal {
     122        # configure.args-append           --enable-universalsdk
     123# }
    132124
    133 platform linux {
    134     configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
    135     configure.args-append   --disable-framework
    136     build.target        all libpython2.4.so
    137     destroot.target     install maninstall
    138 }
    139 
    140 livecheck.check regex
    141 livecheck.url   http://www.python.org/download/releases/
    142 livecheck.regex Python (2.4.\[0-9\]+)
     125livecheck.check         regex
     126livecheck.url           ${homepage}download/releases/
     127livecheck.regex         Python (${branch}.\[0-9\]+)
Note: See TracChangeset for help on using the changeset viewer.