# $Id: Portfile 59708 2009-10-20 20:10:41Z jmr@macports.org $

PortSystem 1.0
name		pine
version		4.64
categories	mail
maintainers	fuzzymagic.com:sean
description	Pine - a Program for Internet News and Email
homepage	http://www.washington.edu/pine/
platforms	darwin

long_description Pine is a tool for reading, sending, and managing \
		 electronic messages that was designed with novice \
		 users in mind.

master_sites	ftp://ftp.cac.washington.edu/pine/ \
		ftp://ftp.cac.washington.edu/pine/old/
checksums   md5 75af127948cc0c701d424d22d621f792
distname	${name}${version}
extract.suffix	.tar.Z

use_configure	no

build.cmd	sh ${worksrcpath}/build
build.target	osx

variant ssl_plain	{ build.args SSLTYPE=unix }

platform darwin 9 {
    macosx_deployment_target 10.4
}

if {${os.platform} == "darwin" && ${os.major} >= 10} {
    pre-fetch {
        return -code error "$name does not build on Snow Leopard. Consider using alpine instead."
    }
}

destroot	{ xinstall -m 755 -d \
			${destroot}${prefix}/share/doc/${name}
		xinstall -m 755 -W ${worksrcpath}/bin pine pico pilot rpdump \
			rpload ${destroot}${prefix}/bin
		xinstall -m 644 -W ${worksrcpath}/doc pico.1 pilot.1 pine.1 \
			rpdump.1 rpload.1 ${destroot}${prefix}/share/man/man1
		xinstall -m 644 -W ${worksrcpath}/doc/tech-notes \
			background.html cmd-line.html config-notes.html \
			config.html index.html installation.html \
			introduction.html low-level.html porting.html \
			${destroot}${prefix}/share/doc/${name}
		system "${destroot}${prefix}/bin/pine -conf > ${destroot}${prefix}/etc/pine.conf" }

