# $Id: Portfile 61476 2009-12-12 18:47:42Z macsforever2000@macports.org $

PortSystem		1.0

name			icon
version			9.4.3
revision		2
categories		lang
maintainers		laposte.net:michael.grunewald
description		The Icon Programming Language
long_description	Icon is a high-level, general-purpose programming \
			language with a large repertoire of features for \
			processing data structures and character strings. \
			Icon is an imperative, procedural language with a \
			syntax reminiscent of C and Pascal, but with \
			semantics at a much higher level.
homepage		http://www.cs.arizona.edu/icon/
platforms		darwin
master_sites		${homepage}ftp/packages/unix/
distname		icon.v[strsed ${version} {g/\.//}]src
extract.suffix		.tgz
checksums		md5 4740b1fc5caf2fe7409367923dffe607 \
			sha1 92bd3347807b333fb903edf61a2805f2e1159577 \
			rmd160 af75af7f106920cd59a7f8ac85954aa472ae78e7

universal_variant	no
use_parallel_build      no

configure.cmd		make
configure.pre_args
configure.args		X-Configure name=macintosh

build.target		All

destroot.target		Install
destroot.destdir	dest=${destroot}${prefix}/libexec/${name}

post-destroot {
  foreach prog {icon icont iconx vib} {
    ln -s ../libexec/${name}/bin/${prog} ${destroot}${prefix}/bin
  }
  set doc_dir ${destroot}${prefix}/share/doc
  xinstall -d ${doc_dir}
  ln -s ../../libexec/${name}/doc ${doc_dir}/${name}-${version}
  set man1_dir ${destroot}${prefix}/share/man/man1
  xinstall -d ${man1_dir}
  ln -s ../../../libexec/${name}/man/man1/icon.1 ${man1_dir}
  ln -s ../../../libexec/${name}/man/man1/icont.1 ${man1_dir}
}

livecheck.type		regex
livecheck.url		${homepage}status.htm
livecheck.regex		Version (\[0-9.\]+)
