Skip to content
Permalink
Browse files

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

........
  https://trac.macports.org/changeset/36460 | raimue@macports.org | 2008-05-03 02:22:04 +0200 (Sat, 03 May 2008) | 3 lines
  
  lang/python24:
  Remove all hardcoded versions
........
  https://trac.macports.org/changeset/36462 | raimue@macports.org | 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.
........
  https://trac.macports.org/changeset/36463 | raimue@macports.org | 2008-05-03 05:08:16 +0200 (Sat, 03 May 2008) | 3 lines
  
  lang/python24:
  Update to 2.4.5
........
  https://trac.macports.org/changeset/36654 | raimue@macports.org | 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
........
  https://trac.macports.org/changeset/37481 | raimue@macports.org | 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.
........
  https://trac.macports.org/changeset/37529 | raimue@macports.org | 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
........
  https://trac.macports.org/changeset/37811 | raimue@macports.org | 2008-06-24 22:36:46 +0200 (Tue, 24 Jun 2008) | 3 lines
  
  lang/python{24,25,30}:
  Add better post-activate message
........
  https://trac.macports.org/changeset/37812 | raimue@macports.org | 2008-06-24 22:38:25 +0200 (Tue, 24 Jun 2008) | 3 lines
  
  lang/python{24,25,30}:
  Bump revisions
........

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@37814 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
raimue committed Jun 24, 2008
1 parent 0238f9c commit 385d10906b67c914582307c14e3ec86710890446
Showing with 94 additions and 109 deletions.
  1. +94 −109 lang/python24/Portfile
@@ -2,141 +2,126 @@

PortSystem 1.0

name python24
version 2.4.5
revision 1
set major_version 2
set minor_version 4
categories lang
platforms darwin freebsd linux
maintainers nomaintainer
description An interpreted, object-oriented programming language
long_description Python is an interpreted, interactive, object-oriented \
programming language.

homepage http://www.python.org/
master_sites ${homepage}ftp/python/${version}/ \
ftp://ftp.python.org/pub/python/${version}/
distname Python-${version}
checksums md5 750b652bfdd12675e102bbe25e5e9893
patchfiles patch-configure \
patch-Makefile.pre.in \
patch-Lib-cgi.py \
patch-Lib-site.py \
patch-setup.py \
patch-Include-pyport.h \
patch-Mac-OSX-Makefile.in \
patch-Mac-OSX-IDLE-Makefile.in \
patch-Mac-OSX-PythonLauncher-Makefile.in
#the bzip2-archive of 2.4.5 on python.org is broken (its a gzip-archive..);
#use_bzip2 yes
extract.suffix .tgz

depends_lib port:gettext

configure.args --enable-shared \
--mandir=${prefix}/share/man \
--bindir=${prefix}/bin \
--libdir=${prefix}/lib \
--without-readline \
--enable-framework=${prefix}/Library/Frameworks \
--disable-tk \
--enable-ipv6
name python24
version 2.4.5
revision 2
set major 2
set branch 2.4
categories lang
platforms darwin
maintainers nomaintainer

description An interpreted, object-oriented programming language
long_description Python is an interpreted, interactive, object-oriented \
programming language.

homepage http://www.python.org/
master_sites ${homepage}/ftp/python/${version}/ \
ftp://ftp.python.org/pub/python/${version}/ \
ftp://ftp.fastorama.com/mirrors/ftp.python.org/pub/python/${version}/ \
ftp://ftp.python.jp/pub/python/${version}/

distname Python-${version}
extract.suffix .tgz

checksums md5 750b652bfdd12675e102bbe25e5e9893 \
sha1 927c6e93ed3ea3bee4e07eff4b0f14254dc04147 \
rmd160 6c1c2905b166038fda5edb14baadbeb59acc8005

patchfiles patch-configure \
patch-Makefile.pre.in \
patch-Lib-cgi.py \
patch-Lib-site.py \
patch-setup.py \
patch-Include-pyport.h \
patch-Mac-OSX-Makefile.in \
patch-Mac-OSX-IDLE-Makefile.in \
patch-Mac-OSX-PythonLauncher-Makefile.in

depends_lib port:gettext

configure.args --enable-shared \
--enable-framework=${prefix}/Library/Frameworks \
--mandir=${prefix}/share/man \
--without-readline \
--disable-tk \
--enable-ipv6

use_parallel_build no

post-patch {
reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py
reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/site.py
reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Mac/OSX/Makefile.in
reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py
reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/site.py
reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Mac/OSX/Makefile.in
reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
}

build.target all libpython2.4.dylib
build.target all libpython${branch}.dylib

# Workaround for case-sensitive file systems
post-build {
if { ![file exists ${worksrcpath}/python.exe] } {
ln -s python ${worksrcpath}/python.exe
ln -s python ${worksrcpath}/python.exe
}
}

test.run yes
test.target test
test.run yes
test.target test

destroot.target frameworkinstall maninstall

destroot.target frameworkinstall maninstall
post-destroot {
if { [variant_isset macosx]} {
set framewdir ${prefix}/Library/Frameworks/Python.framework
xinstall -m 755 -d ${destroot}${framewdir}/Versions/2.4/include
ln -s Versions/Current/lib ${destroot}${framewdir}/Libraries
ln -sf ${framewdir}/Versions/2.4/bin/pydoc ${destroot}${prefix}/bin/pydoc
ln -sf ${framewdir}/Versions/2.4/bin/pydoc ${destroot}${prefix}/bin/pydoc24
ln -s ${prefix}/lib/python2.4/config ${destroot}${framewdir}/Versions/2.4/lib/python2.4/config
ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${version}.dylib
ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${major_version}.${minor_version}.dylib
ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${major_version}.dylib
ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython.dylib
} elseif { [variant_isset darwin]} {
ln -s libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${version}.dylib
ln -s libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${major_version}.dylib
ln -s libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython.dylib
} else {
system "cd ${destroot}${prefix}/lib && \
ln -s libpython${major_version}.${minor_version}.so \
libpython${version}.so && \
ln -s libpython${major_version}.${minor_version}.so \
libpython${major_version}.so && \
ln -s libpython${major_version}.${minor_version}.so \
libpython.so"
}
}
set framewpath ${prefix}/Library/Frameworks/Python.framework
set framewdir ${framewpath}/Versions/${branch}

foreach dir { lib include } {
file rename ${destroot}${framewdir}/${dir}/python${branch} ${destroot}${prefix}/${dir}
ln -s ${destroot}${prefix}/${dir}/python${branch} ${destroot}${framewdir}/${dir}/python${branch}
}

file rename ${destroot}${framewdir}/lib/libpython${branch}.dylib ${destroot}${prefix}/lib
ln -s ${destroot}${prefix}/lib/libpython${branch}.dylib ${destroot}${framewdir}/lib/libpython${branch}.dylib

# needed to trigger the variant_isset check above
platform macosx {}
file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1

# delete symlinks without version suffix, use python_select instead to choose version
platform darwin {
post-destroot {
file delete ${destroot}${prefix}/bin/python
file delete ${destroot}${prefix}/bin/pythonw
file delete ${destroot}${prefix}/bin/idle
file delete ${destroot}${prefix}/bin/pydoc
file delete ${destroot}${prefix}/bin/smtpd.py
file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python2.4.1
# delete symlinks without version suffix, use python_select instead to choose version
foreach bin { python pythonw idle pydoc smtpd.py } {
file delete ${destroot}${prefix}/bin/${bin}
}
foreach bin [list python${branch} pythonw${branch} idle${branch} pydoc${branch} smtpd${branch}.py] {
file rename -force ${destroot}${framewdir}/bin/${bin} ${destroot}${prefix}/bin
ln -s ${prefix}/bin/${bin} ${destroot}${framewdir}/bin/${bin}
}

foreach dir { Headers Resources Python Versions/Current } {
file delete ${destroot}${framewpath}/${dir}
}

# install select file for python_select
xinstall -m 755 -d ${destroot}${prefix}/etc/select/python
xinstall -m 644 ${filespath}/python24 ${destroot}${prefix}/etc/select/python/
}
xinstall -m 644 ${filespath}/python[string map {. {}} ${branch}] ${destroot}${prefix}/etc/select/python/
}

platform puredarwin {
configure.args-delete --enable-framework=${prefix}/Library/Frameworks
configure.args-append --disable-toolbox-glue --disable-framework
destroot.target install maninstall
post-activate {
ui_msg "\nTo fully complete your installation and make python $branch the default, please run
\n\tsudo port install python_select \
\n\tsudo python_select $name\n"
}

platform darwin 8 {
configure.args-append --with-cxx=/usr/bin/g++-4.0
# TODO: would configure.compiler be more appropriate?
configure.args-append --with-cxx=/usr/bin/g++-4.0
}

platform darwin 9 {
configure.cppflags-append -D__DARWIN_UNIX03
configure.cppflags-append -D__DARWIN_UNIX03
}

platform freebsd {
configure.args-delete --enable-framework=${prefix}/Library/Frameworks
configure.args-append --disable-framework
build.target all libpython2.4.so
destroot.target install maninstall
}

platform linux {
configure.args-delete --enable-framework=${prefix}/Library/Frameworks
configure.args-append --disable-framework
build.target all libpython2.4.so
destroot.target install maninstall
}
# TODO: test if this universal variant actually works
# variant universal {
# configure.args-append --enable-universalsdk
# }

livecheck.check regex
livecheck.url http://www.python.org/download/releases/
livecheck.regex Python (2.4.\[0-9\]+)
livecheck.check regex
livecheck.url ${homepage}download/releases/
livecheck.regex Python (${branch}.\[0-9\]+)

0 comments on commit 385d109

Please sign in to comment.
You can’t perform that action at this time.