# $Id: Portfile,v 1.3 2005/09/13 06:57:45 olegb Exp $
PortSystem 1.0
name		jed
version		0.99-16
revision	1
categories	editors
maintainers	darwinports@opendarwin.org
description	JED is a powerful editor for programmers.
long_description	JED is a powerful editor designed for use by \
			programmers, its drop-down menu facility make it \
			one of the friendliest text editors around. Hence \
			it is ideal for composing simple email messages \
			as well as editing complex programs in a variety \
			of computer languages.
homepage	http://www.jedsoft.org/jed/
platforms	darwin
master_sites	ftp://space.mit.edu/pub/davis/jed/v0.99/
use_bzip2	yes
checksums	md5 c2bcd89c92a120559865a539c2705999
depends_lib	lib:libslang:slang
patchfiles	patch-pty.c
configure.args  --mandir=${prefix}/share/man
configure.env   CPPFLAGS="-L${prefix}/lib -I${prefix}/include" \
                CFLAGS="-no-cpp-precomp -flat_namespace -undefined suppress" \
		LDFLAGS="-L${prefix}/lib" JED_ROOT=${prefix}/share/jed
destroot	{
		xinstall ${worksrcpath}/src/objs/jed ${destroot}${prefix}/bin
		xinstall ${worksrcpath}/src/objs/rgrep ${destroot}${prefix}/bin

		xinstall ${worksrcpath}/doc/manual/jed.1 ${destroot}${prefix}/share/man/man1/
		xinstall ${worksrcpath}/doc/manual/rgrep.1 ${destroot}${prefix}/share/man/man1/

		xinstall -d ${destroot}${prefix}/share/jed/lib
		foreach f [glob -nocomplain [file join ${worksrcpath}/lib *]] { 
			if {![file isdirectory $f] } {
				xinstall $f ${destroot}${prefix}/share/jed/lib/
			}
		}

		xinstall -d ${destroot}${prefix}/share/jed/lib/colors
                foreach f [glob -nocomplain [file join ${worksrcpath}/lib/colors *]] {
                        if {![file isdirectory $f] } {
                                xinstall $f ${destroot}${prefix}/share/jed/lib/colors/
                        }
                }

		xinstall -d ${destroot}${prefix}/share/jed/lib/colors/Xjed
                foreach f [glob -nocomplain [file join ${worksrcpath}/lib/colors/Xjed *]] {
                        if {![file isdirectory $f] } {
                                xinstall $f ${destroot}${prefix}/share/jed/lib/colors/Xjed/
                        }
                }
}
