# $Id: Portfile,v 1.3 2005/09/29 18:03:40 mww Exp $

PortSystem 1.0

name			python22
version			2.2.3
revision		2
categories		lang
maintainers		pat@ekman.cx
description		An interpreted, object-oriented programming language
platforms		darwin
master_sites	ftp://ftp.python.org/pub/python/${version}/
distname		Python-${version}
extract.suffix	.tgz
checksums		md5 169f89f318e252dac0c54dd1b165d229
patchfiles		patch-unixccompiler.py patch-Makefile.pre.in patch-setup.py

configure.args	--disable-tk

test.run		no
test.target		check

destroot.destdir	prefix=${destroot}${prefix}

variant nothreads {
	configure.args-append	--without-threads
}

variant puredarwin {
	configure.args-append  --disable-toolbox-glue
}

variant darwin x86 {
	configure.args-append  --disable-toolbox-glue
}

variant tk {
	configure.args-delete	--disable-tk
	depends_lib-append		lib:libtk:tk
}

post-destroot {
	file delete ${destroot}${prefix}/bin/python
	file rename ${destroot}${prefix}/bin/pydoc \
		${destroot}${prefix}/bin/pydoc2.2
	file rename ${destroot}${prefix}/share/man/man1/python.1 \
		${destroot}${prefix}/share/man/man1/python22.1
}
