source: trunk/dports/lang/python24/Portfile @ 33301

Last change on this file since 33301 was 33301, checked in by ryandesign@…, 13 years ago

For all nomaintainer and openmaintainer ports, remove configure.compiler gcc-4.0
from all platform darwin 8 sections. MacPorts 1.6 already ensures that GCC 4.0
is used by default on Tiger. See #14046.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.2 KB
Line 
1# $Id: Portfile 33301 2008-01-23 10:58:09Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name            python24
6version         2.4.4
7revision        2
8set major_version   2
9set minor_version   4
10categories      lang
11platforms       darwin freebsd linux
12maintainers     nomaintainer
13description     An interpreted, object-oriented programming language
14long_description    Python is an interpreted, interactive, object-oriented \
15                    programming language.
16
17homepage        http://www.python.org/
18master_sites    ${homepage}/ftp/python/${version}/ \
19                ftp://ftp.python.org/pub/python/${version}/
20distname        Python-${version}
21checksums       md5 0ba90c79175c017101100ebf5978e906
22patchfiles      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
32use_bzip2       yes
33
34depends_lib     port:gettext
35
36configure.args  --enable-shared \
37                --mandir=${prefix}/share/man \
38                --bindir=${prefix}/bin \
39                --libdir=${prefix}/lib \
40                --without-readline \
41                --enable-framework=${prefix}/Library/Frameworks \
42                --disable-tk \
43                --enable-ipv6
44
45post-patch {
46    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py
47    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/site.py
48    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Mac/OSX/Makefile.in
49    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
50}
51
52build.target    all libpython2.4.dylib
53
54# Workaround for case-sensitive file systems
55post-build {
56    if { ![file exists ${worksrcpath}/python.exe] } {
57        ln -s python ${worksrcpath}/python.exe 
58    }
59}
60
61test.run        yes
62test.target     test
63
64destroot.target frameworkinstall maninstall
65post-destroot {
66    if { [variant_isset macosx]} {
67        set framewdir ${prefix}/Library/Frameworks/Python.framework
68        xinstall -m 755 -d ${destroot}${framewdir}/Versions/2.4/include
69       ln -s Versions/Current/lib ${destroot}${framewdir}/Libraries
70       ln -sf ${framewdir}/Versions/2.4/bin/pydoc ${destroot}${prefix}/binpydoc
71       ln -sf ${framewdir}/Versions/2.4/bin/pydoc ${destroot}${prefix}/binpydoc24
72       ln -s ${prefix}/lib/python2.4/config ${destroot}${framewdir}/Versions/2.4/lib/python2.4/config
73       ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${version}.dylib
74       ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${major_version}.dylib
75       ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython.dylib
76    } elseif { [variant_isset darwin]} {
77       ln -s libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${version}.dylib
78       ln -s libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${major_version}.dylib
79       ln -s libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython.dylib
80    } else {
81        system "cd ${destroot}${prefix}/lib && \
82        ln -s libpython${major_version}.${minor_version}.so \
83            libpython${version}.so && \
84        ln -s libpython${major_version}.${minor_version}.so \
85            libpython${major_version}.so && \
86        ln -s libpython${major_version}.${minor_version}.so \
87            libpython.so"
88    }
89}
90
91
92# delete symlinks without version suffix, use python_select instead to choose version
93platform darwin {
94    post-destroot {
95        file delete ${destroot}${prefix}/bin/python
96        file delete ${destroot}${prefix}/bin/pythonw
97        file delete ${destroot}${prefix}/bin/idle
98        file delete ${destroot}${prefix}/bin/pydoc
99        file delete ${destroot}${prefix}/bin/smtpd.py
100        file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python2.4.1
101
102        # install select file for python_select
103        xinstall -m 755 -d ${destroot}${prefix}/etc/select/python
104        xinstall -m 644 ${filespath}/python24 ${destroot}${prefix}/etc/select/python/
105    }
106}
107
108platform puredarwin {
109    configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
110    configure.args-append   --disable-toolbox-glue --disable-framework
111    destroot.target     install maninstall
112}
113
114platform darwin 8 {
115    configure.args-append --with-cxx=/usr/bin/g++-4.0
116}
117
118platform darwin 9 {
119    configure.cppflags-append    -D__DARWIN_UNIX03
120}
121
122platform freebsd {
123    configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
124    configure.args-append   --disable-framework
125    build.target        all libpython2.4.so
126    destroot.target     install maninstall
127}
128
129platform linux {
130    configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
131    configure.args-append   --disable-framework
132    build.target        all libpython2.4.so
133    destroot.target     install maninstall
134}
135
136livecheck.check regex
137livecheck.url   http://www.python.org/download/releases/
138livecheck.regex Python (2.4.\[0-9\]+)
Note: See TracBrowser for help on using the repository browser.