1 | # $Id: Portfile,v 1.32 2006/03/12 22:17:18 mww Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name python24 |
---|
6 | version 2.4.2 |
---|
7 | revision 3 |
---|
8 | set major_version 2 |
---|
9 | set minor_version 4 |
---|
10 | categories lang |
---|
11 | platforms darwin |
---|
12 | maintainers mww@opendarwin.org |
---|
13 | description An interpreted, object-oriented programming language |
---|
14 | long_description Python is an interpreted, interactive, object-oriented \ |
---|
15 | programming language. |
---|
16 | |
---|
17 | homepage http://www.python.org/ |
---|
18 | master_sites ${homepage}/ftp/python/2.4.2/ \ |
---|
19 | ftp://ftp.python.org/pub/python/2.4.2/ |
---|
20 | distname Python-${version} |
---|
21 | checksums md5 98db1465629693fc434d4dc52db93838 |
---|
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 | |
---|
29 | use_bzip2 yes |
---|
30 | |
---|
31 | post-patch { |
---|
32 | cd ${worksrcpath} |
---|
33 | reinplace "s|__PREFIX__|${prefix}|g" Lib/site.py Mac/OSX/Makefile |
---|
34 | } |
---|
35 | |
---|
36 | configure.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 | --enable-ipv6 \ |
---|
43 | --disable-tk |
---|
44 | post-configure { |
---|
45 | cd ${worksrcpath} |
---|
46 | reinplace "s|^LIBDIR=.*|LIBDIR=${prefix}/lib|g" Makefile |
---|
47 | reinplace "s|^INCLUDEDIR=.*|INCLUDEDIR=${prefix}/include|g" Makefile |
---|
48 | reinplace "s|^CONFINCLUDEDIR=.*|CONFINCLUDEDIR=${prefix}/include|g" Makefile |
---|
49 | } |
---|
50 | |
---|
51 | test.run yes |
---|
52 | test.target test |
---|
53 | |
---|
54 | destroot.target frameworkinstall maninstall |
---|
55 | post-destroot { |
---|
56 | if { ![variant_isset puredarwin] && ![variant_isset darwin_i386]} { |
---|
57 | set framewdir ${prefix}/Library/Frameworks/Python.framework/ |
---|
58 | xinstall -m 755 -d ${destroot}${framewdir}/Versions/2.4/include |
---|
59 | system "cd ${destroot}${framewdir} \ |
---|
60 | && ln -s Versions/Current/lib Libraries" |
---|
61 | system "ln -sf ${prefix}/include/python2.4 ${destroot}${framewdir}/Versions/2.4/include/python2.4" |
---|
62 | system "cd ${destroot}${prefix}/bin \ |
---|
63 | && ln -sf ${framewdir}/Versions/2.4/bin/pydoc pydoc \ |
---|
64 | && ln -sf ${framewdir}/Versions/2.4/bin/pydoc pydoc24" |
---|
65 | system "cd ${destroot}${framewdir}/Versions/2.4/lib/python2.4 \ |
---|
66 | && ln -s ${prefix}/lib/python2.4/config config" |
---|
67 | } |
---|
68 | system "cd ${destroot}${prefix}/lib && \ |
---|
69 | ln -s libpython${major_version}.${minor_version}.dylib \ |
---|
70 | libpython${version}.dylib && \ |
---|
71 | ln -s libpython${major_version}.${minor_version}.dylib \ |
---|
72 | libpython${major_version}.dylib && \ |
---|
73 | ln -s libpython${major_version}.${minor_version}.dylib \ |
---|
74 | libpython.dylib" |
---|
75 | } |
---|
76 | |
---|
77 | platform puredarwin { |
---|
78 | configure.args-delete --enable-framework=${prefix}/Library/Frameworks |
---|
79 | configure.args-append --disable-toolbox-glue --disable-framework |
---|
80 | destroot.target install maninstall |
---|
81 | } |
---|
82 | |
---|
83 | platform macosx {} |
---|
84 | platform darwin i386 { |
---|
85 | if { [variant_isset macosx] } { |
---|
86 | # framework build chokes on OS X/ia32, too |
---|
87 | configure.args-delete --enable-framework=${prefix}/Library/Frameworks |
---|
88 | destroot.target install maninstall |
---|
89 | } |
---|
90 | } |
---|
91 | |
---|
92 | platform darwin 8 { |
---|
93 | configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0 |
---|
94 | configure.args-append --with-cxx=/usr/bin/g++-4.0 |
---|
95 | } |
---|
96 | |
---|