# $Id: Portfile,v 1.10 2006/08/08 07:08:00 yeled Exp $

PortSystem 1.0

name        ksh93
version     2005-02-02
categories  shells
maintainers yeled@opendarwin.org
description The AT&T Korn shell
long_description \
    The official version of ksh-93, by David Korn and AT&T research
platforms   darwin freebsd
homepage    http://www.research.att.com/sw/download/
master_sites    http://www.research.att.com/~gsf/download/tgz/

distfiles   ast-ksh.$version.tgz INIT.$version.tgz
checksums   ast-ksh.$version.tgz md5 fecce7e67b55fe986c7c2163346e0977 \
        INIT.$version.tgz md5 50339ec5c16f102e865f8f766da9016d

fetch.user  I accept www.opensource.org/licenses/cpl
fetch.password  .

pre-extract {
    file mkdir ${worksrcpath}
}

extract.dir ${worksrcpath}

patchfiles  patch-src__lib__libast__features__lib \
        patch-src__lib__libast__sfio__sfhdr.h

configure   {}

build.cmd   bin/package
build.target    make
build.args  SHELL=sh

destroot {
    set arch [exec ${worksrcpath}/bin/package]
    xinstall -m 555 ${worksrcpath}/arch/${arch}/bin/ksh ${destroot}${prefix}/bin
    xinstall -m 444 ${worksrcpath}/arch/${arch}/man/man1/sh.1 ${destroot}${prefix}/share/man/man1/ksh.1
}
