PortSystem 1.0
name		pine
version		4.64
categories	mail
license		{UW's Pine License}
maintainers	nomaintainer
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 \
            sha1   ff73928c51bfd3786cd6b49d84120e12ab5d5c1c \
            rmd160 e72c46f7e3b70cc25bf98a78bca75f4bea6f089d
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} eq "darwin" && ${os.major} >= 10} {
    known_fail  yes
	pre-fetch {
		ui_error "Pine development ended with version 4.64 and evolved into the upwards-compatible replacement Alpine.  Also, this version does not build on Snow Leopard."
		return -code error "incompatible Mac OS X version"
	}
}

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

