# $Id: Portfile 41341 2008-10-31 05:16:40Z jmr@macports.org $

PortSystem 1.0

name		jed
version		0.99-18
categories	editors
maintainers	nomaintainer
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/ \
		ftp://space.mit.edu/pub/davis/jed/v0.99/old/
use_bzip2	yes
checksums	md5 5378c8e7805854018d9ec5c3cfadf637 \
		sha1 fa4b3313fdde0466546e36100b0de2d9cc75806d \
		rmd160 6925b67eab24d6dd2d5b5a975c350cfda515632d
depends_lib	port:slang2
patchfiles	patch-pty.c \
		patch-misc.c
configure.args  --mandir=${prefix}/share/man --with-slang=${prefix}
configure.cppflags-append	"-L${prefix}/lib"
configure.cflags-append	-no-cpp-precomp
configure.env	JED_ROOT=${prefix}/share/jed
destroot	{
		xinstall ${worksrcpath}/src/objs/jed ${destroot}${prefix}/bin

		xinstall ${worksrcpath}/doc/manual/jed.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/
                        }
                }
}
