# $Id: Portfile 60534 2009-11-14 23:10:00Z ryandesign@macports.org $

PortSystem 1.0

name			python25-doc
version			2.5.2
categories		lang
platforms		darwin
maintainers		nomaintainer

description		HTML documentation for Python 2.5
long_description	HTML documentation for Python 2.5. Use by running \
			'pydoc2.5 TOPIC', e.g. 'pydoc2.5 NUMBERS'.

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}/

dist_subdir		[lindex [split $name -] 0]
distname		Python-${version}
extract.suffix          .tgz

checksums       md5 3f7ca8aa86c6bd275426d63b46e07992 \
                sha1 7a835c93a904ae4ecb2d23b5183e94d3b92f8305 \
                rmd160 a6e2e81910639a362f265af2e3814e7b47e2110a

depends_lib     port:gettext port:python25 port:latex2html

patchfiles      patch-configure.diff \
                patch-Makefile.pre.in.diff \
                patch-Misc-setuid-prog.c.diff \
                patch-Modules-posixmodule.c.diff \
                patch-setup.py.diff \
                patch-Lib-cgi.py.diff

configure.args	--enable-shared \
			--mandir=${prefix}/share/man \
			--disable-framework

post-patch {
    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py
}

build.target	html
build.cmd	{ cd Doc && make }

destroot {
	file mkdir ${destroot}${prefix}/share/doc/
	file copy $worksrcpath/Doc/html ${destroot}${prefix}/share/doc/${name}
}

platform darwin 8 {
	configure.args-append 	--with-cxx=/usr/bin/g++-4.0
}

platform darwin 9 {
	configure.cppflags-append	-D__DARWIN_UNIX03
	configure.args-append 	--with-cxx=/usr/bin/g++-4.0
}

variant universal {
    configure.args-append   --enable-universalsdk
}

# for w/o quicktime sdk, etc. (be prepared for framework build, though)
platform puredarwin {
#	configure.args-delete	--enable-framework=${prefix}/Library/Frameworks
	configure.args-append	--disable-toolbox-glue --disable-framework
}

livecheck.type	regex
livecheck.url   ${homepage}download/releases/
livecheck.regex {Python (2\.5(?:\.\d+)*)}

